Adding MAVLINK support

ersky9x is 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 » Wed Jan 11, 2017 9:52 pm

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Wed Jan 11, 2017 11:20 pm

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.
ersky9x/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 » Thu Jan 12, 2017 12:36 am

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Thu Jan 12, 2017 10:48 am

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.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
Kilrah
Posts: 8914
Joined: Sat Feb 18, 2012 6:56 pm
Country: United Arab Emirates

Re: Adding MAVLINK support

Post by Kilrah » Thu Jan 12, 2017 1:56 pm

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 » Thu Jan 12, 2017 7:03 pm

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Thu Jan 12, 2017 7:21 pm

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.
ersky9x/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 » Thu Jan 12, 2017 7:57 pm

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 » Thu Jan 12, 2017 8:03 pm

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 » Fri Jan 13, 2017 12:53 am

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Fri Jan 13, 2017 1:01 am

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.
ersky9x/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 » Fri Jan 13, 2017 1:23 am

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 7 times

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

Re: Adding MAVLINK support

Post by wildcat801 » Fri Jan 13, 2017 2:47 am

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Fri Jan 13, 2017 12:08 pm

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.
ersky9x/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 » Fri Jan 13, 2017 7:17 pm

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Fri Jan 13, 2017 10:56 pm

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.
ersky9x/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 » Sat Jan 14, 2017 12:09 am

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 » Sat Jan 14, 2017 9:22 am

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Sat Jan 14, 2017 9:48 am

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.
ersky9x/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 » Sat Jan 14, 2017 10:05 am

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: 14033
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Sat Jan 14, 2017 10:13 am

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.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

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

Re: Adding MAVLINK support

Post by MikeB » Sat Jan 14, 2017 10:22 am

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

Mike.
ersky9x/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 » Sat Jan 14, 2017 10:42 am

DiagSwitch looks ok to the stick movement .... I receive RSSI and RX

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

Re: Adding MAVLINK support

Post by MikeB » Sat Jan 14, 2017 10:49 am

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.
ersky9x/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 » Sat Jan 14, 2017 11:01 am

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 » Sat Jan 14, 2017 11:48 am

i can now receive telemetry .... it was an issue with the Mission planner setting

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

Re: Adding MAVLINK support

Post by MikeB » Sat Jan 14, 2017 11:53 am

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.
ersky9x/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 » Fri Feb 03, 2017 11:03 pm

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.

Post Reply

Return to “ersky9x”

Who is online

Users browsing this forum: No registered users and 1 guest