Page 1 of 1

Black STM32F407VET6: deploy issue

Posted: Mon Jul 29, 2019 12:01 pm
by yuanyanhui
The message says access to usb is denied. How to solve this problem? Please help, thanks.

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Writing build-BLACK_F407VE/firmware.dfu to the board
Traceback (most recent call last):
File "../../tools/pydfu.py", line 586, in <module>
main()
File "../../tools/pydfu.py", line 566, in main
init()
File "../../tools/pydfu.py", line 101, in init
__dev.set_configuration()
File "/usr/lib/python3/dist-packages/usb/core.py", line 869, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/lib/python3/dist-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 147, in managed_set_configuration
self.managed_open()
File "/usr/lib/python3/dist-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 786, in open_device
return _DeviceHandle(dev)
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 643, in __init__
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
Makefile:479: recipe for target 'deploy' failed
make: *** [deploy] Error 1

Re: Black STM32F407VET6: deploy issue

Posted: Mon Jul 29, 2019 12:25 pm
by yuanyanhui
FYI. The issue was solved by running the command with sudo.

Re: Black STM32F407VET6: deploy issue

Posted: Mon Jul 29, 2019 1:25 pm
by jimmo
Instead of using sudo, you can also create a udev rule to change permissions on the device.

Re: Black STM32F407VET6: deploy issue

Posted: Mon Jul 29, 2019 2:01 pm
by yuanyanhui
@jimmo can you elaborate a bit? I use windows and know very little of ubuntu.

Re: Black STM32F407VET6: deploy issue

Posted: Tue Jul 30, 2019 12:54 am
by jimmo
udev is resposible for making your devices accessible on linux. It has a bunch of default rules that work for many things, but it doesn't know what to do for a ST DFU device. You need to tell it what the permissions should be, using a udev rule (which in this case we say "usb device, with this VID/PID, give acess to this group").

Here's a random page I found that has the exact right instructions for Ubuntu https://github.com/cleanflight/cleanfli ... ific-linux

Re: Black STM32F407VET6: deploy issue

Posted: Tue Jul 30, 2019 1:36 am
by yuanyanhui
Thanks a lot. Will look into it.

Re: Black STM32F407VET6: deploy issue

Posted: Tue Jul 30, 2019 2:18 am
by dhylands

Re: Black STM32F407VET6: deploy issue

Posted: Tue Jul 30, 2019 3:04 am
by yuanyanhui
@dhylands Thank you! This is very helpful.