Pages: [1]   Go Down
Author Topic: How the device name (/dev/ttyS0 or /dev/ttyUSB0) is decided exactly?  (Read 1650 times)
0 Members and 1 Guest are viewing this topic.
CT, USA
Offline Offline
Sr. Member
****
Karma: 3
Posts: 446
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess this question has more to do with Linux than Arduino itself. But I am very curious to see how the actual device name is determined. The Arduino on my Linux PC (Ubuntu 10.04) had always showed up as /dev/ttyS0 till a few days ago. I don't remember installed anything unusual, but all of a sudden it changed to /dev/ttyUSB0.

Everything works just fine, but I am just curious as to why. Anyone?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is decided by udev daemon and its rules - my bet is that your system got updated, they changed a lot in udev subsystem a lot during last couple of years. Anyway - you might create a permanent rule and have Arduino on /dev/arduino, for instance...
Logged

CT, USA
Offline Offline
Sr. Member
****
Karma: 3
Posts: 446
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks awe_cz, it makes sense. I have looked at the udev rule folder under both /etc and /usr but couldn't seem to find anything specific for Arduino though...
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 360
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There won't be anything specific, since Arduino uses a generic USB to Serial Modem driver on *nix; however, you can add your own rule based on how the device identifies itself.

I wrote a post on how to do this a while back, though it's titled for FTDI, the method should work for any USB device: http://aeturnalus.com/robotics/mapping-ftdi-to-files-with-udev/
Logged

CT, USA
Offline Offline
Sr. Member
****
Karma: 3
Posts: 446
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the link Aeturnalus. I will give it a try.
Logged

Pages: [1]   Go Up
Jump to: