Page 16 of 20

Re: Adding MAVLINK support

Posted: Wed Sep 28, 2016 10:10 am
by MikeB
I've done another commit, this one should return a RSSI value, when operating in the Tx. I can't test it though as I don't have anything that will send an RSSI value!

Mike.

Re: Adding MAVLINK support

Posted: Wed Sep 28, 2016 2:45 pm
by Geofrancis
MikeB wrote:I've done another commit, this one should return a RSSI value, when operating in the Tx. I can't test it though as I don't have anything that will send an RSSI value!

Mike.
if its just apm you are using for testing then just enable the rssi pin and connect it to either ground or 5v to test 0 and 100%

what about using RSSI for rc rssi and SWR for telemetry rssi?

Re: Adding MAVLINK support

Posted: Thu Sep 29, 2016 6:55 am
by Geofrancis
How did you test the raw output if the adapter?

Re: Adding MAVLINK support

Posted: Thu Sep 29, 2016 8:43 am
by MikeB
First on a 'scope, then I have an APM board (no GPS etc.) I can connect to the arduino, then the Arduino output directly into the SPort input on a Tx.
I've only learnt enough about the APM board (so far) to get it to send telemetry data for basic testing. I need to look up how I could configure it to handle RSSI.

Mike.

Re: Adding MAVLINK support

Posted: Thu Sep 29, 2016 9:08 am
by Kilrah
In an APM setup there may be a large number of different RSSIs, that can be reported differently and may or may not be accessible depending on the particular hardware and software combination and configuration.

You'll never get around this without enough details from the requesters about what exactly they are looking for.

Re: Adding MAVLINK support

Posted: Thu Sep 29, 2016 6:25 pm
by Geofrancis
I haven't tested your latest code but people are saying it's not working. http://www.rcgroups.com/forums/showthre ... st35842653

Re: Adding MAVLINK support

Posted: Thu Sep 29, 2016 7:32 pm
by MikeB
The non-polling version is sending hardware ID 0x98, the polling version responded on hardware ID 0xBA. I used the 0x98 value to be the same as that sent by a XJT.
On the Taranis, with openTx, it may be necessary to "Discover Sensors" again if they are on a different hardware ID.
Maybe I need to use 0xBA.

This is a single change in the source file "Aserial.cpp":

