austinbv / dino

Dino is a ruby gem that helps you bootstrap prototyping with an Arduino
MIT License
388 stars 84 forks source link

serial ports for linux #42

Closed nishantmodak closed 11 years ago

nishantmodak commented 11 years ago

Detect Serial Ports from Linux.

Alternate way is to execture

dmesg | grep tty

But the output cannot be easily parsed.

So followed the way windows COM ports are done.

vickash commented 11 years ago

Your if statement will exclude devices like `/dev/ttyACM0" on Linux systems.

Also, just tried dmesg | grep tty and dmesg | grep ACM on an OpenWRT box. /dev/ttyACM0 (a connected Arduino Uno) doesn't appear. So regardless of the output being difficult to parse, it doesn't seem to be reliable across Linux distros.

I have a feeling this can be solved simply by making the regex match on the line you removed case insensitive, i.e. /usb|ACM/i instead. Try that.

nishantmodak commented 11 years ago

Thanks @vickash.

Just updated the commit to reflect that.