USB mavlink tethering

Hello. I need to share mavlink from herelink via USB without 5GHz hotspot.
If I use WiFi hotspot then everything works as expected, but while using USB tethering i cannot get this working.

In herelink USB Tethering is enabled, in my linux-mint machine, new ethernet interface appears, and herelink assigned me IP: 192.168.42.112. When running route -n command i can see that herelink gateway is 192.168.42.129, Using wire shark i can see that Herelink sends me some data on port 14551

In QGroundControl on my linux machine I cannot connect to Vehicle. My Comm link configuration is:

I also tried pymavlink python script and all i can get from herelink is HEARTBEAT some time sync, command long and bad data. (I requested telemetry streams in my code)

When using 5GHz hotspot, then telemetry sharing works fine, but for our design we cannot use 5Ghz hotspot, USB tethering only.

i have a few question about your setup.
when you say tethering, usb? or via usb to ethernet?

also the wireshark capture looks like it sending to your machine on many random ports, but originating from 14551?

depending on how you want it to work, you could modify mavlinkrouter to output the telemetry to anywhere you want.

1 Like

I have connected herelink via USB directly to my laptop that is running linux-mint. Then
I enabled USB tethering in herelink android settings -> hotspot settings -> USB tethering. That caused my linux-mint machine to detect new “virtual” ethernet port called enp0s20u1. So It works simillar to how you can share internet connection on android phones via USB. So far so good. I thought It can work just like sharing mavlink via 5GHz wifi hotspot, where I can connect to herelink in Eavesdropping mode on port 14551, unfourtunetly that’s not the case. I thought that mavlink-router is configured in such a way:

[UdpEndpoint bravo]
Mode = Eavesdropping
Address = 0.0.0.0
Port = 14551

Judging from HEARTBEAT that i was able to receive, it is coming from QGroundControl running on herelink (mavtype=6 => [MAV_TYPE_GCS]) not from the vehicle.

Can you tell me how I could change mavlink-router settings? Can I login somehow via SSH and change main.conf file?

use adb, not ssh.

using adb you can run
“adb root”
then
“adb shell”
and change anything you want.
be warned you can break things

Thank You. Warning understood. I’ll try to change some things, and give feedback if it worked.

Can you tell me where I could find mavlink-router configuration file? I’m looking for almost an hour without any luck.

these commands:

find / -name *.conf*
find / -name *router*
find / -name *mavlink*

are not giving anything useful.

I was able to figure out that mavlink router is sitting in /system/bin/mavlink-router.

Hello @Michael_Oborne ,
First of all thank you for the Mission Planner, you are letting us fly for years. Most of us owe this experience to you and the community!

When I try to adb root I am having “adbd cannot run as root in production builds” warning. Is the rooting not a thing anymore (After May2020 update)?

Thanks.

2 Likes

the new path for custom mods is to use the OEM image.


and yes, root has been locked down, but we still offer methods to get your custom apps on it.

also depending on why you need root, let us know. as we might be open to giving/grant access to these option as needed. IE the remote unit is locked down, and you have the ability to add app’s. the air unit is still a free for all.

Thank you for your answers Michael. I have already done with oem image and editing QGC according to our needs.

I am trying to add usb sound card to the air unit with OTG and make 2 way audio transfer. Do you think is it doable with android app on air unit?

Thanks.

To be honest, I am trying to do it for almost 2 years… I have attached additional module for audio transfer (temporary workaround). I couldn’t figure out how can I develop on air unit. Is there any guide for that? one ‘‘hello world’’ example would be great :slight_smile:

the air unit requires c++ programming, and knowledge of the device being used.

i do know we are looking at this in the background for a request we had. (it might have been you?)
we are progressing, but kernel changes require a lot of validation to ensure it doesn’t negatively effect other aspect of the system

If the request delivered to Alvin and he is frustrated from someone… Yes! It is definitely me.
I can imagine the required hard work for that. There is a project due and I know the lock down on HK that is why I am trying to figure it out by my self instead of bothering you more.

@Michael_Oborne

I was expecting that the MavLink would be automatically redirected to USB port when selecting thetering from this port… It is not the case ?

you need to initiate. so 192.168.42.129 port 14552

its only broadcast on the wifi ap mode

this has to do with the default broadcast address as well as the default route

1 Like

@Michael_Oborne Thanks for your prompt answer.

I have 2 PC
A) Mission Planner 1.3.73 == cannot connect UDPCI
but can connect mavproxy --master=udpout:192.168.42.129:14552
and can cinnect QGC @ 192.168.42.129:14552

B) Mission Planner 1.3.73 == can connect UDPCI

Made some more test with mavproxy this afternoon

Here is the Vehicle definition from Mavproxy on PC A where I cannot connect with MP
image

Here is the Vehicle definition from Mavproxy on PC B where I can connect with MP

@Michael_Oborne added comment on wiki

my guess for your failure here is around having multiple network adapters on your windows machine

or windows firewall

Then why is mavproxy and QGControl can connect ?

Anyway I use mavproxy to redirect to UDP 14560 so MP can connect