Code: Select all

		  case TRANSMIT_STOP_BIT:
				if ( TxCount >= 16 )
				{
					if ( TxCount == 16 )
					{
						SwUartTXData = 0x98 ;
change the 98 to BA.

It worked on ersky9x.

Mike.

Re: Adding MAVLINK support

Posted: Fri Sep 30, 2016 6:08 am
by djvdberg
Morning all,

First of all WOW, thanks Mike for the time and effort and everybody for testing this!

Now I'm not a noob when it comes to RC/Hacking, but you have me stumped here, I've read through all the threads and still missing how this is all configured/connected??

Can someone please take the time to run me through this, I can allso maybe do some writeup in terms of a quick start guide with pics etc..

All I want to do is:
-- Have telemetry sent from quad/plane via fsrky rx to Frsky tx
-- On the Tx send Telemetry data to tablet for Tower app via bluetooth

I'm using the 9XR Pro with DJT tx module and D8RII rx, so..

-- What firmware do I flash? Links?
-- What connection do I make on the plane/quad from pixhawk/apm to Frsky Rx? Arduino? Firmware Links?
-- What changes do I make on 9XR to send APM telemetry via bluetooth?
-- Can I use built in Bluetooth, if so how?

So for now I'm not even interested in showing anything on telemetry screen, just want Mavlink data to avoid using 3DR radios.

Thanks in advance guys, I'm hoping somebody can spare some time to assist, next question will be to do exactly the same but with orangelrs radio's with openlrsng, but I'll leave that for a separate question. And then third question will be to actually show stuff on telemetry screen, but let's separate these.

I can help with a quick start guide with all the options/links/pics etc and then maybe post it in the original post for any new guys?

Thanks!
Dion

Re: Adding MAVLINK support

Posted: Fri Sep 30, 2016 7:22 pm
by Geofrancis
Mavlink cannot be used over frsky rc.

You would have to use an UHF system that supports it like Openlrs, dragonlink v3 or tbs crossfire.

Re: Adding MAVLINK support

Posted: Fri Sep 30, 2016 9:43 pm
by MikeB
djvdberg wrote:I'm using the 9XR Pro with DJT tx module and D8RII rx, so..

-- What firmware do I flash? Links?
-- What connection do I make on the plane/quad from pixhawk/apm to Frsky Rx? Arduino? Firmware Links?
-- What changes do I make on 9XR to send APM telemetry via bluetooth?
-- Can I use built in Bluetooth, if so how?
Latest test versions of ersky9x are here: viewtopic.php?f=7&t=4676
To use FrSky Rx, you need an Arduino to convert APM Mavlink to FrSky telemetry, source files on Github here: https://github.com/MikeBland/APM_Mavlink_to_FrSky.
With the Arduino, the telemetry arriving at the Tx is in FrSky format, so it is not possible to then send APM telemetry out from the Tx.
As Geofrancis said, you would need a Tx module and Rx that passes the raw APM telemetry to the Tx.
There is a thread about adding a bluetooth module, including the 9XR-PRO, here: viewtopic.php?f=122&t=5641&hilit=instal ... 05+9xr+pro.

Ersky9x does have an option to send out all received telemetry data to such a bluetooth module. It is sent exactly as received.

Mike.

Re: Adding MAVLINK support

Posted: Sat Oct 01, 2016 6:20 am
by djvdberg
Ok thanks guys, see I was under the impression you can "encode" mavlink to frsky, send it, then "decode" it again from frsky to mavlink, and send via bluetooth..?

So how is it done with openlrs module?

Thanks guys, appreciated!

Dion

Re: Adding MAVLINK support

Posted: Sat Oct 01, 2016 7:36 am
by Kilrah
OpenLRS is set to transmit data transparently like 3DR radios would.

Re: Adding MAVLINK support

Posted: Tue Oct 04, 2016 3:45 pm
by samys13
hi mike i saw last week end that Alt and gAlt on the handset are not in meters but decimeters with mavlink.
my RTL mode is set to stand at 100 meters and there was 1000 on the screen.

Sam

Re: RE: Re: Adding MAVLINK support

Posted: Tue Oct 11, 2016 7:52 am
by samys13
samys13 wrote:It works [emoji2]
ImageImage

Envoyé de mon GT-I8190 en utilisant Tapatalk
Hi mike i don't know why but rssi never change and always stay at 100%
Thanks
Sam

Envoyé de mon GT-I8190 en utilisant Tapatalk

Re: Adding MAVLINK support

Posted: Sun Oct 23, 2016 10:39 pm
by gyrex
Hi guys,

I'm completely new to the FPV world and I'm about to start my first FPV build and I'm hoping one of you guys could please help me with my question :)

I've bought a Turnigy 9XR Pro and I'll build some Ultimate LRS (ULRS) mini's (https://www.rcgroups.com/forums/showthr ... ?t=2037442) for Tx & Rx. I'll be running a 2.4GHz relay on the ground station for RF separation and so that I can have my kit in a case. I've got a FrSky DJT Tx module for the 9XR Pro and an FrSky D4R-II as the receiver. Here's a diagram of my intended solution.

Image

Is this possible with ersky9x? Can the ersky9x firmware read/interpret Mavlink telemetry natively?

Thanks for your help guys and I'm sorry if this question has been answered previously but it's not entirely clear to me.

Re: Adding MAVLINK support

Posted: Sun Oct 23, 2016 11:35 pm
by MikeB
Yes, I now have Mavlink telemetry being processed in ersky9x. You will probably need to use the ULRS to get the telemetry transferred, the D4R-II to DJT telemetry link does not really have the bandwidth to handle the raw Mavlink data.

Mike.

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 6:51 am
by gyrex
MikeB wrote:Yes, I now have Mavlink telemetry being processed in ersky9x. You will probably need to use the ULRS to get the telemetry transferred, the D4R-II to DJT telemetry link does not really have the bandwidth to handle the raw Mavlink data.

Mike.
That's brilliant news Mike! So I don't need an Arduino to convert Mavlink to FrSky? Re bandwidth: I don't mind if the telemetry is delayed by using the FrSky relay - can I still use the solution above if I'm happy to have some latency?

I see there's quite a few variations of the test firmware, which version do I need to run? Thank you so much for all your hard work on this project.

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 8:29 am
by MikeB
It's not so much a delay as the link just can't transfer all the data fast enough. If you are using the FrSky telemetry link, then you will need to use an Arduino to convert the data from Mavlink to FrSky.
Use the most recently dated test version unless it is specified as being only for a specific test.

Mike.

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 12:23 pm
by gyrex
Thanks Mike. Once again, I apologise if my questions are stupid but I'm still trying to wrap my head around this. Are you saying that FrSky telemetry capable Tx & Rx devices such as the DJT/D4R-II can't carry Mavlink data? So a solution such as this won't work?

Image

And I have to implement a solution such as this with an Arduino mavlink->frsky converter between the ULRS mini & FrSky rx?

Image

I was hoping to keep the solution as clean and as simple as possible for obvious reasons :)

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 1:32 pm
by MikeB
I'm unclear why you do need two RF links. My understanding is you can put the ULRS in the Tx and that handles both control and telemetry. You don't show how the controls are sent to the aircraft.
You last diagram will work for the telemetry.

Mike.

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 5:47 pm
by gyrex
MikeB wrote:I'm unclear why you do need two RF links. My understanding is you can put the ULRS in the Tx and that handles both control and telemetry. You don't show how the controls are sent to the aircraft.
You last diagram will work for the telemetry.

Mike.
I don't *need* 2 RF links. Having the FrSky 2.4GHz relay means I can:

1. Put all of my FPV equipment into a single postable case and have some portability with the transmitter.
2. Or if I'm doing closer range flying, I can mount the FPV monitor on my monitor stand with the vTx & antenna velcro'd to the back and I can have some decent separation between the UHF gear and my vTx gear.

The FrSky relay just gives me more flexibility with my gear basically :) Does that make sense?

