Ardupilot protocol choices for frsky telemetry

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
Post Reply
larsks
Posts: 18
Joined: Tue Jul 19, 2016 1:41 pm
Country: -

Ardupilot protocol choices for frsky telemetry

Post by larsks »

I have a 9xr Pro and a FrSky X8R receiver. I'm running a recent ArduCopter build and I have attached a craft-and-theory telemetry cable between my Pixhawk and FrSky receiver. It looks like everything is working at least for basic telemetry data (like lat/lon, altitude, etc). Reading through the Ardupilot documentation it looks as if there are actually two protocol options available when sending telemetry data to a FrSky smartport-enabled receiver:

One option is the "standard" frky telemetry protocol (I guess), which you get when set SERIAL2_PROTOCOL to 4.

The other option is described as "Passthrough" protocol (set SERIAL2_PROTOCOL to 10), which is described at http://ardupilot.org/copter/docs/common ... rough.html. From that link:
Passthrough FrSky Telemetry is the latest protcol available in ArduPilot and it allows the transmission of raw data directly to OpenTX without any preprocessing by OpenTX and without the need for discovery. The passthrough telemetry protocol is optimized specifically for the FrSky datalink bandwidth and enhancements include having multiple data elements in a single telemetry packet and using floating point representation (e.g. we don’t really need centimeter precision altitude to be displayed on screen when flying at 100m). This results in an improved data refresh rate such that information such as attitude (roll, pitch, yaw) is displayed without any perceptible lag.

Compared to regular FrSky telemetry, passthrough telemetry contains ArduPilot specific information such as flight modes, error messages, warnings, and failsafes.
When it comes to transmitters, most of the ardupilot documentation is opentx specific, and it's pretty clear that opentx supports this enhanced telemetry information. Does ersky9x? If it does, I would be happy to contribute documentation to Ardupilot that describes the configuration.

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

There is some support for "passthrough" telemetry in ersky9x. It is possible, much of the support on openTx is done by using a LUA script, since the "passthrough" telemetry data is available to that.
I've just got some limited LUA function into ersky9x, and, in time, more support, including access to the "passthrough" data should be possible.
My main problem, apart from time to do everything, is I don't have any craft-and-theory hardware to do any testing.

There will be some limitations on what LUA may achieve on the 'PRO as it only has 64K of RAM, while the STM processor on a Taranis has 128K.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
larsks
Posts: 18
Joined: Tue Jul 19, 2016 1:41 pm
Country: -

Re: Ardupilot protocol choices for frsky telemetry

Post by larsks »

Mike, thanks for the reply. Taking a closer look at the differences between the "standard" and "passthrough" protocols it turns out there's not all that much I care about, although I can see that there are values in which other folks would have interest (airspeed, rangefinder distance, etc).

I am working on an update to the ArduPilot documentation on FrSky telemetry support in order to add information about ErSky9xr and the 9XR Pro. If you have a minute to take a look to make sure I am not making any egregious errors that would be super; you can see the current state of things at https://github.com/larsks/ardupilot_wik ... gy-9xr-pro.

While working on these docs, I've run into a few questions I'm hoping you can help with:

- What is the correct way of referring to a particular version of ErSky9xr? I see folks regularly using the subversion revision (218, 220), but there is also a software version (v.1760-Mike). Which is preferred?

- What is the minimum version that supports telemetry without an external cable using the XJT module?

- Is there a way to get UI "screenshots" other than by pointing a camera at the screen?

- I don't like linking directly to forum posts from documentation because I worry that the specific post might get stale/unmaintained, or go away or change URL if the forum software changes, etc. Is there a static website anywhere that collects the ErSky9xr docs and so forth? Or are the forum posts really the best links to use?

Thanks for your help!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

The (subVersion) revision is the correct reference to use.
I think r211 was the first revision that fully supported the XJT module on the 'PRO.
I could try to get .pdf documents onto www.er9x.com, but otherwise the forum is currently the best place to link to.

