Serial USB checklist - stronnag/mwptools GitHub Wiki
Unmaintained Article Please check the manual for more up-to-date information.
The users using mwp (inav-configurator etc.) must be members of a group that has read/write access to the serial ports.
- On Arch (and derivatives)
uucp
- Most other distos
dialout
- FreeBSD
dialer
e.g.
# Debian et al
sudo usermod -aG dialout user_name
# or
# uucp on Arch
sudo usermod -aG uucp user_name
# user must log out and log in again
This fixes about 99% of serial issues.
Alternative, for a systemd
based distro, all the following udev
rules (e.g. add file /etc/udev/rules.d/45-stm32.rules
with content below)
UBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0660", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_CANDIDATE}="0"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0660", TAG+="uaccess"
Other points:
-
ModemManager (possibly older versions only) may interfere with the port. Either disable it or write a udev rule to avoid it
sudo systemctl disable ModemManager sudo systemctl stop ModemManager
Note this may prevent USB Mobile internet modems from working correctly
-
Some machines / distros / BIOS may cause USB autosuspend to be set. This may prevent communications with the FC. See this stackoverflow article for solutions. The following script will check for this issue:
#!/bin/bash for D in /sys/bus/usb/devices/usb* do FN=$D/power/autosuspend if [ -e $FN ] ; then susp=$(<$FN) if [ $susp != 0 ] ; then echo "Autosuspend set for $FN" fi fi done