Wednesday, July 4, 2018

Prepare or Fix Linux for ButterFlight, BetaFlight, CleanFlight

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!
~~~

Written with StackEdit.

1 comment:

  1. for HelioRC & Pegasus UI, maybe something more like this:

    SUBSYSTEM=="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"

    ReplyDelete

Comments, Suggestions or "Thank you's" Invited! If you have used this info in any way, please comment below and link/link-back to your project (if applicable). Please Share.
I accept Bitcoin tips of ANY amount to: 1GS3XWJCTWU7fnM4vfzerrVAxmnMFnhysL
I accept Litecoin tips of ANY amount to: LTBvVxRdv2Lz9T41UzqNrAVVNw4wz3kKYk