Is there any API for the MessagePack protocol used for the Remote Terminal? The Server-Side API lists how to connect to the websocket, but lists no information about how to interact with the open terminal.
Unfortunately it is not documented in a human friendly form, just as source code. I have it on my todo list to improve on it.
In the meantime, maybe @joelguittet can get you started a bit, as he worked out the protocol for the mender-mcu-client implementation?
Sure! As you understood @dburns the communication over the websocket interface is done using msgpack standard (https://msgpack.org/) which is convenient to serialize and deserialize objects. The official msgpack GitHub proposes several implementation depending of the langage targeted (go, java, c…)
The official mender is using go on both the client and server side. An object called “ProtoMsg” is serialized and depending of the content you can perform remote terminal, file transfer, etc.
As indicated by @TheYoctoJester I m working on this to be integrated in the mender mcu client I have done. The msgpack stuff is already there, written in C. I m just finalizing the websocket part for esp-idf and zephyr, things are going slow due to summer vacations but this should be merged in the mender mcu client with examples available by mid september. Check it at : add-on: integration of Device Troubleshoot by joelguittet · Pull Request #14 · joelguittet/mender-mcu-client · GitHub
In the meantime if you have a detailed question about the ProtoMsg object I m pleased to answer you !
Note : I just realized maybe your question was related to the server side and a way to interact programmatically with the remote terminal from a CI/CD or similar. Independently of the msgpack content itself I’m not sure it s possible to do it, maybe @TheYoctoJester you know that?