The badge deployer will run on a RPIE and auto-deploy bootloader/firmware/app in sequence to a connected badge.
add the file /etc/udev/rules.d/10-con.rules
with
ACTION=="add", SUBSYSTEM=="block", ATTRS{product}=="*Badge*", SYMLINK+="badge", RUN+="/usr/bin/python3 /home/pi/deployer.py $devnode"
ACTION=="add", SUBSYSTEM=="tty", ATTRS{product}=="*Badge*", SYMLINK+="badge_serial"
set mount_removable /etc/xdg/pcmanfm/LXDE-pi/pcmanfm.conf
mount_removable=0
killall pcmanfm
pcmanfm --desktop --profile lubuntu --display :0 &
'''
See documentation for each parameter and set accordingly
- Notice the deployment script will be executed under udev -> as root