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.
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.
dmesg | grep ACM
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.
serial ports for linux
Just updated the commit to reflect that.