Adding MAVLINK support

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
Brodziek
Posts: 15
Joined: Thu Mar 20, 2014 5:55 pm
Country: Poland

Re: Adding MAVLINK support

Post by Brodziek » Wed Jun 08, 2016 10:25 am

Mike is planning to release a stable version ersky9x and er9x (CPUs 128/2561) with the new screen telemetry?
Using Tapatalk


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

Re: Adding MAVLINK support

Post by MikeB » Wed Jun 08, 2016 3:02 pm

I'll try to get to a release point in the next couple of weeks.

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

tomismrkolj1
Posts: 58
Joined: Sun Jan 24, 2016 10:32 am
Country: -

Re: Adding MAVLINK support

Post by tomismrkolj1 » Thu Jun 16, 2016 8:47 pm

Hi,

Mike, did you find solution for correct value for total charge consumed. Today I was flying and APM reported 2625 mAh of total charge consumed, which is nearly the same as reported by my batt charger. However 9xr pro reported 2254 mAh. I don't know how to use scaler to correct for this differnce, because mutiplier and divisor are intiger numbers and are limited to 256.
tomi

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

Re: Adding MAVLINK support

Post by MikeB » Thu Jun 16, 2016 10:05 pm

The mAh is calculated from the current value sent by the APM. Without knowing if the current value reported is the same as the APM is using, I can't do much.
To correct the capacity, you could try scaling the current, then set the current source to the scaler.
Try a multiplier of 255 and a divisor of 219. (The 255 is close to the maximum, the 219 is 2254 * 255 / 2625 = 218.96 (so use 219).

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

tomismrkolj1
Posts: 58
Joined: Sun Jan 24, 2016 10:32 am
Country: -

Re: Adding MAVLINK support

Post by tomismrkolj1 » Fri Jun 17, 2016 4:30 am

Hi,

do you think that algorhitm for calculating mAh from current is the same in apm and 9xr pro?

tomi


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

Re: Adding MAVLINK support

Post by MikeB » Fri Jun 17, 2016 9:19 am

It may be similar, but the APM itself may have more frequent updates of changes while the 'PRO has to wait for the telemetry data to be sent to it.

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

Butchcan
Posts: 4
Joined: Wed Apr 13, 2016 11:02 pm
Country: -

Re: Adding MAVLINK support

Post by Butchcan » Fri Jul 01, 2016 12:39 pm

Has anybody tried to get simultaneous data from both tower or mp and thru the radio? Is wire splitting enough to get this done?

thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Adding MAVLINK support

Post by thartenstein » Sun Jul 03, 2016 9:43 am

Which Version of ArduCoper do you use.
It is possible that different Versions return different telemetry results ?

I've tried 2 ArduCopter Versions with different feedback.

both Show - "Armed-Disarmed" and some of the flight Modi (not Pos_Hold)
also
ArduCoper 3.1.4 - display of "SAT" and "Hdop"
ArduCopter 3.3.3 - display of "ALT" but nothing else

I'm not receiving Lat. or Lon. on both versions.

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

Re: Adding MAVLINK support

Post by MikeB » Mon Jul 04, 2016 2:36 pm

I've got something on native MavLink beginning to work on ersky9x on the 9XR-PRO. Using COM1, receive only, I've connected the output from a FC directly to the radio, pin 5 of the module connector (a limited FC, no GPS). I'm using the 'PRO as it supports non-inverted serial on the module port telemetry input connector.
I'm receiving and decoding MavLink packets, and displaying some values, although the scaling may be incorrect on some items.

If anyone is interested in helping test this, and has suitable hardware, please let me know.
I should be able to add this for other radios, although you may need a hardware inverter for the serial input.

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 » Tue Jul 05, 2016 3:37 pm

I'm away until 14th, I'd like to test it after my return
Thomas

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

Re: Adding MAVLINK support

Post by MikeB » Fri Jul 08, 2016 12:17 pm

Check out this thread: viewtopic.php?f=122&t=8972.
With the addition of a single wire, I now have Mission Planner operating using the bluetooth module in my 9XR-PRO, relaying both Tx and Rx data to the module bay pins while the radio is also processing the received MavLink messages.
I have the APM directly connected to the module bay pins as I don't have anything like OpenLrs Tx module and receiver.

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

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Mon Jul 11, 2016 8:44 am

Hi mike, i can test your last release if you want.

Envoyé de mon GT-I8190 en utilisant Tapatalk

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

Re: Adding MAVLINK support

Post by MikeB » Mon Jul 11, 2016 10:14 am

I posted a test version for the 9XR-PRO (ersky9xr_rom_mavlink1.zip) here: viewtopic.php?f=7&t=4676#p65894.
The MavLink processing is not complete (e.g. GPS is not handled yet), but the connection functionality is all present.

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

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

Re: Adding MAVLINK support

Post by MikeB » Thu Jul 14, 2016 9:53 pm

Update for the 'PRO and MavLink now posted. GPS is now processed (untested).
I've also fixed a bug when trying to use COM2 as the serial connection to the APM/Tx module.

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

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Fri Jul 15, 2016 10:21 am

I will test this update as soon as possible. Congratulation for this awesome work mike.

Envoyé de mon GT-I8190 en utilisant Tapatalk

jjhdtv
Posts: 2
Joined: Mon Jul 18, 2016 7:16 pm
Country: -

Re: Adding MAVLINK support

Post by jjhdtv » Mon Jul 18, 2016 7:38 pm

I could use some guidance in regards to the recent version of ersky9x that allows the native display of Mavlink Data. I have been keeping an eye on this develop for some time now.

I currently use my 9xr pro with the ULRS software. I pass the mavlink data from my Pixhawk/apm + Orange RX to my Orange TX module in my 9xrpro. I also have an HC06 BT connected and powered from the Orange TX module. This setup has been working. I can connect to Mission Planner and receive/send mavlink data.

Now as many others desire, I want to display the mavlink on the 9xrpro LCD screen and simultaneously send the tx/rx data to my bluetooth module so that I can connect to my ground station of choice.

Please explain how to connect the tx/rx from my orange module to the 9xrpro board. Much of the previous discussion has gone over my head. I need a few more details and pictures. I would like to grab the data lines internally and avoid external wires that exist in my current setup. Additionally, I'll need to know how to connect the BT. From the schematic of the 9xrpro board, I see the com2 port. Can I simply connect the BT tx/rx , pwr and grnd to these pins?

Lastly - I will need help with all of the setup screens in ersky9x to make all of the mavlink and BT functions work. If this information has been previously posted here or and RCGROUPS, please point there.

Thanks so much for all of the effort put towards native mavlink support.

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

Re: Adding MAVLINK support

Post by MikeB » Mon Jul 18, 2016 9:35 pm

I'm using a 9XR-PRO with the single mod of "the wire from J8 pin TX1 to the 'C' pad on the RF board". When I added the wire for the Tx signal I also included a 220 ohm resistor in series in the wire to protect the Tx signal for the case of using a FrSky XJT module that sends a "heartbeat" signal in on the pin of the module connector.

Add the bluetooth module (HC-06) to COM3, see this thread: viewtopic.php?f=122&t=5641&hilit=bluetooth#p80200. Do not use COM2.

This post has a link to how to modify the Orange LRS module to route the telemetry signals to the module connector: viewtopic.php?f=122&t=8972#p116336.

You will need to flash ersky9xr_rom.bin (from ersky9xr_rom_mavlink2.zip) found here: viewtopic.php?f=7&t=4676#p65894.

In the telemetry menu set COM1 INVERT to ON, COM1 Baudrate to whatever your LRS is using, BT Telemetry to Tx/Rx and UsrProto to Mavlk.

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

jjhdtv
Posts: 2
Joined: Mon Jul 18, 2016 7:16 pm
Country: -

Re: Adding MAVLINK support

Post by jjhdtv » Tue Jul 19, 2016 1:06 am

Thanks Mike. I'm close to understanding, but still have a few questions.
I want to make sure I understand "the wire from J8 pin TX1 to the 'C' pad on the RF board". I'm looking at the board schematics and remain confused trying located J8 pin and the C pad. Probably obvious to most, but not me.

Before I do the internal mod to the Orange module - can the futaba port be used to connect the serial tx/rx pins on the orange module to the COM 2 port on the 9xr pro?

Perhaps others have recently performed these minor mods and can post a few pics and or drawings. thanks

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

Re: Adding MAVLINK support

Post by MikeB » Tue Jul 19, 2016 9:17 am

By default the serial on the Futaba connector uses INVERTED signals. To change this to non-inverted, see this post: viewtopic.php?f=122&t=8972&start=30#p116765.

J8 is just to the right of the "EXPANSION BUS", 'C' is just beside the second pin of the module connector. I'll try to get a picture done later today.

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

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Tue Jul 19, 2016 6:36 pm

hi mike, i tried to test this new firmware but there is no data received for me. i tried both com1 and 2, inverted and non inverted, differents baudrate in the apm and in the paramater menu of telemetry, and also differents protocole in MP for the seial data of the apm, tried to connect the apm directly on the com ports of the handset, still nothing , i don't understand why. it works perfectly whith arduino anyway.

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

Re: Adding MAVLINK support

Post by MikeB » Tue Jul 19, 2016 9:23 pm

If you are using the arduino code I wrote, then that sends some "Rate Requests" to the APM to get it to send the telemetry data. The 9XR-PRO doesn't currently do this. I believe, if you use Mission planner and turn on the osd, then the APM will send the telemetry data.
When I was testing, I had Mission Planner conecting to a bluetooth module in the 'PRO, then on to the APM, so Mission Planner sent the rate requests.

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

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Tue Jul 19, 2016 9:54 pm

first of all i tried to use a hc-06 bluetooth module in the pro also, connected to com3 with apm connected to the pro in first (no response with MP) and directly to tx/rx of apm then, but still no response of MP. Is there a specified baudrate for bluetooth?

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

Re: Adding MAVLINK support

Post by MikeB » Tue Jul 19, 2016 10:54 pm

I'll look into the baudrate setting for the HC-06, it seems to be missing from the bluetooth menu when you select HC-06!

A check you can do is to go to the BT debug menu (UP LONG from the main screen, then LEFT. For the HC-06, after power on, most values displayed will be 0000, but the first one in the top left should be 4F4B.

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

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Wed Jul 20, 2016 8:51 am

I 've looked to the debug menu i have corectly 4F4B in the first line. I managed to connect to MP with bluetooth only at 19200 but needed to set the apm, MP, the hc-06, and the bluetooth receiver on the computer at 19200. However i have the flight data but can't have the parameters.

Envoyé de mon GT-I8190 en utilisant Tapatalk

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Wed Jul 20, 2016 6:30 pm

I believe my bluetooth doesnt work over 9600. I managed to connect with TOWER on android and i have all flight data and parameters. Bit still nothing on the pro with all com ports.

Envoyé de mon GT-I8190 en utilisant Tapatalk

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

Re: Adding MAVLINK support

Post by MikeB » Wed Jul 20, 2016 10:22 pm

The bluetooth baudrate setting is in the RADIO SETUP - GENERAL menu. I have mine set to 115000. This is the baudrate used on COM3 to 'talk' to the HC-06. Since you see the 4F4B (which are the letters OK), the HC-06 is working on COM3 at whatever baudrate you have set.
If you change the baudrate setting, you need to power the radio off and on for the HC-06 to accept the new setting.

If you use COM2, you could try changing the BT Telemetry setting (in the telemetry menu) to Off, then change the "COM2 Func." to "BTdirect". This simply passes all data received from the HC-06 out on COM2 and all data received from COM2 out to the HC-06.

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

User avatar
jhsa
Posts: 19019
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding MAVLINK support

Post by jhsa » Wed Jul 20, 2016 10:46 pm

MikeB wrote:The bluetooth baudrate setting is in the RADIO SETUP - GENERAL menu.
Mike, isn't this one of the settings you wanted to move to the Bluetooth menu??

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

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

Re: Adding MAVLINK support

Post by MikeB » Wed Jul 20, 2016 11:07 pm

Quite possibly, but it doesn't fit on the display with the HC-05 set so needs rather more editing and testing than simply moving it.

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

samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Thu Jul 21, 2016 4:17 pm

ok i'm done. ;) My bluetooth receiver was damaged lol. Telemetry is ok but i think there is some error with the flightmodes. For example when i set in FBWA mode on apm it display LOITER. Or maybe this is because i use arduplane and not arducopter peraps.

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

Re: Adding MAVLINK support

Post by MikeB » Thu Jul 21, 2016 5:19 pm

Yes, the flight modes will be wrong in that case. I should be able to pick up whether arduplane or arducopter is in use from the mavlink data, I'll just need to look up where it is.

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


Post Reply

Return to “erskyTx (was ersky9x)”