# $Id$
# @author Cory Sharp <cory@moteiv.com>
# @author Joe Polastre
+#
+# Changes to support CP2103 by R. Steve Mckown <rsmckown@gmail.com>
my $help = <<'EOF';
usage: motelist [options]
#
sub scan_sysfs {
- # Scan /sys/bus/usb/drivers/usb for FTDI devices
+ # Scan /sys/bus/usb/drivers/usb for FTDI and CP2103 devices
my @ftdidevs =
- grep { ($_->{UsbVendor}||"") eq "0403" && ($_->{UsbProduct}||"") eq "6001" }
+ grep { (($_->{UsbVendor}||"") eq "0403" && ($_->{UsbProduct}||"") eq "6001") || (($_->{UsbVendor}||"") eq "10c4" && ($_->{UsbProduct}||"") eq "ea60") }
map { {
SysPath => $_,
UsbVendor => snarf("$_/idVendor",1),
} }
glob("/sys/bus/usb/drivers/usb/*");
- # Gather information about each FTDI device
+ # Gather information about each FTDI and CP2103 device
for my $f (@ftdidevs) {
my $syspath = $f->{SysPath};