SDB:Betaflight Troubleshooting
This Page was created for troubleshooting with Betaflight's problems on openSUSE Linux but some of this problem can be solved the same way on other Linux Distributions.
Can't connect to Drone via USB plug
The drone is visible (or sometimes not) in list of devices to pair but when you try to connect, nothing happens. There is two solution to resolve this problem.
Grant access to serial interfaces by custom group
You have to grant access for user to serial interfaces with specified Vendor ID by adding them to the new created group. For example, the group could be named betaflight-tty.
sudo groupadd betaflight-tty && sudo usermod -a -G betaflight-tty <your-user>
Next you have to create new udev rules (99-betaflight-tty-change-group.rules) with your text editor or IDE (for example vim).
sudo vim /etc/udev/rules.d/99-betaflight-tty-change-group.rules
Then write into rules file this:
# Assing STM32, AT32 and APM32 MCU interfaces to specify group
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="****", MODE="0664", GROUP="betaflight-tty"
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="****", MODE="0664", GROUP="betaflight-tty"
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="314b", ATTRS{idProduct}=="****", MODE="0664", GROUP="betaflight-tty"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="****", MODE="0664", GROUP="betaflight-tty"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="****", MODE="0664", GROUP="betaflight-tty"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="314b", ATTRS{idProduct}=="****", MODE="0664", GROUP="betaflight-tty"
Save file and reload the udev rules daemon:
sudo udevadm control --reload
Now you have to Log Out and Log In back to your Desktop Environment.
After that open terminal and type this:
watch -n 0.5 find /dev -group betaflight-tty -exec ls -l {} +
Now connect your drone to PC and in your terminal you should get output like this:
crw-rw-r--. 1 root betaflight-tty 189, 540 Apr 29 17:48 /dev/bus/usb/005/029 crw-rw-r--. 1 root betaflight-tty 166, 0 Apr 29 17:48 /dev/ttyACM0
Now you can connect to the USB port and configure your RC gear! If you nothing see in the terminal, go to the next subsection.
Manually checking the Vendor and Product IDs
If you have connected the drone to the PC via the USB port, disconnect it and open a terminal. then type:
lsusb > usb1.txt
Connect your the drone to USB port and again use lsusb command.
lsusb > usb2.txt
Now you have to use diff command to check which serial port was added.
diff usb1.txt usb2.txt 16a17 > Bus 005 Device 005: ID 1234:5678 STMicroelectronics Virtual COM Port
You see that two numbers after ID in your terminal ? Remember they! In this example it's 1234:5678. The first is the Vendor ID, second is the Product ID.
Open the udev rule from previous section (/etc/udev/rules.d/99-betaflight-tty-change-group.rules) with your text editor and add one more rule.
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", MODE="0664", GROUP="betaflight-tty"
Reload the udev rules daemon:
sudo udevadm control --reload
Reconnect your drone and again use watch program to checkout if something is displayed:
watch -n 0.5 find /dev -group betaflight-tty -exec ls -l {} +
Adding user to dialout group
still in progress
Keywords: betaflight,udev,duf,configuration,problem,usb,connect
