serial ports for linux #42

Merged
merged 1 commit into from May 26, 2013

Projects

None yet

3 participants

Contributor

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.

Collaborator
vickash commented May 23, 2013

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.

Contributor

Thanks @vickash.

Just updated the commit to reflect that.

@austinbv austinbv merged commit ebc076e into austinbv:master May 26, 2013

1 check passed

default The Travis CI build passed
Details
@nishantmodak nishantmodak deleted the nishantmodak:linux-tty branch May 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment