Go Down

Topic: How the device name (/dev/ttyS0 or /dev/ttyUSB0) is decided exactly? (Read 2265 times) previous topic - next topic


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?


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...


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...


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/


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131