Executando sudo udevadm control --log-priority=info
e, em seguida, observando a saída de tail -f /var/log/syslog
, notei alguns erros.
Jan 23 21:22:05 raspberrypi systemd-udevd[1587]: invalid key/value pair in file /etc/udev/rules.d/80-arduinouno.rules on line 1,starting at character 17 ('\n')
Jan 23 21:22:05 raspberrypi systemd-udevd[1587]: invalid key/value pair in file /etc/udev/rules.d/80-arduinouno.rules on line 2,starting at character 50 ('\n')
Jan 23 21:22:05 raspberrypi systemd-udevd[1587]: invalid key/value pair in file /etc/udev/rules.d/80-arduinouno.rules on line 3,starting at character 12 ('\n')
Jan 23 21:22:05 raspberrypi systemd-udevd[1587]: invalid key/value pair in file /etc/udev/rules.d/80-arduinouno.rules on line 4,starting at character 23 ('\n')
e
Jan 23 21:23:01 raspberrypi systemd-udevd[1646]: unknown key 'ENV(ID_SERIAL_SHORT)' in /etc/udev/rules.d/90-neatolidar.rules:1
Jan 23 21:23:01 raspberrypi systemd-udevd[1646]: invalid rule '/etc/udev/rules.d/90-neatolidar.rules:1'
Jan 23 21:23:01 raspberrypi systemd-udevd[1646]: invalid key/value pair in file /etc/udev/rules.d/90-neatolidar.rules on line 2,starting at character 77 ('\n')
Jan 23 21:23:01 raspberrypi systemd-udevd[1646]: invalid key/value pair in file /etc/udev/rules.d/90-neatolidar.rules on line 3,starting at character 36 ('\n')
A partir disso inferimos (1) que minha regra ENV(ID_SERIAL_SHORT)
não estava funcionando e (2) não deveria ter novas linhas. Então, mudei para os seguintes arquivos .rules de uma linha:
/etc/udev/rules.d/80-arduinouno.rules
:
SUBSYSTEM=="tty", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", MODE="0666", OWNER="pi", GROUP="pi", SYMLINK+="arduinouno"
e /etc/udev/rules.d/90-neatolidar.rules
:
SUBSYSTEM=="tty", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", ATTRS{serial}=="AL01OTZS", MODE="0666", OWNER="pi", GROUP="pi", SYMLINK+="neatolidar"
Após a reinicialização (ou talvez apenas sudo service udev restart
e / ou sudo udevadm control --reload
), isso parece funcionar.