Display device has links
lsusb
Display mount point
ls /dev/ttyACM* /dev/ttyUSB*
You can see ttyUSB0
and ttyUSB1
which corresponds to a device uncertain, therefore, we need a way to ensure that after each boot unique device mount point corresponds to a certain device, so that our program can manipulate the correct corresponding USB device .
To /etc/udev/rules.d
folder create a .rules
file, for example, called car.rules
such as adding content about
KERNEL=="ttyUSB*", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE:="666", SYMLINK+="car"
ATTRS for the device number, is lsusb see. MODE rights, SYMLINK mount called the car, so the program calls the /dev/car
get the actual device, so that they will correspond ttyUSB *. So that regardless of the insertion port can be identified.
Get that done when it restart udev
sudo service udev reload
sudo service udev restart
Finally plug the device to see if the binding is successful
ls -l /dev/car