ButterFlight | BetaFlight | CleanFlight
Failed to open serial port: FILE_ERROR_ACCESS_DENIED
Problem/Symptoms:
Failed to open serial port: FILE_ERROR_ACCESS_DENIED
betaflight linux failed to open serial port
butterflight linux failed to open serial port
cleanflight linux failed to open serial port
butterflight can’t flash firmware
betaflight can’t flash firmware
cleanflight can’t flash firmware
Cause:
Linux user accounts require permissions for Serial and USB subsystems.
Solutions:
1) For Failed to open serial port: FILE_ERROR_ACCESS_DENIED
:
ref: https://websistent.com/fix-serial-port-permission-denied-errors-linux/
sudo usermod -a -G dialout $(whoami)
newgrp dialout #(temp workaround to bypass logout & re-login requirement)
2) For unable to flash firmware to flight controller (FC) :
ref: https://github.com/ButterFlight/butterflight/blob/master/docs/USB%20Flashing.md
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/45-stdfu-permissions.rules
sudo usermod -a -G plugdev $(whoami)
newgrp plugdev #(temp workaround to bypass logout & re-login requirement)
Follow along:
As always, good luck!
~~~
Please consider crypto tipping:
for HelioRC & Pegasus UI, maybe something more like this:
ReplyDeleteSUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5742", GROUP="plugdev", MODE="0664"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5742", GROUP="plugdev", MODE="0664"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", GROUP="plugdev", MODE="0664"
my current rules 2020 (maybe they are overkill):
ReplyDeletei put them in /etc/udev/rules.d/50-myusb.rules
# FlightControllers
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5742", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5742", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5741", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5741", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5743", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5743", MODE="0664", GROUP="plugdev"
# DFU (Internal bootloader for STM32 MCUs)
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"
#gorpro session5
SUBSYSTEM=="usb", ATTRS{idVendor}=="2672", ATTRS{idProduct}=="0029", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2672", ATTRS{idProduct}=="0029", MODE="0664", GROUP="plugdev"
best and near final version: https://github.com/emuflight/EmuConfigurator/wiki/Linux-Serial-&-USB
ReplyDelete