There is a way to get screenshots. You need to connect to the radio either over the COM2 connection, or bluetooth if you have installed it.
In either case, set the function for these to "LcdDump". Now run eepskye, select the Telemetry menu, then select the "Screen" tab. Choose the Com port you have used for the connection to COM2 or bluetooth on the radio, then click the "Start" button. You should get the radio display showing on the PC. You can actually use the buttons on the PC image to operate the radio, and there is a "ScreenShot" button to save the current display image. The image will be saved in the directory specified at the bottom of the dialog, with the name specified below that.

I put this in specifically to be able to get screenshots for manuals!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Ardupilot protocol choices for frsky telemetry

Post by jhsa »

I have been using it also for video tutorials :)

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

larsks
Posts: 18
Joined: Tue Jul 19, 2016 1:41 pm
Country: -

Re: Ardupilot protocol choices for frsky telemetry

Post by larsks »

You need to connect to the radio either over the COM2 connection, or bluetooth if you have installed it.
In either case, set the function for these to "LcdDump".
My choices for "COM2 Func." (in the "Telemetry" menu) are:

- Telemetry
- SbusTrain
- Sbus57600
- BTDirect
- FMSerial

There is no "LcdDump". Am I missing something? FWIW, I don't have a bluetooth module; I'm planning on plugging an ftdi cable into tx/rx/ground on the Futaba trainer port, which from the wiring diagram appears to be COM2.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Ardupilot protocol choices for frsky telemetry

Post by jhsa »

I do have it.. You probably need to flash the latest test version of esky9x.. You can get it here..

viewtopic.php?f=7&t=4676

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
larsks
Posts: 18
Joined: Tue Jul 19, 2016 1:41 pm
Country: -

Re: Ardupilot protocol choices for frsky telemetry

Post by larsks »

The initial version of the 9xr pro docs has merged and is now live @ ardupilot.org: http://ardupilot.org/copter/docs/common ... gy-9xr-pro.

In addition to updating the screenshots, there are also a few formatting fixes that I'll need to address.

João, you were right about needing the bleeding edge version of the firmware. I have the "LcdDump" option now. Can you provide me with more details about how you've connected your tx to your pc for screenshots? Using a usb serial adapter I had buried on my desk, I'm not able to get anything operating when connected to the rx/tx/gnd ports on the futaba connector.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

Check you have connected the Tx signal from the radio to the Rx of the USB-serial adapter and Rx to Tx.
I haven't used the COM2 connections since I first tested them as I have a bluetooth module in those radios I've been using!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Ardupilot protocol choices for frsky telemetry

Post by jhsa »

I have been connecting using Bluetooth as well.. I have BT in all my radios. Never used COM2 which is connected to the internal model's telemetry.

João

Sent from my thor using Tapatalk

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
rsilk49
Posts: 140
Joined: Wed Oct 26, 2016 10:33 am
Country: United Kingdom

Re: Ardupilot protocol choices for frsky telemetry

Post by rsilk49 »

MikeB wrote: Wed May 31, 2017 8:48 am There is some support for "passthrough" telemetry in ersky9x. It is possible, much of the support on openTx is done by using a LUA script, since the "passthrough" telemetry data is available to that.
I've just got some limited LUA function into ersky9x, and, in time, more support, including access to the "passthrough" data should be possible.
My main problem, apart from time to do everything, is I don't have any craft-and-theory hardware to do any testing.

There will be some limitations on what LUA may achieve on the 'PRO as it only has 64K of RAM, while the STM processor on a Taranis has 128K.

Mike.
From personal,experience, I can say that by following Lars excellent documentation and help from Mike, that passthrough does work (r220) :)

There are still some minor issues with some telemetry sources which I am attempting to analyze to help with debugging (see below). Mike, I will be happy to test patches using my C&T cable.


1) I have just run another test flight. Fuel remains at 100% UNTIL Disarm, then it displays the correct value! So it seems you may not be refreshing the graphic bar and text display every x seconds or so. Mah is updated regularly and shows meaningful values.

2) I logged Gspd and Aspd hoping to capture horizontal velocity, but all values are zero. According to the Ardupilot docs, this should be sent as {5005} VELANDYAW:Horizontal velocity. Vspd is logged OK and shows meaningful values.

