Hvis jeg har flere Arduinos koblet over USB til en Linux-datamaskin, og de dukker opp som
- / tty / ACM0
- / tty / ACM1
- /tty/ACM2
Hvordan kan jeg identifisere hvilken Arduino som er uten å koble til dem via seriell tilkobling ? Er det et serienummer eller en unik id på Arduino?
Takk for tiden din.
Situasjon: Uno R3, Mega, Leonardo med / ttyACM [1,2,3 ]
lsusb-utgang med enheter i den rekkefølgen som er nevnt ovenfor:
... Buss 001 Enhet 011: ID 2341: 0043Bus 001 Enhet 013: ID 2341: 8036 ... Buss 001 Enhet 014: ID 2341: 0042
lsusb -d leverandør: enhet -vvv viser for hver
Uno
Buss 001 Enhet 014: ID 2341: 0042Enhet deskriptor: bLength 18 bDescriptorType en bcdUSB 1,10 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x2341 0x0042 idProduct bcdDevice 0,01 iManufacturer 1 Arduino (www.arduino.cc) iProduct 2 iSerial 220 55330313735351910141 bNumConfigurations 1 konfigurasjon deskriptor: bLength 9 bDescriptorType 2 wTotalLength 62 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributter 0xc0 Selvdrevet MaxPower 100mA Interface Descriptor: bLengde 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Kommunikasjon bInterfaceSpCrTCCCCC 10.01 CDC ACM: bmCapabilities 0x06 sender break line-koding og seriell tilstand CDC Union: bMasterInterface 0 bSlaveInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributter 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 255 Interface Descriptor: bLength 9 bDescriptorType 4 Type B 0 Ubrukt bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributter 2 Overføringstype Bulk Synch Type Ingen Brukstype Data wMaxPacketSize 0x0040 1x 64 byte bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributter 2 Overføringstype Bulk Synch Type Ingen Brukstype Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1D0000 Status: > Leonardo:Bus 001 Device 013: ID 2341: 8036 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2,00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendordx 023 LLC iProduct 2 Arduino Leonardo iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 100 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributter 0x80 (Bussdrevet) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bFunksjon (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 0 None iInterface 0 CDC Header: b cdCDC 1.10 CDC Call Management: bmCapabilities 0x01 call management bDataInterface 1 CDC ACM: bmCapabilities 0x06 sender break line koding og seriell tilstand CDC Union: bMasterInterface 0 bSlaveInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress Type Overgang 0x81 EPT Ingen Brukstype Data wMaxPacketSize 0x0040 1x 64 byte bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributter 2 Overføringstype Bulk Synch Type Ingen Brukstype Data wMaxPacketSize 0x0040 1x 64 byte bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None bInterface bDescriptorType 34 Report wDescriptorLength 101 Report Descriptor: (length is 101) Item (Global): Usage Page, data = [0x01] 1 Generic Desktop Controls Item (Local): Usage, data = [0x02] 2 Mouse Item (Main): Collection , data = [0x01] 1 Applikasjonselement (lokal): bruk, data = [0x01] 1 pekerelement (hoved): samling, data = [0x00] 0 fysisk element (global): rapport-ID, data = [0x01] 1 element (global): bruksside , data = [0x09] 9 knapper Vare (lokal): Minimum bruk, data = [0x01] 1 knapp 1 (Primær) Vare (lokal): Maksimal bruk, data = [0x03] 3 knapp 3 (Tertiær) Vare (global) : Logisk Minimum, data = [0x00] 0 Element (Global): Logisk Maximum, data = [0x01] 1 Element (Global): Antall rapporter, data = [0x03] 3 Element (Global): Rapportstørrelse, data = [0x01 ] 1 vare (hoved): Input, data = [0x02] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Element (global): Antall rapporter, data = [0x01] 1 vare (global): Rapportstørrelse, data = [0x05] 5 Element (hoved): Inngang, data = [0x03] 3 Konstant variabel Absolutt No_Wrap Lineær Preferred_State Nei_Null_Posisjon Ikke_flyktig bitfelt Vare (global): bruksside, data = [0x01] 1 generelle skrivebordskontroller element (lokal): bruk, data = [0x30] 48 retning-X-element (lokal): bruk, data = [0x31] 49 retning-Y-element (Lokalt): Bruk, data = [0x38] 56 Hjulelement (globalt): Logisk minimum, data = [0x81] 129 Element (globalt): Logisk maksimum, data = [0x7f] 127 Element (globalt): Rapportstørrelse, data = [0x08] 8 vare (global): rapportantall, data = [0x03] 3 vare (hoved): inngang, data = [0x06] 6 data variabel relativ N o_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item (Main): End Collection, data = none Item (Main): End Collection, data = none ...... Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributter 3 Transfer Type Interrupt Synch Type Ingen Brukstype Data wMaxPacketSize 0x0040 1x 64 byte bInterval 1 Device Status: 0x0000 (Bus Powered)And Mega256:
Bus 001 Device 014: ID 2341: 0042 Device Descriptor: bLength 18 bDeskriptorType 1 bcdUSB 1.10 bEnhetKlasse 2 Kommunikasjon bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x2341 idProdukt 0x0042 bcdDevice 0.01 iManufacturer 1 Arduino (www.arduino.cc) iProduct 2 iSerial 220 55330313735351910141 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 62 bNumInterfaces 2 bConfigurationValue 0 bCtAt 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-kommandoer (v.25ter) iInterface 0 CDC Header: bcdCDC 10.01 CDC ACM: bmCapabilities 0x06 sender break line koding og seriell tilstand CDC Union: bMa sterInterface 0 bSlaveInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributter 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 255 Interface Descriptor: bLength 9 bDesign Data bInterfaceSubClass 0 Ubrukt bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bm Attributter 2 Transfer Type Bulk Synch Type Ingen Brukstype Data wMaxPacketSize 0x0040 1x 64 byte bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributter 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1D >