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

Spektrum Avian ESC Telemetry and Forward Programming #173

Open
QuPsi opened this issue Sep 30, 2024 · 7 comments
Open

Spektrum Avian ESC Telemetry and Forward Programming #173

QuPsi opened this issue Sep 30, 2024 · 7 comments

Comments

@QuPsi
Copy link

QuPsi commented Sep 30, 2024

No description provided.

@AndersHoglund
Copy link
Contributor

This would require the full SRXL2 bus master protocol in RF and this is not made public by Spektrum. We only have a subset supporting incoming data from Receivers, no support for output to ESC, servos etc.
Spektrum has published protocol support for SRXL2 bus slave only, not bus master. Specifically, spm_srxl_master.h is not available. Fwd programming protocol is not published either.
https://github.com/SpektrumRC/SRXL2

@QuPsi
Copy link
Author

QuPsi commented Nov 1, 2024

Yes, I spoke with some Spektrum guys... Forward Programming is definitely an internal secret sauce. That said, textgen is possible for remote programming on the ESC (this is a nice to have but really not that important).

Also, Ikon has figured out how to get telemetry data from Avian ESCs. I don't know how Ikon got telemetry working, but here's some documentation showing that they have.

From what I'm understanding from Spektrum, it needs to be plugged into a UART port. Given that the ESC is powering the servos and unit, I'm thinking plugging it into the S. BUS port would be the best option.

https://updatebrain.mshbrain.com/software/README_for_ESC_datas_log_and_telemetry.pdf

Seems like there's documentation for how to send telemetry via SRXL2.... Need to figure out how to get the telemetry data from the ESC and then transmitted through SRXL2.

https://github.com/SpektrumRC/SpektrumDocumentation/blob/master/Telemetry/spektrumTelemetrySensors.h

@robthomson
Copy link
Contributor

I suspect we can get help from frankie on this.. Will link him on as he knows the fwd programing well.

@frankiearzu
Copy link

frankiearzu commented Nov 1, 2024

This is what i have documented about the FP protocol.. have to update a few other things that i found, but has the basics:
https://github.com/frankiearzu/DSMTools/blob/main/DSM%20Forward%20Programming/Docs/DSM%20Fwd%20Prog%20Protocol.md

The challenge to use it for 3rd party flight controllers is that all the text displayed on the screen is part of the TX firmware. The protocol only send the message# to display for Menus or text values. This is to allow localization of messages in different languages.

On Spektrum TX, is part of the firmware, so a 3rd party cannot add new messages.. You probably will have to piggyback on existing messages.

On EdgeTX, i have all the messages in a file "msg_fwrdp_en.txt" for the english language messages (inside DSMLIB).
https://github.com/frankiearzu/DSMTools/blob/main/DSMTools-src/edgetx/src/SCRIPTS/TOOLS/DSMLIB/msg_fwdp_en.txt
(lines who start with LT=List Text.. text for value with text name, T=Text for menus

Thats why TextGen is probably more atractive for 3rd party, since the Text comes as part of the protocol message (8 lines, 12 chars).. Like what LemonRX did to configure its new RX with Gyro.

As for how the data is transported from TX->RX.. the TX sends up to 12 bytes of data on a frame instead of CH data (can be looked in the multimodule source code).. usually something like (data to send: 0x01 0x02 0x03 0x04 0x05 0x06).... encoding in the frame: 0x70 0x01 0x71 0x02 0x72 0x03. etc. Receiving data is done via Telemetry frame I2C=0x09.. Up to 12 bytes

Example of Frame Transmited (from TX): 0x58010BF47014710672107300740075010000B2000000422FFF7F
Example of Frame Received : 0x0005B209030010001CF900101000000000030001000000BF7200

Example of menus from my LUA RX simulator:
https://github.com/frankiearzu/DSMTools/blob/main/DSMTools-src/edgetx/src/SCRIPTS/TOOLS/DSMLIB/DsmSimMenuLib.lua#L48

@AndersHoglund
Copy link
Contributor

We already have SRXL2 based Telemetry output via Rx, but no tm sensor input from any SRXL2 sources. Like ESC etc.
And we already do TextGen based "Fwd Programming". CMS is using this, and TextGen can only be used by one function/device. Same as any TM sensor unfortunately, Spektrum do not support multiple sensors of the same type.
/A

@AndersHoglund
Copy link
Contributor

An Implementation of the real Fwd Programming protocol would be nice, as a complement to TextGen based CMS. But that would require doing the server side of FP. Current Lua implementation is client side. But I am not sure this is meaningful to do. FP only handles known (by Spektrum) entities, hard coded strings etc in the Spektrum Txs. Will be hard to map all RF specific config items to the items Spektrum knows about. But of course, we could do RF specific things in a Lua client and the firmware server using FP protocol. But that will not work with std Spektrum Tx, only with EdgeTx/Ethos etc Txs with Lua support.
/A

@AndersHoglund
Copy link
Contributor

The SRXL2 bus master subset we have in BF/RF was done by @MiguelFAlvarez , a Spektrum dev. Maybe ping him to do the full protocol stack for Avian ESC support.
/A

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

4 participants