Frsky Telemetry with PX4 flight controller

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
Post Reply
spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Frsky Telemetry with PX4 flight controller

Post by spinorkit »

Hi,
I started using the PX4 firmware on a PixHawk flight controller a few years ago. I had it wired up to transmit FrSky D-type telemetry back to my 9XR Pro.
Early in 2016 the PX4 developers changed the format of the Frsky telemetry a bit, as far as I can see to send the flight mode back as TEMP1 data and the number of gpd satellites and fix as TEMP2 data. A comment in the code implies these changes are compatible with OpenTX & APM. They now use a Lua script on the Taranis running OpenTx to display this telemetry info.

Since this change my 9XR Pro just reports "No telemetry".

I am trying to decide the easiest way to fix this (short of buying a Taranis). The options would seem to be to build a version of the PX4 firmware that supports the old format or build a version of ersky9x that supports the new format. I have not built PX4 since they stopped supporting Windows. I have never built ersky.

The changes in the format consist of a change in the order some frame 1 values are sent, and sending TEMP2 (for the GPS info) that was not send in the old (working) format.

Would the ersky code be sensitive to the order?
Would the addition of the TEMP2 value be problematic?
Would different (possibly out of range) values for TEMP1 and TEMP2 cause ersky to report "No telemetry"?

I'm running Vers: V.1760-Mike ersky9x-r220
I tried setting UserProto to ArduP instead of FrSky, with no luck.

Many thanks,
Kit

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Frsky Telemetry with PX4 flight controller

Post by spinorkit »

After getting a development environment working for the PX4 firmware, I did some debugging and found the problem was in the PX4 firmware where it was trying to auto-detect whether the telemetry was SPORT or D-type. It was always failing to detect D-type telemetry.
I now have a fix for that problem - a command line switch to force the telemetry type on start up.

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

Re: Frsky Telemetry with PX4 flight controller

Post by MikeB »

Might be better to fix the actual detection so it is automatic in future!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Frsky Telemetry with PX4 flight controller

Post by spinorkit »

That's what Lorenz just suggested I do. But I don't understand how the autodetection would ever work with my D8R-IIplus (which is flashed with the D8R xp firmware) since it relies on serial data coming out of the receiver to detect the baud rate etc and there is none.
Would the Taranis be generating that data and sending it over the telemetry link?

Thanks,
Kit
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Frsky Telemetry with PX4 flight controller

Post by Kilrah »

The D system does not have a radio->receiver serial port uplink capability, only the X system does.

Maybe you can exploit that and consider that if nothing's received you're on D. On X the receiver polls so stuff comes in.

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Frsky Telemetry with PX4 flight controller

Post by spinorkit »

Thanks for the info.
I was considering just running the code that looks for the SPORT data and timing out after a while and dropping into D mode.

However, someone has gone to the trouble of writing a function especially to detect the presence of D type telemetry by looking for a "D-type header" which looks like it contains link quality and ADC info on the rx serial line.
So presumably that worked for some Frsky system.

I will look in the repo and find out who wrote that.

Post Reply

Return to “ersky9xr”