I’m working to improve a mavlink to rest api tool, it provides any message and any valid element thanks to rust-mavlink library.
There is binaries available to download for MacOS, Linux (x64, ARM) and Windows, it’s also possible to install via cargo command line.
You can get useful information and a list of available messages:
Cool. I am working on something a little similar (with pymavlink and bottlepy) but very specific to Rover and my coding skills are ordinary so we will see where it goes. I’ll be keeping an eye on yours for ideas!
Hi @patrickelectric was keen to try this out tonight as it looks like it could be very helpful. I compiled this on my pi from cargo. I can get the webserver to run but it does not seem to access any mavlink data. I have attached a screenshot first of successful connection with mavproxy, then to mavlink2rest.
Going to web server loads webpage but does not seem to have any mavlink data.
Thanks for your feedback, I have added a new option mavlink for you to specify which version of mavlink do you want to use, but by defualt is still mavlink 2.
I also have done a new release with this feature (0.6.0), it’s available in github and via cargo.
mavlink2rest (0.9.0) now supports websockets, it support multiple websockets and a regex filter for the client to not receive undesirable messages. E.g: /ws/mavlink?filter=^RC will match RC_CHANNELS_RAW and RC_CHANNELS, and /ws/mavlink?filter=RAW$ will match SERVO_OUTPUT_RAW and RC_CHANNELS_RAW.
With this feature it’s possible to receive messages asynchronously and messages that are necessary to be processed multiple times, like PARAM_VALUE after PARAM_REQUEST_LIST.
mavlink2rest (0.10.0) now supports bidirectional websocket, can be used to receive and send mavlink messages over it, this makes the API more flexible without the necessity to handle multiple endpoints. Windows binaries are back and available for download.
I have been working in a web based GCS to demonstrate some cool functionalities with mavlink2rest, hope to share it soon.
mavlink2rest supports multiple connection methods, so it’s not restricted to any hardware or operating system.
You can use it with UDP, TCP, serial or just a simple file, one of these is probably supported by any hardware that you want to try. I have used it with pixhawks, SITL, telemetry files, ardupilot linux and arduino running mavlink.