Flysky AFHDS 2A, protocol as used i10, i6, iT4,

More
07 Mar 2018 09:44 #67947 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Hi QBA, I expect the flit10, is just basically a shrinked original design. (not sure though)
It in now on a betaflight 3.3, which is not yet finished build, so can flash your file.

The question can Deviation display al this stuff? Will probably be able to flah benctest during the weekend.

Please Log in or Create an account to join the conversation.

More
12 Mar 2018 07:47 #68022 by qba667
@Fernandez it looks the same - but without shield, I still prefer X6B - but so far I have no time to hack firmware allowing telemetry.
Deviation right now can handle just few sensors - none from custom neuroses added by me. I am thinking about port of Deviaiton to I6X - so maybe then all custom telemetry can be added.

Please Log in or Create an account to join the conversation.

More
18 Mar 2018 14:49 #68183 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
I have connected betaflight 3.3 setup telemetry with dioode and 10k and configured, but I think nothing is being decoded.
Would be great if we can get at least Vbat working over betaflight ibus, as now only get the 5v Rx voltage wich is pretty useles.

Please Log in or Create an account to join the conversation.

More
18 Mar 2018 14:52 - 18 Mar 2018 14:52 #68184 by goebish
You must be doing something wrong because bf vbat telemetry over ibus is working, except on 7e because there's not enough flash space to handle complete telemetry.
Last edit: 18 Mar 2018 14:52 by goebish.

Please Log in or Create an account to join the conversation.

More
22 Mar 2018 10:54 #68269 by qba667
As @goebish wrote it should be fine - I have looked at the source you should see. The improved implementation of telemetry for cleanflight/betaflight made me can be also used - just connect telemetry serial and skip for while channels data.

Please Log in or Create an account to join the conversation.

More
17 Nov 2018 18:09 #71778 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Just been flying today with Flysky via IBUS and deviation LQI forwarding then OSD displayed in Betaflight it worked really well, very smooth and quite linear with the range.

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 09:53 #76103 by markxr
Hi,

I'm developing my own receiver for AFHDS 2A, and I've got it (almost) working, I'm now trying to implement telemetry.

The messages in this thread, and the Deviation source code, have been extremely helpful in doing this, so thank you everyone who's reverse engineered it.

Does anyone have an SPI dump of a transmitter or receiver doing a bind?

I can see that the rx (TGY-iA6C) sends a "bind response" packet, possibly on every channel. Deviation does receive this (first byte is 0xbc) and uses it as a signal to exit bind mode.

But my receiver is sending this packet, but my tx doesn't see it, and stays in bind mode. So I'm doing something wrong.

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 10:03 - 25 Mar 2020 10:06 #76104 by goebish
Here is a capture of a bind sequence:
www.dropbox.com/s/d341a7gyuunrcw6/A7105%20decode.zip?dl=0

I already wrote an AFHDS-2A RX some time ago for the Multi Protocol Module but telemetry is not implemented since this protocol is used for wireless master/slave training with OpenTX:
github.com/pascallanger/DIY-Multiprotoco...AFHDS2A_Rx_a7105.ino
Maybe this can be useful for your project, note that the AFHDS2A_Rx_build_telemetry_packet() function has nothing to do with AFHDS-2A telemetry, it only sends received channels data to OpenTX.
Last edit: 25 Mar 2020 10:06 by goebish.

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 10:29 #76105 by markxr
Thank you for very helpful help. I am frankly amazed that I resurrected a thread dormant for 15 months and receive such a useful response in 15 minutes!

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 10:48 #76106 by markxr
Following up on the various SPI dumps,

Do we know why the firmware writes 38 bytes into the A7105 tx buffer, even though the packets are only 37 bytes long, and it only reads 37 bytes?

Is there some special magic I don't understand (I'll be honest, the A7105 datasheet leaves a lot to be desired!)

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 10:53 #76107 by goebish
no idea, I didn't know the Rx doesn't read the last byte (always 0x00)

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 11:02 #76108 by markxr
Also, the radio packet size is set to 37 (hex 25) so the radio only actually sends 37 bytes (I think) - so the extra byte never even gets sent through the air...

I saw the Deviation code does this too, but I never understood why, I guess it's just replicating the behaviour of the commercial firmwares?!

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 11:05 - 25 Mar 2020 12:08 #76109 by goebish
Exactly, it just replicates the spi dumps, the only thing I modified is the 1 MHz RX / TX channel offset that's set by default.
Last edit: 25 Mar 2020 12:08 by goebish.

Please Log in or Create an account to join the conversation.

More
26 Mar 2020 15:21 #76114 by markxr
Thank you, goebish and the Deviation TX developers, for reverse engineering this protocol.

With help from these SPI dumps and the Deviation source code, I've successfully developed my own receiver with telemetry! It works with the Turnigy Evolution TX and I'll soon test it with others. There is no way I could have done it without your prior work.

Please Log in or Create an account to join the conversation.

More
22 Jul 2023 05:43 #78294 by emalagon
Hi I'm new here, I was searching for the source code of the AFHDS2A RX protocol. @markxr is it possible to get a copy of your source code? Thank.

Please Log in or Create an account to join the conversation.

More
22 Jul 2023 15:50 #78295 by markxr

Please Log in or Create an account to join the conversation.

More
22 Jul 2023 19:07 #78296 by emalagon
Thank you very much.

I'm working on a multifunction unit for an old 1/14 scale truck. I had an old MFC from Tamiya but it looks like something made in the middle of the 80's. So I decided to remove it to put something with more features. Unfortunately the market is dominated by quads, planes and helicopters. If I want something more sophisticated I have to go DIY. I have a few prototypes but I'm still planning it. Your code can save me a lot of time.

Thanks.

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum