UDEV rules

385 views
Skip to first unread message

Lee McLaren

unread,
Jan 4, 2017, 3:31:34 AM1/4/17
to LINOROBOT
Hi,

I am struggling to get the udev rules to work for the teensy

I am using a teensy 3.2 and I can see it being detected.

eg:

[  125.485408] systemd-udevd[893]: starting version 215
[  141.627095] usb 1-1.5: USB disconnect, device number 5
[  148.010175] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[  148.112898] usb 1-1.5: New USB device found, idVendor=16c0, idProduct=0483
[  148.112917] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  148.112930] usb 1-1.5: Product: USB Serial
[  148.112942] usb 1-1.5: Manufacturer: Teensyduino
[  148.112954] usb 1-1.5: SerialNumber: 2186010
[  148.115335] cdc_acm 1-1.5:1.0: ttyACM0: USB ACM device

but I never get the symlink in /dev

When I ran the script it created the udev rule but when I went debugging I found the rule the script created had a \n on the end. I fixed the file and I no longer see errors when debugging udev but dont get the symlink.

I am using a raspberry pi 3 as a computer.

This is the udev rule 

KERNEL=="ttyACM?", SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0486", ATTRS{serial}=="218601", MODE="0660" SYMLINK+="linobase"

any suggestions?

many thanks

Juan Miguel Jimeno

unread,
Jan 4, 2017, 5:56:39 AM1/4/17
to LINOROBOT
Hi,

This has been an issue for Raspberry Pi 3 users when using the udev rule script. I have yet to replicate the problem to fix it. WIll get back to you as soon as I get it solved. I have a Raspberry Pi 3 hanging around somewhere. ;)

Temporarily, you can call the serial port straight when launching the files and uploading the Teensy codes. (ie. /dev/ttyACM0). Make sure to plug the Teensy and Lidar one by one and do:

$ ls /dev/ttyACM* to get the serial port of each device.

Please take note of the following serial ports to be changed:

bringup.launch - Teensy's serial port.
https://github.com/grassjelly/linorobot/blob/master/launch/bringup.launch#L4

laser.launch - Lidar's serial port
https://github.com/grassjelly/linorobot/blob/master/launch/laser.launch#L3

platformio - for uploading the codes
https://github.com/grassjelly/linorobot/blob/master/arduino/L298/platformio.ini#L24

My apologies for the trouble caused. Thank you.

Happy Hacking!

Lee McLaren

unread,
Jan 30, 2017, 6:26:55 AM1/30/17
to LINOROBOT
Update to the UDEV rules problem on the Raspberry PI.

Previously I had created a new account for the robot. I have changed to using the inbuilt pi login and now the udev rules work. I am not sure why.

The other thing I have noticed, is that the step:

"
1.4 Installing ROS Packages

On your robot’s computer, run ros_packages_install.sh to download all the ROS packages needed. Go to lino_setup folder and run:
cd ~/lino_setup sudo ./ros_packages_install.sh
"

Does not work as expected on a Raspberry Pi, It puts the packages in /root. If I run the ros_packages_install.sh as the user without the sudo all is good.

Thank you Juan for making the ROS learning curve a lot flatter. 


Juan Miguel Jimeno

unread,
Feb 2, 2017, 11:30:18 AM2/2/17
to LINOROBOT
Thanks for posting this. Would be useful to others who might encounter same problem. ;) BTW, the new branch is up. Just merged it to master. :)

Lee McLaren

unread,
Mar 5, 2017, 4:39:17 AM3/5/17
to LINOROBOT
I have done a fresh rebuild, I am not sure if my udev rules are left over from before but they look new.

I have noticed on a raspberry pi that as a standard user you can not program the Arduino, fails with permission errors.

I have changed the udev rules to be:

KERNEL=="ttyACM?", SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ATTRS{serial}=="2186010", MODE="0666" SYMLINK+="linobase"
KERNEL=="ttyACM?", SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ATTRS{serial}=="12345", MODE="0666" SYMLINK+="linolidar"

I understand this is not perfect from the point of security but I am comfortable with the risk.

Probably different on other platforms.

Reply all
Reply to author
Forward
0 new messages