bluerobotics / companion

Companion computer startup scripts and examples
https://www.ardusub.com/operators-manual/companion-web.html
GNU General Public License v3.0
48 stars 54 forks source link

Update udev rules to support newer OS versions #349

Closed matt-bathyscope closed 4 years ago

matt-bathyscope commented 4 years ago

This will work on newer Pi 4 OS versions where using usb will cause a symlink to devices like bus/usb/001/004, rather than the ACM device. I also verified it works on the current companion image with a Pi 3.

Example without patch (on Pi 4):

$ uname -a && lsb_release -a && ls -la /dev/autopilot
Linux companion 5.4.45-v7l+ #1321 SMP Wed Jun 10 17:39:20 BST 2020 armv7l GNU/Linux
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
lrwxrwxrwx 1 root root 15 Jun 26 00:18 /dev/autopilot -> bus/usb/001/004

After patch (on Pi 4):

$ uname -a && lsb_release -a && ls -la /dev/autopilot
Linux companion 5.4.45-v7l+ #1321 SMP Wed Jun 10 17:39:20 BST 2020 armv7l GNU/Linux
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
lrwxrwxrwx 1 root root 7 Jun 26 00:22 /dev/autopilot -> ttyACM0
patrickelectric commented 4 years ago

Hi @matt-bathyscope, thanks for your collaboration and time!