[Mono-bugs] [Bug 795366] New: SerialPort.GetPortNames() doesn't include /dev/ttyACM*
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Dec 19 23:26:33 UTC 2012
https://bugzilla.novell.com/show_bug.cgi?id=795366
https://bugzilla.novell.com/show_bug.cgi?id=795366#c0
Summary: SerialPort.GetPortNames() doesn't include /dev/ttyACM*
Classification: Mono
Product: Mono: Class Libraries
Version: 2.10.x
Platform: All
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: dominic at baudvine.net
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like
Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4
GetPortNames() returns an array of available serial ports on the system. I was
a little surprised to find that it failed to show /dev/ttyACM0 on my system.
ttyACM* is where (at least on my system, Mint 14) various serial-over-USB
devices end up, in this case my Arduino and the RP6, an atmega32-based robot.
It's easy enough to work around with a symlink, but that doesn't make for very
portable code.
Browsing the source for Mono 2.11 and 3.0.4 it looks like GetPortNames() on
Linux searches for /dev/ttyS* and /dev/ttyUSB*, ignoring /dev/ttyACM*. The
kernel docs (https://www.kernel.org/doc/Documentation/usb/acm.txt) inform me
that /dev/ttyACM* is intended for serial modems, so presumably it's more widely
useful than just for Arduino et al.
Reproducible: Always
Steps to Reproduce:
1. Connect Arduino (or various other devices)
2. Call System.IO.Ports.SerialPort.GetPortNames()
3. Observe return value.
Actual Results:
The returned array of String contains only /dev/ttyS* entries. There are no
/dev/USB* devices on my system, so that absence is expected.
Expected Results:
The returned array of String should have included the /dev/ttyACM0 entry that
is present on my system.
I'm using Mono 2.10.8, but the source for 3.0.2 contains the same issue. I'm
not sure why these devices are presented as ACM, which is apparently a protocol
for serial modems - but a quick search indicates that at least the Arduino
serial interface is commonly presented as /dev/ttyACM*.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list