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
This will work on newer Pi 4 OS versions where using
usb
will cause a symlink to devices likebus/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):
After patch (on Pi 4):