Adding MAVLINK support

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

Hello,

I have spent weeks now trying to get any telemetry to work with openlrs and my 9xtreme board. I have come to the conclusion that frsky will not work using just the radio and flight controller output without having actual frsky hardware, if this is incorrect please let me know! So I have been searching and reading through this mavlink thread and it looks like it might be my best option. I have flashed my 9xtreme to the latest rom (221a4) but do not have a malink option in the radios telemetry settings. When I use eepsky I do have a mavlink option in the telemetry tab, but if I try to save the setting it just reverts back to frsky auto or winged... Am I incorrect that mavlink is working and available for 9Extreme modded radios?

Thank you so much for any help. This is been a frustrating and learning experience being the newbie that I am. I will most definitely make a contribution if I dont smash this dang thing first! :)

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

Re: Adding MAVLINK support

Post by MikeB »

Does your flight controller have an option to send the telemetry as FrSky hub data (not SPort data)?
If so, then set it that way and try setting the the "Usr Proto" to "HubRaw".

I haven't enabled raw mavlink telemetry on the 9Xtreme as I can't test it. I could enable it, would you be prepared to test it and help get it sorted?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

I would absolutely test and give you feedback... I am running Inav fork of cleanflight. with a sp racing f3 controller.. .as far as I am aware the only frsky option is just that.. frsky... I dont believe any of the cli variables change it to hub data...
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

I just looked up "Cleanflight Telemetry". It seems to indicate it uses "hub" format. To use SPort telemetry what I read indicates you would need to do some hardware modifications.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Adding MAVLINK support

Post by Kilrah »

Cleanflight supports both Hub (FrSky) and S-Port telemetry. S-Port was added around last spring, no idea if iNav has pulled the functionality.

wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

I am pretty certain Inav does support SPort. My Wolfbox UHF module also has a jumper for sprt which I believe is also sport. If I get sport working should this work without having frsky specific hardware, so just the flight controller output over sport to the 9xtreme etc..? Should I work on getting sport working over testing mavlink? I have verified a solid two way connection over mavlink already but will go any route you suggest or would like.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

If you want to send the telemetry WITHOUT a FrSky receiver, then you need the HUB telemetry. SPort only work with a FrSky receiver as the receiver polls (asks) the flight controller for the telemetry data, the flight controller does not send it otherwise.
With the HUB telemetry, the flight controller should just send a serial data stream. If you transfer this to the Tx over the openlrs link, then select "HUBRAW" as the "Usr Proto", you should receive the telemetry.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

OK, and on openlrs I have a serial baudrate and a data rate. My understanding is the data rate needs to be at 9600 and serial I can leave at default 115200?
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

That just worked! That is so crazy, I kept trying frskyhub and frsky auto etc... never tried the raw... Thank you so much.
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

So I have done more testing and it is displaying data. But the numbers are jumping from what looks like might be correct to way out. From things I have read I'm wondering if maybe this is a loose connection with the 9xtreme board or something... I do have two quads with identical setup's and would still be willing to test the mavlink stuff if its an option and might make things easier.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Yes you do need the baudrate at 9600 from the openlrs to the radio. If the flight controller end is sending data faster than that, you may be getting lost data, which could give the symptoms you describe. Can you set the flight controller to send at 9600 also?

Check this post: viewtopic.php?f=7&t=8396&start=510#p122795. If you still have problems, try creating a logfile with the raw telemetry data in it.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

Here is a log file. it is all garbage looking, I assume it should show normal values in here... I changed the flight controller from auto baud to 9600... openlrs serial baud is 115200 and datarate is 9600.
Attachments
Discovery-2017-01-12.zip
(4.26 KiB) Downloaded 274 times
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

I have tried many more combinations of things. I have set both serial baud and datarate to 9600. also tried auto and 9600 on my flight controller. I at times get some data in the log file and then garbage. should it be all data or does the raw logging add the stuff I cant read? Another thing that i've noticed is when I touch or move my RX/TX that I currently have ran to the outside of the radio I will get a signal loss. I've redone the connectors, but its like there is interference from the radio. I have lowered my output power in openlrs and it doesnt seem to change it.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Looking at the raw data, it is in full frsky format, not the raw hub format, so, it should work if you set the Usr Proto to "FRSKY" (the first option).
Make sure all the baudrates are at 9600.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein »

