Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode Multi Telem Packets to Frsky Telem Packets #104

Open
ampmam opened this issue Jan 28, 2021 · 2 comments
Open

Decode Multi Telem Packets to Frsky Telem Packets #104

ampmam opened this issue Jan 28, 2021 · 2 comments

Comments

@ampmam
Copy link

ampmam commented Jan 28, 2021

Since the Radiomaster TX16S has uninverted UART it eliminates the need for an inverter cable, it would be good to decode Multi Telem Packets to Frsky Telem Packets when using Internal Multi Procotol module with Frsky protocol. Here are my two use cases one working and another not working.

  1. I am on OpenTX firmware 2.3.11
  2. Bluetooth HC05 is configured for the baud rate 115200 using Arduino
  3. Bluetooth HC05 is connected on UART1. Enabled HARDWARE>Max bauds 115200, Serial port (TTL) Telem Mirror in Radiomaster Tx16S. (benefit of using UART port in TX16S, it does not need inverter cable)
  4. When I use R9M, I get full telemetry data on the Telemetry Viewer app but when I use Internal RF Multi Frsky D16, I do not get any telemetry data on the "Telemetry Viewer" app. I tried changing the baud rate from step 2 to 57600 but no luck.

As I posted my issue in the Opentx Github, it was suggested that using the internal MPM Frsky D16 protocol, the Telemetry Viewer app is unable to strip multi telem packets, probably the developer can look into this.

@porlock
Copy link

porlock commented Feb 27, 2021

Any update on that ? had the same issue.

@Maarten112
Copy link

Maarten112 commented Oct 29, 2021

I noticed the same today and have been busy lately with checking the packets that the multimodule outputs. FrSky Sport frames are almost the same, but slightly different. It is explained in https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Multiprotocol/Multiprotocol.h starting on line 1160.

MultiModule S.Port protocol frame explanation

  • First byte: 0x02 [a S.Port telemetry frame received by a multimodule will get a byte with 0x02 in front of it (Type 0x02 Frksy S.port telemetry)]
  • Second byte: 0x09 [frame length of payload]
  • Third byte: 8 bit Sensor ID [original Start and stop byte (0x7E) from the usual s.port frames are stripped by the multimodule.]
  • All other frame data is the same as on the non modified S.port telemetry frames:
    [0x10 8 bit frame header] - [value_type 16 bit] - [ value 32bit] - [ checksum 8 bit]

This is a capture of a MultiProtocol S.Port Telemetry Frame:

MultiModule S Port telemetry frame

With this information, it's really easy to adjust the currently used decoder in https://github.com/CrazyDude1994/android-taranis-smartport-telemetry/blob/master/app/src/main/java/crazydude/com/telemetry/protocol/FrskySportProtocol.kt

Updated code
All the decoder code is there already, it should only be adjusted to reflect a different START_BYTE (0x02), skip the next byte and parse the rest like normally. Datastuffing can be ignored, since multimodule S.port telemetry doesn't use it!

I'm available for testing! Just contact me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants