Use as a transparent serial bridge?

I’m wondering if anyone has used Meshtastic to create a serial bridge between nodes. Similar to what can be done with an XBee3.

Specifically, I’m looking to configure these to send Mavlink messages between several ArduPilot vehicles. I know that it won’t be a high speed link, I’m just looking to get some basic telemetry at a long range.

Most people use the “SiK Telemetry Radio” with Ardupilot right now, but they’re pretty crude. It’s just a simple 57600 baud serial radio.

Doing what I want is totally possible with the python API, but I wanted to see if anyone else has done something similar first.

3 Likes

heh! I know mavlink well. I used to do a substantial amount of software work for the ardupilot project (I wrote the original dronekit.io, droneshare and andropilot, and did a fair amount of futzing inside mavproxy). I also did some code inside the SiK microcontrollers for their RF95 usage.

Alas - I was chatting about this recently with Tridge and I think the latency and super low bandwidth of LoRa (but also super low power draw and high range) are not ideal for most ardupilot applications. But for a very low speed backup/long range link I think it might be useful. Especially because these radios are tiny tiny and need virtually no power. But if you did want to do this, you’d probably want to put MAVLINK on as datagrams, not as a serial stream - and filter to only send a few critical packets and limit to a max of about one packet every few seconds.

5 Likes

Wow! What a coincidence.

I was planning on only sending the “high latency” messages which are intended for low bandwidth / high latency links. Primarily Iridium.

HIGH_LATENCY2 is supported in QGroundControl and PX4, but not ArduPilot yet.

I’m working with a surface vessel, so a position update every minute would be sufficient.

2 Likes

then I bet it might be a good fit. I’m happy to help with any questions if you start futzing with the code.

I too would like a serial bridge over LoRa/meshtastic like that. Lots of technical equipment I come in contact with at work use serial, usually 9600,8,n,1 for status messages/log printing etc. I’d love a cheap way to aggregate these outputs without depending on very expensive GSM units with subscriptions. If anyone knows of a plug and play solution, please let me know.

1 Like

Alas - meshtastic is probably not a great fit for that (because very datagram based).

Perhaps a bit late, but the EByte UART Modules are working fine 1:1.
T20D Series.

2 Likes

Interesting, I’ll have a look.
What I need is a rs232 and rs485 input to lora mesh and back to rs232.
the mesh part is imporant, as there is a lot of geography in the way in my area.

Ideally I would like to combine my private meshtastic interests with my proffessional interest (so my work can co finance and expand my network)

We used 2 T20D to connect a Raspi (serial console) to PC. The T20 takes the serial stream, wraps it in packages of i believe 56 bytes and sends it over the air. On the receiving end it takes the LoRa packets and outputs Serial data (UART). You have 2way communication if you connect all tx/rx to Raspi/PC.

You even can take a 868 T20D, connect the serial RX/TX to TX/RX of a 433 T20D and have a bridge to another frequency. What doesnt work so well imho is the mesh part you required. In the sense of meshtastic mesh,

The T20D are made to be transparent. You can setup some settings but its not like you get a mesh out of the box. You can hardwire groups, and you can use stations of 2 T20D to have a relais network.

1 Like

Hi
I new on this forum and would also be very much interested in a high latency telemetry link with ardupilot. I would like to receive regularly the position and yaw of up to 6 drones and if needed would like to upload a new waypoint from the GCS.
Is there some Git work for this where I could contribute?
The following work goes in the same direction:


Thanks
1 Like

oh yes - I think (once the general API feature which I’m working on soon - design doc here) is in then this mesh might be ideal for ardupilot/mavlink. It should be fairly easy to write a mavlink aware (throttling/filtering) adapter that accepts/sends mavlink over a serial port but uses the mesh for transport.

(btw: I used to be one of the core ardupilot devs.
Though I haven’t been doing drone stuff the last few years - I wrote Andropilot, droneshare and the dronekit python API)

3 Likes

Thanks for the design doc. This looks like exciting work!

Would it not make sense to use the mavproxy to translate the mavlink
messages to a more simple payload and send only this specific payload
over a lora network?
For example one would send only Lat/lon/height over telemetry and
mavproxy would translate this to the mavlink sequence of the complete
mission upload for the flight controller.
In the same manner the mavproxy on a companion computer would translate
Yaw, speed, lat/lon etc. to a very simple payload for transmission and
the mavproxy on the GCS would translate it again to the proper mavlink
messages?

An other question:
Have you ever considered adapting a dual radio configuration? I am
asking since we have in Europe quite crippled restrictions:

  • in the 2.4GHz Band only 20dBm with FHSS allowed. Without FHSS there is
    a duty cycle restrictions or one has to use <10dBm.
  • in the 868MHz Band only 14dBm with duty cycle restriction around 0.1
    to 1%. Exception the 869.4-869.65MHz Band with 27dBm and 10% duty cycle
    restriction.
    Therefore I am thinking of having a dual telemetry radio with the SX127x
    and the SX128x Lora Chips for Swarm applications.
    In closer range all traffic would go over the SX128x chip and for the
    once far away the code would switch to the SX128x chip.
    What do you think?
    Thanks

Can I nudge this topic, I am in need of some MAVLINK messages moving over a mesh covering quite a distance.

Hi Gary, since mavlink is packet based with a nicely documented set of packets, I think rather than a general serial tunnel:

A mavlink plugin (probably based on @mc-hamster serial plugin) could be written. Since drones generally have perfect LOS a pretty fast channel setting could be used. This could have a lot of cool side effects:

  • Replace the common ‘3dr’ modems with this software that automatically forwards through a mesh.
  • Since it knows mavlink it could auto throttle / drop most of the redundant mavlink packets and ensure high priority mavlink gets through
  • The mqtt gateway stuff could provide web connectivity

I’d love to help with this someday but alas my personal meshtastic task queue has about three more months ahead of it. If anyone else wants to work on this I can offer tips.

1 Like

No dramas, I can wait. I think it would be somewhat popular… Oh and chucking out the odd OGN message as it went would be perfect!

1 Like

I am heading down the long-range mavlink rabbit hole and for anyone else looking that might not have found it. http://www.kopterkraft.com/index.php/hyracom Does not look like LoRA

1 Like

if meshtastic provides packet-based messaging with a serial input, what kind of performance can be expected with reasonably good radio visibility between nodes?

I don’t need Ardupilot or mavlink interoperability.

Lora mesh messaging from multiple nodes (say, 5 or 6) to a single base node is the use case.

metrics:

  1. max bytes per message
  2. max messages per second, or N seconds?
  3. typical latency for a single hop message
  4. bandwidth reduction for multi-hop cases (typically 50% drop per hop)
  5. relationship between Lora bits per second and range?

are these numbers posted somewhere? I’m just now studying meshtastic technicals.

Still have my heavily modded 3DR solo drones, thanks for you work :slight_smile:

Max packet size is about 238 bytes, settings are going to affect all the other questions, the new long fast default in 1.3 is a pretty good compromise of speed and distance.

Is there any progress on a mavlink plugin for meshtastic?
This would be particularly interesting with the SX1280 on 2.4GHz and maybe with expressLRS hardware.