So you're saying that the 1st diagram won't work but the 2'nd should? In any case, I'll try both of them out and see what happens. I don't know nearly as much about telemetry or anything FPV as you obviously do, but I thought that if the 9XR Pro can read Mavlink telemetry data then either solution should work? Unless the FrSky D series gear can't transmit Mavlink data?

Mike, do you accept beer donations for your work on the firmware? Also, do you know if OpenTx can read Mavlink data too or is it only ersky9x?

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 5:59 pm
by MikeB
The second diagram should work fine.
I understood openTx does support Mavlink data directly.
Note that the FrSky 'D' telemetry does not pass the serial data completely transparantly. It packs the serial data into FrSky packets and needs to be 'unpacked' in the Tx.
The serial port on the 'D' Rx runs at 9600 baud, but the telemetry link cannot handle 1000 bytes per second, only much less (probably not even 500).

I don't fly FPV, nor do I actually use Mavlink.

Mike.

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 6:37 pm
by gyrex
MikeB wrote:The second diagram should work fine.
I understood openTx does support Mavlink data directly.
Note that the FrSky 'D' telemetry does not pass the serial data completely transparantly. It packs the serial data into FrSky packets and needs to be 'unpacked' in the Tx.
The serial port on the 'D' Rx runs at 9600 baud, but the telemetry link cannot handle 1000 bytes per second, only much less (probably not even 500).

I don't fly FPV, nor do I actually use Mavlink.

Mike.
Gotcha - now I understand why the first solution wouldn't work. Thanks for explaining this to me :) Does the same packing and unpacking process of the serial data occur on the FrSky X series gear as well?

9600 baud.. geez, takes me back to circa 1994 days with my trusty old dialup modem. Admittedly, my 9600 baud modem was an enormous technological leap from my 2400 baud modem :) I can understand how there's not enough bandwidth to push any decent amount of telemetry data through that pipe.

I'll try and find a Mavlink to FrSky arduino conversion project for my D series gear.

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 6:41 pm
by MikeB

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 7:22 pm
by gyrex
MikeB wrote:Mine is here: https://github.com/MikeBland/APM_Mavlink_to_FrSky.

Mike.
Wow Mike, the amount of work you've done for the community is outstanding! Thank you so much mate.

Does this work for DJT/D4R-II gear? If it does, this is exactly what I'm after! Is there a thread or webpage with info on the project?

BTW, you might want to fix the typo on the project heading so people can find it with a google search. "Arduino Pro Mini convert MAVLINK data to FrSkt protocol"

Re: Adding MAVLINK support

Posted: Mon Oct 24, 2016 9:18 pm
by MikeB
There should be some info earlier in this thread.
It supports both hub 'D' and SPort 'X' telemetry protocols.

Mike.

Re: Adding MAVLINK support

Posted: Fri Oct 28, 2016 9:30 pm
by GhostSharp
Hi Mike,

I just flash the nano board... I was looking for into code the pin that i must solder in nano board for connect to sport.... I dont sure.... Is Pin D5 -> Signal Port?

Thanks and great work!

Re: Adding MAVLINK support

Posted: Fri Oct 28, 2016 9:49 pm
by MikeB
Yes, port D bit 5. It is I/O 5 on the Pro Mini.

Mike.

Re: Adding MAVLINK support

Posted: Sun Oct 30, 2016 8:45 am
by gyrex
Mike, what serial baud rate will the arduino be able to sync with on the Mavlink input side? Apparently ULRS transmits at 115200 baud.

Sent from my LG-H815 using Tapatalk

Re: Adding MAVLINK support

Posted: Sun Oct 30, 2016 10:29 am
by MikeB
It is set to 57600.

Mike.