Did someone test the x9e firmware ?
I' m having some issues with the switches and telemetry is not showing data.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Please be more specific, what issues are you having with the switches?
Are you using mavlink telemetry, if so, how are you connecting it up?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
wildcat801
Posts: 9
Joined: Wed Dec 28, 2016 7:01 pm
Country: -

Re: Adding MAVLINK support

Post by wildcat801 »

I have finally got it working completely, well except for setting up voice alerts! Thank you again for your help. What finally worked is on openlrs set both serial and data rate to 9600 (not sure if both have to be but its working this way) then in INAV/Cleanflight I had to turn frsky inversion OFF. In the ports tab I am using a soft serial with serial port on set to 9600 and frsky set to 9600. I also turned output cell voltage on, in ersky9x I have frskyauto selected and com port inverted not checked.

I now have full frsky telemetry displaying on my Turnigy 9x with 9Xtreme board using only a WolfBox UHF TX/RX. The only limitation I have so far is I cannot use sbus or sumd at the same time so I am limited to 12 channels, but I may play with this later.

Thank you Mike for your assistance!
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein »

I'm using an ardruino mini that was working previously on a 9xr. it is not showing telemetry on the X9e
When I'm trying to setup a mix on some switches the output is not equal to the stick movement.
examples
switch SF retuns: off position = SF / on position SG(up)
Switch SH shows: off position = L1 / on Position =L2
Switch SG returns: off position = SG(mid) / mid position = SG(up) / up position = SH
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Was that a 9XR or 9XR-PRO? Are you using the the internal XJT and a 'X' receiver (and were using a XJT and 'X' receiver before?
What revision of firmware do you have on the X9E?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein »

used before 9xr-pro with XJT module and X8R receiver,
on x9e I use the internal module and I loaded latest revision R221a4 (03-Jan-17)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Are you seeing values on RSSI and RxV (you may need to put a ratio value in for RxV on the telemetry menu - 13.2V)? These come directly from the receiver.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Are all the switches reporting correctly in the "DiagSwtch" display?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein »

DiagSwitch looks ok to the stick movement .... I receive RSSI and RX
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

How are you using the switches? Are you using them as mix sources?
What setting do you have for the "Usr Proto" in the telemetry menu?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein »

Telemetry Setting - ArduC, ..... I'm using them as source to setup logical switches and on mixes to change a source Input (example thr curve)
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein »

i can now receive telemetry .... it was an issue with the Mission planner setting
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

Ok good for that.

I've tried using SF and SH as mix sources, and as switches in mixes and both work correctly (X9E with the same firmware you are using).
Please backup your EEPROM, put it in a .zip file, and post it for me to look at/try.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
humphrey111
Posts: 1
Joined: Fri Feb 03, 2017 10:25 pm
Country: -

Re: Adding MAVLINK support

Post by humphrey111 »

I have successfully setup my 9x to receive mavlink using 4refr0nt's method (https://github.com/4refr0nt/er9x-frsky-mavlink).

The er9x version that 4refr0nt' used is now pretty old. I know MikeB has done some more development on this but it seems that Mega128 is required for all of it.

Are there any m64 forks that have updated er9x with MikeB's new telem screens? Is there newer code for the arduino mini as well?

I've read through alot of these forums and I don't see anything for M64, so I'd thought I'd ask. Thanks.

Edit: too much thread hopping, didn't realize this was ersky9x topic.
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis »

Mike I have been thinking about how to integrate your arduino making converter into apm and I got thinking about the 32u that's on the apm as a usb:serial and ppm encoder.

On most apms the ppm encoder can bypassed by soldering a jumper pad on the bottom freeing it up.

So my thought was if i could load your telemetry converter onto the 32u then it would do away with the need for the separate arduino.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

I don't have the hardware to try this, but you can find the source code here: https://github.com/MikeBland/APM_Mavlink_to_FrSky.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “erskyTx (was ersky9x)”