3) I also noticed Hdg is always zero and the graphic on the last telemetry page remains as a vertical line. It is not possible to log Hdg as there is no switch in the Telemetry:Logging page.
Again according to the Ardupilot docs, Hdg should be sent as {5004} HOME:Angle from front of vehicle to home.

I hope these are relatively easy to fix, since fuel, speed and direction are essential pieces of information.

.rs
S500 + Pixhawk 1 clone + Mauch PM + C&T Telemetry adapter + 9XR-Pro (Taranis gimbals)/XJT/X8R
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

1. I think I have a fix for this, I need to store the battery capacity as it is only being sent, it seems, when disarmed.
2. I'm not processing the 5005 message, I'll need to check the exact format to be able to decode it.
3. I'm adding Hdg to the available logged values, and, hopefully, this will be processed.

1 and 3 will be in the next test version, with 2 if/when I find the format information.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
rsilk49
Posts: 140
Joined: Wed Oct 26, 2016 10:33 am
Country: United Kingdom

Re: Ardupilot protocol choices for frsky telemetry

Post by rsilk49 »

MikeB wrote: Tue Jul 04, 2017 5:27 pm 1. I think I have a fix for this, I need to store the battery capacity as it is only being sent, it seems, when disarmed.
2. I'm not processing the 5005 message, I'll need to check the exact format to be able to decode it.
3. I'm adding Hdg to the available logged values, and, hopefully, this will be processed.

1 and 3 will be in the next test version, with 2 if/when I find the format information.

Mike.
You probably already have this, but just in case, here is the spreadsheet with all the data IDs etc.
https://cdn.rawgit.com/ArduPilot/ardupi ... tocol.xlsx

1 5007 contains the battery capacity and is supposed to be sent 3 times at "init" (arming?)
2 5005. The vert speed is coming from somewhere :) I asumed it was from the 5005 ID which contains both horiz and vert speeds . . .

Let me know when the next test build is available and I will be happy to check it and give you feedback.

.rs
S500 + Pixhawk 1 clone + Mauch PM + C&T Telemetry adapter + 9XR-Pro (Taranis gimbals)/XJT/X8R
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

I'm picking up the capacity from 5007, I just wasn't storing it, I was expecting it all the time.

I think the Vspd must be in a "standard" FrSky packet as I'm not processing it anywhere else.

I'll see about 5005 processing, probably tomorrow.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

"d7" and "d8" both include processing for the battery capacity and heading "Hdg".

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
rsilk49
Posts: 140
Joined: Wed Oct 26, 2016 10:33 am
Country: United Kingdom

Re: Ardupilot protocol choices for frsky telemetry

Post by rsilk49 »

rsilk49 wrote: Tue Jul 04, 2017 7:27 pm
MikeB wrote: Tue Jul 04, 2017 5:27 pm 1. I think I have a fix for this, I need to store the battery capacity as it is only being sent, it seems, when disarmed.
2. I'm not processing the 5005 message, I'll need to check the exact format to be able to decode it.
3. I'm adding Hdg to the available logged values, and, hopefully, this will be processed.

1 and 3 will be in the next test version, with 2 if/when I find the format information.

Mike.
You probably already have this, but just in case, here is the spreadsheet with all the data IDs etc.
https://cdn.rawgit.com/ArduPilot/ardupi ... tocol.xlsx

1 5007 contains the battery capacity and is supposed to be sent 3 times at "init" (arming?)
2 5005. The vert speed is coming from somewhere :) I asumed it was from the 5005 ID which contains both horiz and vert speeds . . .

Let me know when the next test build is available and I will be happy to check it and give you feedback.

.rs
Mike,
Just noticed that there is a reported error in the protocol spreadsheet for 5004 (home) which could explain missing/incorrect data being displayed. See details here:
https://discuss.ardupilot.org/t/publish ... rror/22819

.rs
S500 + Pixhawk 1 clone + Mauch PM + C&T Telemetry adapter + 9XR-Pro (Taranis gimbals)/XJT/X8R
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ardupilot protocol choices for frsky telemetry

Post by MikeB »

OK thanks, I've changed the source code so it will be in the next test version.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “ersky9xr”