I'm trying to use MAVLINK protocol over softserial on the Omnibus F4 Pro from Airbot using the proper informations provided by the wiki for this board.
It's running iNAV 1.9.0 firmware. MAVLink protocol on softserial.
It seems to work, i'm getting correct datas from GPS, altitude, heading but i'm getting fluctuating values for VBAT & CURRENT, even though CURRENT sometimes is accurate.
Is there a recommendation about using MAVLINK over softserial?
Do you get correct readings of VBAT and CURRENT in Configurator?
Yes, it's perfect in the GUI and OSD.
But it's not accurate over the MavLink Telemetry.
I bench tested iNav's mavlink over a hardware UART (in order to remove any deficiencies in the transport from the test; SPRF3, hardware UART / 57600 baud). Voltage (and all other data) is completely stable.
Ran the test for 600s (10min), receiving 21985 Mavlink messages at 1051 bytes/sec. 0 CRC errors.
It appears that iNav's Mavlink is stable, where the data link can cope and the receiving application behaves appropriately. Whether soft serial is happy sustaining 1051 b/s is another matter.
@blackmennewstyle what baud rate do you use for MAVLink telemetry on SoftSerial? Softserial is increasingly unreliable when you go higher speeds and bigger chunks ok data.
9600-19200baud is usually ok. 57600 - might be ok. 115200 is usually a no-go.
Interesting feedbacks.
I'm currently running 19200 bauds. I will try to slow it down and let you know the results.
I just tried with 9600 bauds and the problem remains the same.
The datas are all over the place and inaccurate when the quad is armed.
As soon as i disarmed, the datas are good but and display the exact values with the GUI at this exact moment.
By the way in the CLI, when i perform set telemetry_switch=ON and save.
I stop receiving telemetry whatever the quad is armed or not.
Mavlink / SS will not work at 9600, it cannot sustain the rate (1050 bytes/sec).
At 9600, I see at around 5% CRC error, presumably due to data overruns.
2018-04-15T11:40:09+0100 Comm error count 244
2018-04-15T11:40:09+0100 MAVCRC Fail, got 0 != 1c4 (cmd=74, len=20)
2018-04-15T11:40:10+0100 186s, rx 150045b, tx 306b, (805b/s, 2b/s) messages 4978
With softserial at 19200 baud, mavlink is stable and sustainable, no errors. Consistent reception of data.
Tested on SPRF3 (for what it's worth)
Thanks for the feedbacks!
The value for VBAT is innacurate and fluctuates whatever the baudrate that i use :'(
It's possibly an issue related to my UHF system. I'm using the DragonLink V3 which supports MAVLink protocol. Maybe i need to to dig more in that way.
Thanks for your time anyway.
I don't think this is an iNav issue; with a direct connection, VBAT is consistent even when I'm dropping frames at 9600 baud.
Dragonlink is probably not a transparent link - it probably does MAVLink decoding at air side, transmits over the air using it's own packed protocol and reconstructs MAVLink on ground side (that would I would do if I would develop an LRS).
I got it working guys :)
Indeed problem was in my DragonLink settings configuration. My bidir bandwith was way too slow and my RF update preference also, i set everything to fastest update rate. And now my values are accurate and consistent.
Thanks for the help. You can close this issue :)
I found the reason and solution for it as well!
Mavlink won't work if your Softserial's RX and TX are configured on the same resource.
I looked into the source code of Mavlink, and it opens a bidirectional connection, which means that the same resource pin works as input and output at the same time.
I changed the configuration in my target.h to have different resources for my Softserial and Mavlink started working well on my Matek-F11 WSE on TX2 pin
WooHoo, now I'll have telemetry on my Qczek LRS =)
hi , i wanted to know if i can connect raspberry pi to omnibus f4 pro using mvalink??
Sure you can, but not using iNav.
iNav can only send telemetry via MavLink, but Ardupilot can do it bidirectional.
11 мар. 2020 г. 22:21 Gunesh Shanbhag notifications@github.com написал(а):
hi , i wanted to know if i can connect raspberry pi to omnibus f4 pro using mvalink??
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
I found the reason and solution for it as well!
Mavlink won't work if your Softserial's RX and TX are configured on the same resource.I looked into the source code of Mavlink, and it opens a bidirectional connection, which means that the same resource pin works as input and output at the same time.
I changed the configuration in my
target.hto have different resources for my Softserial and Mavlink started working well on my Matek-F11 WSE on TX2 pinWooHoo, now I'll have telemetry on my Qczek LRS =)
how did you do this?
I am not a developer, detailed instructions would be appreciated!
You need the source code of this repo.
Locate your target MATEKF411SE and in the target.h
#define USE_SOFTSERIAL2
#define SOFTSERIAL_2_TX_PIN PA2 // TX2 pad
-#define SOFTSERIAL_2_RX_PIN PA2
+#define SOFTSERIAL_2_RX_PIN PB10
made respective changes, so replace SOFTSERIAL_2_RX_PIN with LED pin
Build and flash a new firmware.
Most helpful comment
I found the reason and solution for it as well!
Mavlink won't work if your Softserial's RX and TX are configured on the same resource.
I looked into the source code of Mavlink, and it opens a bidirectional connection, which means that the same resource pin works as input and output at the same time.
I changed the configuration in my
target.hto have different resources for my Softserial and Mavlink started working well on my Matek-F11 WSE on TX2 pinWooHoo, now I'll have telemetry on my Qczek LRS =)