ถ้าฉันมี Arduinos หลายตัวที่เชื่อมต่อผ่าน USB กับคอมพิวเตอร์ Linux และมันจะปรากฏเป็น
- / TTY / ACM0
- / TTY / ACM1
- / TTY / ACM2
ฉันจะระบุ Arduino ที่ใช้โดยไม่ต้องเชื่อมต่อผ่านการเชื่อมต่อแบบอนุกรมได้อย่างไร มีหมายเลขซีเรียลหรือรหัสเฉพาะบน Arduino หรือไม่?
ขอขอบคุณสำหรับเวลาของคุณ.
สถานการณ์: Uno R3, Mega, Leonardo with / ttyACM [1,2,3]
lsusb เอาต์พุตพร้อมอุปกรณ์ตามลำดับที่กล่าวถึงข้างต้น:
... อุปกรณ์ 001 บัส 011: ID 2341: 0043 อุปกรณ์ 001 บัส 013: ID 2341: 8036 ... อุปกรณ์ 001 บัส 014: ID 2341: 0042
lsusb -d ผู้ขาย: อุปกรณ์ -vvv แสดงสำหรับแต่ละรายการ
Uno
อุปกรณ์ 001 บัส 014: ID 2341: 0042
ตัวอธิบายอุปกรณ์:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 การสื่อสาร
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x2341
idProduct 0x0042
bcdDevice 0.01
iManufacturer 1 Arduino (www.arduino.cc)
iProduct 2
iSerial 220 55330313735351910141
bNumConfigurations 1
ตัวอธิบายการกำหนดค่า:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfiguration ค่า 1
การกำหนดค่า iConfiguration 0
bmAttributes 0xc0
ขับเคลื่อนด้วยตนเอง
MaxPower 100mA
อินเตอร์เฟส Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternate การตั้งค่า 0
bNumEndpoints 1
bInterfaceClass 2 การสื่อสาร
bInterfaceSubClass 2 บทคัดย่อ (โมเด็ม)
bInterfaceProtocol 1 คำสั่ง AT (v.25ter)
iInterface 0
ส่วนหัวของ CDC:
bcdCDC 10.01
CDC ACM:
bmCapabilities 0x06
ส่งหยุดพัก
การเข้ารหัสบรรทัดและสถานะอนุกรม
สหภาพ CDC:
bMasterInterface 0
bSlaveInterface 1
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
ประเภทการโอนขัดจังหวะ
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0008 1x 8 ไบต์
bInterval 255
อินเตอร์เฟส Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternate การตั้งค่า 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 ไม่ได้ใช้
bInterfaceProtocol 0
iInterface 0
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
โอนประเภทจำนวนมาก
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 1
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
โอนประเภทจำนวนมาก
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 1
สถานะอุปกรณ์: 0x0000
(รถบัสขับเคลื่อน)
เลโอนาร์โด:
อุปกรณ์ 001 บัส 013: ID 2341: 8036
ตัวอธิบายอุปกรณ์:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (กำหนดที่ระดับอินเตอร์เฟส)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2341
idProduct 0x8036
bcdDevice 1.00
iManufacturer 1 Arduino LLC
iProduct 2 Arduino Leonardo
iSerial 0
bNumConfigurations 1
ตัวอธิบายการกำหนดค่า:
bLength 9
bDescriptorType 2
w รวมความยาว 100
bNumInterfaces 3
bConfiguration ค่า 1
การกำหนดค่า iConfiguration 0
bmAttributes 0x80
(รถบัสขับเคลื่อน)
MaxPower 500mA
สมาคมอินเทอร์เฟซ:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 การสื่อสาร
bFunctionSubClass 2 บทคัดย่อ (โมเด็ม)
bFunctionProtocol 1 คำสั่ง AT (v.25ter)
iFunction 0
อินเตอร์เฟส Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternate การตั้งค่า 0
bNumEndpoints 1
bInterfaceClass 2 การสื่อสาร
bInterfaceSubClass 2 บทคัดย่อ (โมเด็ม)
bInterfaceProtocol 0 ไม่มี
iInterface 0
ส่วนหัวของ CDC:
bcdCDC 1.10
การจัดการการโทร CDC:
bmCapabilities 0x01
การจัดการการโทร
bDataInterface 1
CDC ACM:
bmCapabilities 0x06
ส่งหยุดพัก
การเข้ารหัสบรรทัดและสถานะอนุกรม
สหภาพ CDC:
bMasterInterface 0
bSlaveInterface 1
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
ประเภทการโอนขัดจังหวะ
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 0
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
โอนประเภทจำนวนมาก
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 0
อินเตอร์เฟส Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternate การตั้งค่า 0
bNumEndpoints 1
bInterfaceClass 3 อุปกรณ์เชื่อมต่อมนุษย์
bInterfaceSubClass 0 ไม่มีคลาสย่อย
bInterfaceProtocol 0 ไม่มี
iInterface 0
ตัวอธิบายอุปกรณ์ HID:
bLength 9
bDescriptorType 33
bcdHID 1.01
bCountryCode 0 ไม่รองรับ
bNumDescriptors 1
bDescriptorType 34 รายงาน
wDescriptorLength 101
รายงานอธิบาย: (ความยาวคือ 101)
รายการ (ทั่วโลก): หน้าการใช้งาน data = [0x01] 1
การควบคุมเดสก์ทอปทั่วไป
รายการ (ท้องถิ่น): การใช้งาน data = [0x02] 2
เม้าส์
รายการ (หลัก): การรวบรวมข้อมูล = [0x01] 1
ใบสมัคร
รายการ (ภายในเครื่อง): การใช้งาน data = [0x01] 1
ชี้
รายการ (หลัก): การรวบรวมข้อมูล = [0x00] 0
กายภาพ
รายการ (ทั่วโลก): ID รายงานข้อมูล = [0x01] 1
รายการ (ทั่วโลก): หน้าการใช้งาน data = [0x09] 9
ปุ่ม
รายการ (ท้องถิ่น): การใช้งานขั้นต่ำ data = [0x01] 1
ปุ่ม 1 (หลัก)
รายการ (ภายในเครื่อง): สูงสุดการใช้งาน data = [0x03] 3
ปุ่ม 3 (ระดับอุดมศึกษา)
รายการ (ทั่วโลก): ตรรกะขั้นต่ำ data = [0x00] 0
รายการ (ทั่วโลก): โลจิคัลสูงสุด, data = [0x01] 1
รายการ (ทั่วโลก): จำนวนรายงาน, ข้อมูล = [0x03] 3
รายการ (ทั่วโลก): ขนาดรายงานข้อมูล = [0x01] 1
รายการ (หลัก): อินพุต, data = [0x02] 2
Data Variable Absolute No_Wrap เป็น Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
รายการ (ทั่วโลก): จำนวนรายงาน, ข้อมูล = [0x01] 1
รายการ (ทั่วโลก): ขนาดรายงานข้อมูล = [0x05] 5
รายการ (หลัก): อินพุต, data = [0x03] 3
ตัวแปรคงที่สัมบูรณ์ No_Wrap เป็น Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
รายการ (ทั่วโลก): หน้าการใช้งาน data = [0x01] 1
การควบคุมเดสก์ทอปทั่วไป
รายการ (ท้องถิ่น): การใช้งาน data = [0x30] 48
ทิศทาง-X
รายการ (ท้องถิ่น): การใช้งาน data = [0x31] 49
ทิศทาง-Y
รายการ (ท้องถิ่น): การใช้งาน data = [0x38] 56
ล้อ
รายการ (ทั่วโลก): ตรรกะขั้นต่ำ data = [0x81] 129
รายการ (ทั่วโลก): โลจิคัลสูงสุด, data = [0x7f] 127
รายการ (ทั่วโลก): ขนาดรายงานข้อมูล = [0x08] 8
รายการ (ทั่วโลก): จำนวนรายงาน, ข้อมูล = [0x03] 3
รายการ (หลัก): อินพุต, data = [0x06] 6
Data Variable Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
รายการ (หลัก): การรวบรวมสุดท้าย data = none
รายการ (หลัก): การรวบรวมสุดท้าย data = none
......
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
ประเภทการโอนขัดจังหวะ
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 1
สถานะอุปกรณ์: 0x0000
(รถบัสขับเคลื่อน)
และ Mega256:
อุปกรณ์ 001 บัส 014: ID 2341: 0042
ตัวอธิบายอุปกรณ์:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 การสื่อสาร
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x2341
idProduct 0x0042
bcdDevice 0.01
iManufacturer 1 Arduino (www.arduino.cc)
iProduct 2
iSerial 220 55330313735351910141
bNumConfigurations 1
ตัวอธิบายการกำหนดค่า:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfiguration ค่า 1
การกำหนดค่า iConfiguration 0
bmAttributes 0xc0
ขับเคลื่อนด้วยตนเอง
MaxPower 100mA
อินเตอร์เฟส Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternate การตั้งค่า 0
bNumEndpoints 1
bInterfaceClass 2 การสื่อสาร
bInterfaceSubClass 2 บทคัดย่อ (โมเด็ม)
bInterfaceProtocol 1 คำสั่ง AT (v.25ter)
iInterface 0
ส่วนหัวของ CDC:
bcdCDC 10.01
CDC ACM:
bmCapabilities 0x06
ส่งหยุดพัก
การเข้ารหัสบรรทัดและสถานะอนุกรม
สหภาพ CDC:
bMasterInterface 0
bSlaveInterface 1
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
ประเภทการโอนขัดจังหวะ
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0008 1x 8 ไบต์
bInterval 255
อินเตอร์เฟส Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternate การตั้งค่า 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 ไม่ได้ใช้
bInterfaceProtocol 0
iInterface 0
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
โอนประเภทจำนวนมาก
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 1
ตัวบอกปลายทาง:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
โอนประเภทจำนวนมาก
ซิงค์ชนิดไม่มี
ข้อมูลประเภทการใช้งาน
wMaxPacketSize 0x0040 1x64 ไบต์
bInterval 1
สถานะอุปกรณ์: 0x0000
(รถบัสขับเคลื่อน)

lsusb -vvvกล่าวว่า?