This container runs the mLink software for the mBot robot platform, allowing communication between mBot hardware and programming environments.
To build the container image:
podman build -t mlink-mbot .podman run -d --name mlink-mbot \
--privileged \
-p 7413:7413 \
--device=/dev/ttyUSB0 \
mlink-mbotReplace /dev/ttyUSB0 with the actual device path of your mBot. You can find this by running ls /dev/tty* before and after connecting your mBot.
To automatically detect and mount all USB devices:
podman run -d --name mlink-mbot \
--privileged \
-p 7413:7413 \
--mount type=bind,source=/dev,target=/dev \
mlink-mbotThe mLink service will be available on port 7413. You can use mBlock 5 or other compatible software to connect to the mBot through this port.
podman stop mlink-mbotpodman rm mlink-mbotIf you encounter issues connecting to the mBot:
- Make sure your mBot is connected to your computer and powered on
- Verify that the correct device is passed to the container
- Check the container logs for error messages:
podman logs mlink-mbot
- Try restarting the container:
podman restart mlink-mbot
This container uses the --privileged flag to access USB devices. For production environments, consider using a more restricted approach by mapping only the specific devices and capabilities needed.