Page 19 of 20

Re: Adding MAVLINK support

Posted: Wed Jan 11, 2017 9:52 pm
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! :)

Re: Adding MAVLINK support

Posted: Wed Jan 11, 2017 11:20 pm
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.

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

Posted: Thu Jan 12, 2017 10:48 am
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.

Re: Adding MAVLINK support

Posted: Thu Jan 12, 2017 1:56 pm
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.

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

Posted: Thu Jan 12, 2017 7:21 pm
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.

Re: Adding MAVLINK support

Posted: Thu Jan 12, 2017 7:57 pm
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?

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

Posted: Fri Jan 13, 2017 1:01 am
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.

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

Posted: Fri Jan 13, 2017 2:47 am
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.

Re: Adding MAVLINK support

Posted: Fri Jan 13, 2017 12:08 pm
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.

Re: Adding MAVLINK support

Posted: Fri Jan 13, 2017 7:17 pm
by thartenstein
Did someone test the x9e firmware ?
I' m having some issues with the switches and telemetry is not showing data.

Re: Adding MAVLINK support

Posted: Fri Jan 13, 2017 10:56 pm
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.

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 12:09 am
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!

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 9:48 am
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.

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 10:05 am
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)

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 10:13 am
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.

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 10:22 am
by MikeB
Are all the switches reporting correctly in the "DiagSwtch" display?

Mike.

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 10:42 am
by thartenstein
DiagSwitch looks ok to the stick movement .... I receive RSSI and RX

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 10:49 am
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.

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 11:01 am
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)

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 11:48 am
by thartenstein
i can now receive telemetry .... it was an issue with the Mission planner setting

Re: Adding MAVLINK support

Posted: Sat Jan 14, 2017 11:53 am
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.

Re: Adding MAVLINK support

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

Re: Adding MAVLINK support

Posted: Fri May 05, 2017 7:36 am
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.

Re: Adding MAVLINK support

Posted: Sat May 06, 2017 7:42 pm
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.