Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MSP over TCP #26

Open
ykeuter opened this issue Jan 31, 2023 · 0 comments
Open

MSP over TCP #26

ykeuter opened this issue Jan 31, 2023 · 0 comments

Comments

@ykeuter
Copy link

ykeuter commented Jan 31, 2023

The MultiWii Serial Protocol is the main communication protocol used by all Betaflight derived flight stacks. It’s a binary message based protocol used for control, telemetry and sensors. It normally communicates over a serial port. An example open source C++ implementation can be found here: https://github.com/christianrauch/msp.

For the purpose of SITL simulations, it would be nice to use MSP over TCP (instead of a serial port). This is also the default setting when building the Betaflight SITL target, in which case communication is over TCP port tcp://127.0.0.1:576x.

As a workaround, one can use socat to connect a TCP port with a pseudo serial port (e.g. in combination with https://github.com/christianrauch/msp). Ideally though, we would have a clean C++ implementation to achieve this.

Since Betaflight implemented this solution for their SITL target, we can take a look at their code for inspiration: e.g. tcp_serial.c and the msp folder.

Ultimately, we would like to have a ROS2 node publishing and subscribing to MSP messages, with the option to transfer over either TCP (for SITL) or a serial port (for HITL). An example of this for the serial port version can be found here: https://github.com/christianrauch/multiwii_ros2.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant