1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

working on #223: Auto-detection of serial ports. Mac version ready even if a bit slow

This commit is contained in:
Federico Fissore
2013-01-28 18:21:41 +01:00
parent 776952762f
commit 0d47f22787
11 changed files with 365 additions and 23 deletions

View File

@ -0,0 +1,16 @@
package processing.app.linux;
import org.junit.Test;
import processing.app.TestHelper;
import static org.junit.Assert.assertEquals;
public class UDevAdmParserTest {
@Test
public void shouldCorrectlyParse() throws Exception {
String output = TestHelper.inputStreamToString(UDevAdmParserTest.class.getResourceAsStream("udev_output.txt"));
assertEquals("2341_0036", new UDevAdmParser().extractVIDAndPID(output));
}
}

View File

@ -0,0 +1,24 @@
DEVLINKS=/dev/arduino_leonardo /dev/serial/by-id/usb-Arduino_LLC_Arduino_Leonardo-if00 /dev/serial/by-path/pci-0000:00:14.0-usb-0:2.3:1.0
DEVNAME=/dev/ttyACM0
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.3/3-2.3:1.0/tty/ttyACM0
ID_BUS=usb
ID_MM_CANDIDATE=1
ID_MODEL=Arduino_Leonardo
ID_MODEL_ENC=Arduino\x20Leonardo
ID_MODEL_ID=0036
ID_PATH=pci-0000:00:14.0-usb-0:2.3:1.0
ID_PATH_TAG=pci-0000_00_14_0-usb-0_2_3_1_0
ID_REVISION=0001
ID_SERIAL=Arduino_LLC_Arduino_Leonardo
ID_TYPE=generic
ID_USB_DRIVER=cdc_acm
ID_USB_INTERFACES=:020201:0a0000:
ID_USB_INTERFACE_NUM=00
ID_VENDOR=Arduino_LLC
ID_VENDOR_ENC=Arduino\x20LLC
ID_VENDOR_ID=2341
MAJOR=166
MINOR=0
SUBSYSTEM=tty
UDEV_LOG=3
USEC_INITIALIZED=21035594802