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

More
20 May 2017 07:38 #62426 by goebish
Yes, it should work with any output type.

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

More
20 May 2017 16:10 #62445 by Arise
Can somebody explain how the AFHDS 2A protocol works and what is different from first version of AFHDS?

I'm not that interested into telemetry stuff and sensors yet, more want to know about the RX part.

Any source code available to try to learn from it in order to make my own rx for example?

There are multiple receivers on the market already (micro/mini receivers), I think some of those could be used and re-programmed with a solid firmware that does everything, and when I say everything it means AFHDS2A/iBUS/failsafe/RSSI. No stupid things like pwm or ppm communication or failsafe over pwm only (really flysky X6B?).

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

More
20 May 2017 16:14 - 20 May 2017 16:15 #62446 by goebish
it's completely different from AFHDS, making Rx code shouldn't be very difficult tho (just time consuming), you can take a look at the SPI dumps in the first pages of this thread, and the Tx code:
github.com/DeviationTX/deviation/blob/ma...ysky_afhds2a_a7105.c
There's no other documentation ;)
Last edit: 20 May 2017 16:15 by goebish.

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

More
20 May 2017 16:41 #62447 by goebish
Might be a good idea to send your rants to Hobbyking, maybe Turnigy/FlySky could fix that in a further firmware update.

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

More
21 May 2017 09:19 #62465 by Paulnea
I did some investigating and found I had jumped the gun on the "full range" statement. Turns out as you say the mcu controls the switching of the antennas by controling a AS197 spdt switch that is contained on the rf board of the module. When connecting the module as you would if it was the xl7105 there is 2 contacts rf0, and rf1 left floating. These 2 contacts are normally tied to the mcu directly and lead to the AS197. According to the AS197 truth table one can be high while the other low and is the only state allowed. Alternating high, low, low, high is how the antennas are selected. I can confirm the behaviour when left floating causes the range to be very low. I tied one high and the other low and now have range comparable to my ia10 even though it is only running off 1 antenna. Now I just need to figure out how to control them in software. Any hints Fernandez, or Goebish?

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

More
21 May 2017 10:54 - 21 May 2017 11:24 #62466 by goebish
With the xl7105 we use A7105 registers 0x0b & 0x0c to control A7105 GIO1 & GIO2 pins, that we connect to RXEN & TXEN on the A7700 PA/LNA, switching from LNA (Rx mode, for bind and telemetry packets), to PA (Tx mode).
see: github.com/DeviationTX/deviation/blob/ma...ocol/spi/a7105.c#L82
Not sure how this is controlled in the flysky/turnigy module ...

To control the RF switch you'd have to find 2 free GPIOs on the Devo STM32 mcu, connect them to RF0 & RF1, configure them as push pull outputs ( embedded-lab.com/blog/stm32-gpio-ports-insights/ ) then edit the afhds2a protocol so it has this behavior:
www.deviationtx.com/forum/protocol-devel...4?limitstart=0#44007

... I'd just keep it as you already did and use only 1 antenna ;)
Last edit: 21 May 2017 11:24 by goebish.

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

More
21 May 2017 11:47 - 21 May 2017 11:48 #62469 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
As the TX also receives telemetry, you could possibly switch to the other antenna inside the Tx when Rx telemetry strength received is below some threshold. Assuming that when you receive strength is at the highest antenne in Tx, this antenna probably best oriented, and may also create best pointing towards the model for transmission? Indeed different oriented antenna to be used?

Just FYI;
Have a look at this Jeti ds-24, they put two 2.4ghz module each with diversity antenna, in addition they put a 900mhz fhss.
www.google.nl/url?sa=i&rct=j&q=&esrc=s&s...ust=1495453349015055
Last edit: 21 May 2017 11:48 by Fernandez.

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

More
04 Jun 2017 18:51 #62824 by joloebig
Thx for you work goebish,
have tested today the telemetry, works for V-all cells, v-intern, rpm (sensors are very bad) and temp.
in the temp indication is the value 10times to high. so a comma (point) or the indicated value/10 is needed.

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

More
04 Jun 2017 19:10 #62827 by goebish
Thanks for the report, I don't have a temp sensor so I couldn't check that.
I'll divide the value by ten.

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

More
08 Jun 2017 04:35 #62884 by magic_marty
Replied by magic_marty on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Is the nightly build working for the Flysky X6B receiver? And more importantly if it is working does the telemetry also work?
Thanks all..

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

More
08 Jun 2017 06:49 #62885 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Yes tested!

You can use the vbat port, Allcell field can be used to setup low battery.

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

More
08 Jun 2017 06:56 #62886 by magic_marty
Replied by magic_marty on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
RSSI working as well?

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

More
08 Jun 2017 07:29 #62887 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Yes, but according Qoebish the LQI, value is possible a better way to indigcate the signal reliability, both are available.

I have now several flight and no dropouts or issue, I think that Flysky Frsky are now the cheap option to go ! also ibus works fine betaflight on any uart, no inversion needed.

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

More
08 Jun 2017 16:32 #62893 by magic_marty
Replied by magic_marty on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Crazy question but what is LQI ? I don't understand exactly what it is and why i never heard of it before on any other transmitter..Is it just a Deviation thing ?

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

More
08 Jun 2017 16:34 #62894 by goebish
Link Quality Indicator, I used this field from the FrSky telemetry model, but it is named "Error Rate" on actual AFHDS-2A transmitter.

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

More
08 Jun 2017 16:38 #62895 by magic_marty
Replied by magic_marty on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
Ok so it shows signal strength and the higher the better..
Thanks

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

More
08 Jun 2017 16:51 - 08 Jun 2017 16:52 #62896 by goebish
Signal strength is RSSI actually (the lower the better as it's shown as a positive number), but I think error rate is a better indicator.
Last edit: 08 Jun 2017 16:52 by goebish.

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

More
15 Jun 2017 05:35 #62998 by magic_marty
Replied by magic_marty on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
I think i need to update the firmware on my x6b rx cause it has the no failsafe issue using ibus..Is there a easy way to do the update or should i just dump it and get the updated version with the failsafe issue fixed.. www.undergroundfpv.com/products/flysky-x6b?variant=33011865796

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

More
15 Jun 2017 06:57 #63000 by Fernandez
Replied by Fernandez on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
earlier post in this topic, describe how to flash and update the ia6b receiver using ST-link dongle, possibly it can be done on this RX too.
However someone must download the latetst firmware form the x6b Rx and post it? Possibly firmware between the ia6b are same?

But are you sure it doesn't work properly? You need to set the failsave value per channel in the model channels setup....

I would love to have a failsave feature in deviation, just put sticks in desired positons press button and strore/set failsave, but is not the case here.
(Also a button press store failsave is not available at the RX itself)

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

More
15 Jun 2017 07:03 #63001 by magic_marty
Replied by magic_marty on topic Flysky AFHDS 2A, protocol as used i10, i6, iT4,
github.com/povlhp/FlySkyRxFirmware

Setting failsafe in the tx won't work using Betaflight cause the flight controller looks for the input signal to drop and when turning off my tx all the channels remain and don't move..If the throttle would drop when turning off the tx like it should then the flight controller would trigger failsafe and disarm the motors other wise it will just fly away..

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

Time to create page: 0.097 seconds
Powered by Kunena Forum