ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Add RockBlock SBD satellite modem support

Open stephendade opened this issue 3 years ago • 9 comments

This PR adds support for sending & receiving very basic MAVLink telemetry via a RockBlock SBD satellite modem.

It will allow for literal worldwide telemetry coverage for any vehicle fitted with the aforementioned modem.

The modem bandwidth is very low (~50 bytes per 20sec or so), so I've deliberately limited what can be sent and when (1 HIGH_LATENCY2 packet every 20 sec). I did have to trim the message down (remove MAVLink header and compatibility flag, with are restored at the gateway) a little to keep within 50 bytes.

Requires https://github.com/stephendade/rockblock2mav at the GCS end to send and receive packets.

This PR is WIP, as it requires a bit more testing.

stephendade avatar Jun 29 '22 03:06 stephendade

Happy to assist anyone who wants to test this too

stephendade avatar Jun 29 '22 03:06 stephendade

why sending as Mavlink2? this will never be signed, and mavlink1 has a smaller header

auturgy avatar Jul 04 '22 00:07 auturgy

why sending as Mavlink2? this will never be signed, and mavlink1 has a smaller header

Good point - MAVLink1 is just smaller enough (50 bytes for a HIGH_LATENCY2 message, compared to 52 bytes in MAVLink2) to not require chopping the message up.

I've now updated the PR to use MAVLink1

stephendade avatar Jul 05 '22 00:07 stephendade

More updates:

  • I've removed the requirement for a second serial port. So only a single scripting port is required.
  • Incoming message CRC check added
  • Fixed issue where incoming messages would sometimes generate errors

Fairly close to being finished at this port. I intend to start real-life testing with a Cube Orange this week.

stephendade avatar Jul 23 '22 07:07 stephendade

This has been successfully tested on a Cube Orange flight controller.

stephendade avatar Jul 31 '22 01:07 stephendade

We do also have https://github.com/ArduPilot/ardupilot/pull/13660 that has been sat for a while.

I did look at that previously. It doesn't do what I need, though. I need to send/receive MAVLink packets through a scripting UART, whereas that PR sends/receives MAVLink packets through a MAVLink UART.

stephendade avatar Aug 01 '22 00:08 stephendade

Sorry, I have not looked at the script in great detail. How does the script interface with ArduPilot? Could it be done in lua stand alone? It looks like there is some command long/int stuff?

IamPete1 avatar Aug 01 '22 01:08 IamPete1

Essentially, I want to send and receive a limited set of MAVLink messages over a scripting UART. Only need to send the HIGH_LATENCY2 message and then receive COMMAND_LONG/INT messages.

The fun part is I need to send AT commands before and after each MAVLink message, so the Lua MAVLink functions should accept/return an array of bytes that I send/receive from the scripting port.

EDIT: Any received COMMAND messages need to be executed by ArduPilot the same as if they were received over a MAVLink port

stephendade avatar Aug 01 '22 01:08 stephendade

If we were to add a method to forward on command messages into ArduPilot then everything else could be done in lua? Of course the script would be more complex without the C++ helpers, but then we only pay that if your using the script, the extra bindings cost flash for everyone. Looks like this about ~2.3K.

IamPete1 avatar Aug 01 '22 11:08 IamPete1

Closing this, as there's a replacement at #22861.

stephendade avatar Feb 08 '23 04:02 stephendade