Send telemetry to PC in real time
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Send telemetry to PC in real time
I have replaced the receiver on my DJI Phantom with the X8R and have the LIPO sensor working to send voltage data to my Taranis via telemetry. I have just ordered the GPS module as well.
Is there any way I can get telemetry data from the Taranis receiver in real time to a PC so I can track the Phantom with a moving map? I'm pretty software handy, so if I can get the data via USB or somehow, I can write the software needed to plot the coordinates.
I know I can download the data post-flight and plot it...I already have software I can modify that will do that.
Is there any way I can get telemetry data from the Taranis receiver in real time to a PC so I can track the Phantom with a moving map? I'm pretty software handy, so if I can get the data via USB or somehow, I can write the software needed to plot the coordinates.
I know I can download the data post-flight and plot it...I already have software I can modify that will do that.
Re: Send telemetry to PC in real time
With openTx 2.0 you can get the telemetry data on the serial port that is accessible in the battery bay of the radio.
Sent via mobile
Sent via mobile
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
That's awesome. Is there a pointer to some implementation notes or someone who has done this?
Re: Send telemetry to PC in real time
On the 9xr pro we use bluetooth. Maybe you can connect a bluetooth module to it? At the moment I'm able to receive telemetry data on my android phone and eepskye. Maybe when Mike has time for it, this could be improved. But the basis is there already. ![Smile :)](./images/smilies/icon_e_smile.gif)
João
![Smile :)](./images/smilies/icon_e_smile.gif)
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: Send telemetry to PC in real time
Just turn on S. Port Mirror in the hardware settings, then connect to the PC either via wired connection (the FrSky update cable is a good candidate, serial level is RS232) or indeed by connecting a properly configured bluetooth module or radio modem to it.
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
So, has anyone actually done this? Is there any step by step guide to getting the telemetry data feed? I found the hardware setting and turned to S-Port Mirror (there was also a setting that said Telemetry), connected a battery to my Phantom, started receiving telemetry, and tried to connect to the USB Port on the Taranis via a Read operation of a USBEndPointReader in the LibUSBDotNet framework in C# on a PC.
I was able to read nothing, nada, even though I can see the Taranis clearly when it connects to the PC through a DeviceNotification. It shows up in Device Manager as a Human Input gaming device.
So, I connected the PC to the internal battery bay serial port using the FRSKY upgrade cable ( http://www.alofthobbies.com/usb-upgraded-cable.html ), and I can see Taranis as COM3. But, this is just upgrading the firmware, no? I cannot actually power the radio when using this cable.
So, are people out there just guessing, am I missing some secret sauce, or has anyone actually done this?
I was able to read nothing, nada, even though I can see the Taranis clearly when it connects to the PC through a DeviceNotification. It shows up in Device Manager as a Human Input gaming device.
So, I connected the PC to the internal battery bay serial port using the FRSKY upgrade cable ( http://www.alofthobbies.com/usb-upgraded-cable.html ), and I can see Taranis as COM3. But, this is just upgrading the firmware, no? I cannot actually power the radio when using this cable.
So, are people out there just guessing, am I missing some secret sauce, or has anyone actually done this?
Re: Send telemetry to PC in real time
No, do not use USB port for this. Serial port on Taranis is hidden in battery compartment. That is the right io inerface for your requirements.
projectkk2glider@github
Re: Send telemetry to PC in real time
Also you will need to study opentx source to find out the serial port settings and more importantly the format of telemetry stream.
projectkk2glider@github
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
Ok, cool. I have the FRSKY USB serial cable that will connect to this. The only problem is, how does one power the Taranis when using it, as this is also where the battery plugs in? Does one power the Taranis with a LIPO on the other port on the right of the micro USB card? What battery would one use for this? The plug is a 4 pin plug smaller than the 4 pin balance plug on a 3S LIPO I use to power the Phantom. What is this plug for?dinamich wrote:No, do not use USB port for this. Serial port on Taranis is hidden in battery compartment. That is the right io inerface for your requirements.
So many questions, so much conflicting information!
Re: Send telemetry to PC in real time
The power connector doesn't magically transform into a serial port... The usual battery is connected as normal, the serial port is obviously the other, 4-pin plug. You'll have to source a connector and hack a cable, solder on the connector, or whatever pleases you...
Re: Send telemetry to PC in real time
On the left is battery connector, in the middle SD card slot, on the right serial port connector. Pinout for serial port is written on the board next to pins. The baud rate depends on what the serial port is set to (Radios setup, page 6/8, Serial port setting):
* S-Port-Mirror 57600,8,1,N - outputs all SPrort received telemetry
* Telemetry 9600,8,1,N - receives telemetry stream on this port, output none
* debug (only with opentx debug build) 115200,8,1,N - debug output
So you need to choose S-Port-Mirror mode.
Update: Serial port pins from left to right:
* GND ground, connect to pin 5 of PC serial port (ground)
* not needed
* UART_T this is transmit line from Taranis, connect to pin 2 of PC serial port (RX line)
* UART_R this is receive line of Taranis, connect to pin 3 of PC serial port (TX line)
Last edited by dinamich on Thu Aug 14, 2014 4:39 pm, edited 1 time in total.
projectkk2glider@github
Re: Send telemetry to PC in real time
@Swifterone
If you make such a software please share it with the rest of us. Having a telemetry dashboard would be cool.
Also have to look into adding Bluetooth to my Taranis![Smile :-)](./images/smilies/icon_e_smile.gif)
If you make such a software please share it with the rest of us. Having a telemetry dashboard would be cool.
Also have to look into adding Bluetooth to my Taranis
![Smile :-)](./images/smilies/icon_e_smile.gif)
Re: Send telemetry to PC in real time
Created wiki page for Taranis serial port: https://github.com/opentx/opentx/wiki/T ... erial-port
projectkk2glider@github
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
I have already made moving map software for displaying in-flight UAV position, heading, course, speed and altitude from an Internet-connected cell phone attached to the drone. My plan is to modify this existing software to display such data, along with other FRSKY telemetry info, fed from the X9D's serial port.strips wrote:@Swifterone
If you make such a software please share it with the rest of us. Having a telemetry dashboard would be cool.
Also have to look into adding Bluetooth to my Taranis
You can see the software here: https://www.youtube.com/watch?v=AN1JmhZfkJo
The software is written in C# for WPF on Windows 7 or 8.
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
So, I'm grateful for the knowledge of the pin outs and the fact that I need a 4 pin female 2mm pitch connector with wiring harness (no idea where to get one, and Google returns a thousand wholesalers in China when I need one local source for a female connector with wires already attached).
Who was the design genius who put this valuable port inside the inaccessible battery compartment? I will have to drill a hole of some kind to get the serial wires out, presuming I can get the 2mm pitch connector or figure something else out.
Who was the design genius who put this valuable port inside the inaccessible battery compartment? I will have to drill a hole of some kind to get the serial wires out, presuming I can get the 2mm pitch connector or figure something else out.
Re: Send telemetry to PC in real time
Where did you want him to put the connector? Inside the radio? Like mine? Fortunately I'm using a bluetooth module so I don't need wires. The battery compartment is the best place for it. at least you don't have to open the radio to access itSwifterone wrote: Who was the design genius who put this valuable port inside the inaccessible battery compartment? I will have to drill a hole of some kind to get the serial wires out, presuming I can get the 2mm pitch connector or figure something else out.
![Smile :)](./images/smilies/icon_e_smile.gif)
These connectors are used everywhere in modern electronics.
I bought these a couple months ago. This is what you want..
http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 1441351403
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
Why, I would have wanted FRSKY to put the connector so it was accessible from outside the radio, of course, perhaps right below the USB connector.jhsa wrote:Where did you want him to put the connector? Inside the radio? Like mine? Fortunately I'm using a bluetooth module so I don't need wires. The battery compartment is the best place for it. at least you don't have to open the radio to access itSwifterone wrote: Who was the design genius who put this valuable port inside the inaccessible battery compartment? I will have to drill a hole of some kind to get the serial wires out, presuming I can get the 2mm pitch connector or figure something else out.
These connectors are used everywhere in modern electronics.
I bought these a couple months ago. This is what you want..
http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 1441351403
João
Thanks very much for the link to the connectors, that will speed me onto getting a live data stream that I can figure out how to parse and plot. My GPS and Vario sensors came today, and I need to open up the Phantom and install them.
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
Ok, so I've gotten my connectors and have hooked the Taranis to a serial port on the PC, using the pinouts in the wiki. The Taranis is set to SPORT Mirror. On the PC serial utility, I have 57600, N, 8, 1. I set my serial port utility to receive and I get nothing, ever. Nada.
I reverse the send/receive lines, just to make sure, and still get nothing. Nada.
Any ideas? Has anyone ever done this before? At the very least, I had hoped for periodic dumps of binary data that I would have to then map to structures in the Taranis source. But, nothing.
I reverse the send/receive lines, just to make sure, and still get nothing. Nada.
Any ideas? Has anyone ever done this before? At the very least, I had hoped for periodic dumps of binary data that I would have to then map to structures in the Taranis source. But, nothing.
Re: Send telemetry to PC in real time
It works for me. Did you forgot to turn off hardware or software handshake? It sends some sport data even when receiver is not turned on (like rssi an swr). Try to open serial port in a generic serial terminal program. Do you use win or linux?
projectkk2glider@github
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
I used both generic serial programs and my own code, under Windows 8, using a USB to Serial interface port (COM5) of known capability. Since you have been successful, could you share your exact setup with me?dinamich wrote:It works for me. Did you forgot to turn off hardware or software handshake? It sends some sport data even when receiver is not turned on (like rssi an swr). Try to open serial port in a generic serial terminal program. Do you use win or linux?
Also, other threads seem to say that the connecter inside the battery port is an actual Smart Port, and not an RS-232 serial port. Do I need some special FRSKY serial cable or other adapter?
Thanks!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Send telemetry to PC in real time
It is a 'normal' serial port. The logic is inverted (like RS232), but the output is driven by a transistor to ground and a pull up resistor (2K2 to 3.3V).
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Send telemetry to PC in real time
The actual smart port is in the module compartment.Swifterone wrote: Also, other threads seem to say that the connecter inside the battery port is an actual Smart Port, and not an RS-232 serial port.
Re: Send telemetry to PC in real time
This is the cable and USB to serial adapter that I use. Wired as described on wiki page. Baud rate 57600 bps.
projectkk2glider@github
Re: Send telemetry to PC in real time
If you look at my cable and measure voltage between green (positive probe) and gray (negative probe) wire with Taranis disconnected from other devices including USB to serial adapter you should get:
* in S-port mirror mode about 0V
* in Telemetry mode about 3.1V
One reason why it is not working for you is that your USB to serial adapter might not be as tolerant as mine. Taranis can't produce negative voltage in TX line, the best it can do is zero volts. Maybe this is not enough for your serial adapter. If you can try another one.
* in S-port mirror mode about 0V
* in Telemetry mode about 3.1V
One reason why it is not working for you is that your USB to serial adapter might not be as tolerant as mine. Taranis can't produce negative voltage in TX line, the best it can do is zero volts. Maybe this is not enough for your serial adapter. If you can try another one.
projectkk2glider@github
Re: Send telemetry to PC in real time
The FrSky USB adapters of course work perfectly.
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
Ok, so I made up a little RS-232 connector similar to what you've done here, and now I can get data from the Taranis, both with a serial utility and my own C# software.dinamich wrote:This is the cable and USB to serial adapter that I use. Wired as described on wiki page. Baud rate 57600 bps.
Now, I have to parse the stream. This note and the code linked therein will prove invaluable, I'm sure. https://code.google.com/p/telemetry-con ... rtProtocol
Thanks for your help, everybody. I'll let you know when I have some software results.
-
- Posts: 24
- Joined: Wed Aug 13, 2014 4:26 am
- Country: -
Re: Send telemetry to PC in real time
Ok, so after a week of work, it looks like I can successfully decode the serial telemetry stream from the Taranis. Because I have a limited number of sensors, I can only test a few things like BaroAltitude, RSSI, SWR, etc. But, I think the other data items will decode just fine.
If my TaranisTelemetry class is passed a reference to a ViewModel object supporting INotifyPropertyChanged, that view model will automatically be updated from the decoded stream, and thus, any Winforms, WPF, or Windows Store UI components will automatically reflect the update in whatever user interface it is bound to.
I will be putting up a GitHub repository with the Visual Studio project shortly. I would hope that I could get some good code reviews from the OpenTx software team, since I only have a limited experience with the codebase you all know so intimately, and this Taranis is my first RC transmitter ever (I only have a DJI Phantom).
Thoughts?
If my TaranisTelemetry class is passed a reference to a ViewModel object supporting INotifyPropertyChanged, that view model will automatically be updated from the decoded stream, and thus, any Winforms, WPF, or Windows Store UI components will automatically reflect the update in whatever user interface it is bound to.
I will be putting up a GitHub repository with the Visual Studio project shortly. I would hope that I could get some good code reviews from the OpenTx software team, since I only have a limited experience with the codebase you all know so intimately, and this Taranis is my first RC transmitter ever (I only have a DJI Phantom).
Thoughts?
Re: Send telemetry to PC in real time
Good job, thanks.
As you are using a Phantom, you might have a look at this device.
It seems that by adding no more than 3,5 gr one can get the full Naza and GPS bus data.
Yet not available this week, but probably next week.
As you are using a Phantom, you might have a look at this device.
It seems that by adding no more than 3,5 gr one can get the full Naza and GPS bus data.
Yet not available this week, but probably next week.
Last edited by SeaFrog on Wed Sep 03, 2014 6:38 pm, edited 2 times in total.
Re: Send telemetry to PC in real time
That's a cool thing!