How can I use RPlidar and YDLidar on Plutarco’s ? CP2102 reprogramming…

In Plutarco I’ve a lot of different USB device and I found a lot of problems with their names which change in relation to their plug-in order sequence.

Linux UDEV rules file helped me in a partial solution of the problem but 2 different Lidar devices, rplidar and ydlidar, used the same CP2102  USB to Serial converter with the same serial number.

Googling a bit I found cp210x-cfg tool able to program a new serial number on CP2102 chip.

I connected YDlidar only device at the system ( to be sure to work with right device ) and I programmed it’s serial number with this command:

RPlidar kept the original S/N 0001

At this point I used udevadm command which would be useful for serial number changing check and to discover other parameters necessary for udev file creation:

Using previous command on all USB device file ( /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyACM0, etc… ) I created a file called /etc/udev/rules.d/plutarco.rules whit these lines:

You can use this command to reload new rules without system reboot:

 

You can use “ls -lah /dev/YOURDEVICE” command to check plutarco.rules file result.

In my actual hardware config these are some output examples:

plutarco 08:21:03 /dev $ ls -lah rplidar
lrwxrwxrwx 1 root root 7 2000-01-01 01:00 rplidar -> ttyUSB0

plutarco 08:21:14 /dev $ ls -lah imu
lrwxrwxrwx 1 root root 7 2000-01-01 01:00 imu -> ttyUSB1

plutarco 08:21:36 /dev $ ls -lah ublox
lrwxrwxrwx 1 root root 7 2000-01-01 01:00 ublox -> ttyACM0

plutarco 08:21:39 /dev $ ls -lah monitor1
lrwxrwxrwx 1 root root 7 2000-01-01 01:00 monitor1 -> ttyACM1

 

 

I commenti sono chiusi