37.13 PyBoard via Serial User Access

See https://github.com/micropython/micropython/wiki/Board-STM32F407-Discovery#programming-from-linux-via-dfu to set up udev rules that will change the serial device’s permission to allow all users access once the device is plugged in.

Essentially,

sudo emacs /etc/udev/rules.d/49-stmdiscovery.rules

to add the contents:

# f055:9800 - STM32F4 Discovery running MicroPython in USB Serial Mode (CN5)
ATTRS{idVendor}=="f055", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="f055", ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{idVendor}=="f055", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="f055", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="f055", MODE:="0666"
# 0483:df11 - STM32F4 Discovery in DFU mode (CN5)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"

and restart udev:

sudo udevadm control --reload-rules

and the next time the device is plugged in:

$ ll /dev/ttyACM*
crw-rw----+ 1 root dialout 166, 0 Nov 15 12:05 /dev/ttyACM0
crw-rw-rw-  1 root dialout 166, 1 Nov 15 19:06 /dev/ttyACM1
picocom /dev/ttyACM1


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0