---
# System prepended metadata

title: FAQ / Linux USB settings for Configurators
tags: [EmuFlight, Betaflight, FAQ]

---

# FAQ / Linux USB settings for Configurators

### Debian/Ubuntu

Edit/create `udev` rules (use vi, nano, or any text editor).  * Note: The filename/order can be different as per personal preferences.  `45-stdfu-permissions.rules` is typical of most Cleanflight/Betaflight installations/documents.
```
sudo nano /etc/udev/rules.d/45-stdfu-permissions.rules
```

Copy/paste this content and save it:  (See STM list here: https://devicehunt.com/view/type/usb/vendor/0483)
```
# All STMicroelectronics STM32 devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="****", GROUP="plugdev", MODE="0664"
# All Artery AT32 devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="****", GROUP="plugdev", MODE="0664"
```

Then reload the rules:
```
sudo udevadm control --reload
```

You must add yourself (username) to plugdev group.
```
sudo usermod -a -G plugdev $USER
```

Also, add yourself to the dialout group for tty/serial permissions: (Fixes `Failed to open serial port: FILE_ERROR_ACCESS_DENIED`)

```
sudo usermod -a -G dialout $USER
```

Often, ModemManger is installed by default, but we rarely use phone-line dial-up modems any more, so fix some issues by removing it: (usually required)
```
sudo systemctl stop ModemManager.service
sudo systemctl disable ModemManager.service
```
Optionally, uninstall it:
```
sudo apt remove modemmanager
```

***Required***: After the above `usermod` commands are applied, you **_must_** logout/login to update user access rights.  They will not apply until re-login.  Afterward, you may run Configurator which should properly connect to flight controllers.

### Fedora
Similar to the above, but `plugdev` group is not needed. Instead use `uaccess` tag in your udev rule for dfu:
```
# ALL STMicroelectronics devices & DFU
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", TAG+="uaccess"
# All Artery AT32 devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", TAG+="uaccess"
```
*Caveat: I know nothing about USB in Fedora; This was taken from documentation and may be incomplete.*

### Arch
Similar to all of the above, except `GROUP`/`MODE` can be replaced with `TAG`:
```
# ALL STMicroelectronics devices & DFU
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="****",  TAG+="uaccess"
# All Artery AT32 devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="****",  TAG+="uaccess"
```

### USB port locked
If other app are locking the port, or it is otherwise stuck/occupied, try resetting it with `stty sane -F /dev/PORT`. e.g.: 
```
sudo stty sane -F /dev/ACM0
```

---
#### Sources
* http://betaflight.com/docs/development/USB-Flashing#platform-specific-linux
* https://betaflight.com/docs/wiki/guides/current/Installing-Betaflight#platform-specific-linux
* https://github.com/emuflight/EmuConfigurator/wiki/Linux-Serial-&-USB
* internets / experience
* useful Q&A in here: https://askubuntu.com/questions/15570/configure-udev-to-change-permissions-on-usb-hid-device albeit for different device

