我正在尝试通过 USB 连接到我的 PC 上的串行设备,但无论我做什么,都不会成功。
该设备是基于 STM32 的板。
我在 arch,我的用户在 uucp 和 lock 组中。如果我用 sudo 尝试也没关系,它仍然给出错误。
无论我尝试打开什么应用程序,它都会显示 I/O 错误。
例如:
# stty -F /dev/ttyACM1
stty: /dev/ttyACM1: Input/output error
每当我尝试打开它时,dmesg 都会发出以下行:
[ +13.632050] cdc_acm 1-4:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed
我不知道如何继续下去,你能帮忙吗?
附加信息:
当我在我的笔记本电脑上尝试相同的操作时,它工作得很好,我不知道除了硬件之外还有什么区别,因为它们或多或少是在同一天安装的,具有相同的发行版,具有相同的设置。
lsusb -v -d 1eaf:0004
:
Frame 203273: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface usbmon1, id 0
Interface id: 0 (usbmon1)
Interface name: usbmon1
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Apr 24, 2021 23:02:48.009074000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1619298168.009074000 seconds
[Time delta from previous captured frame: 0.001224000 seconds]
[Time delta from previous displayed frame: 199.923870000 seconds]
[Time since reference or first frame: 5102.916738000 seconds]
Frame Number: 203273
Frame Length: 64 bytes (512 bits)
Capture Length: 64 bytes (512 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: usb]
USB URB
[Source: host]
[Destination: 1.27.2]
URB id: 0xffff9e5a096db840
URB type: URB_SUBMIT ('S')
URB transfer type: URB_INTERRUPT (0x01)
Endpoint: 0x82, Direction: IN
Device: 27
URB bus id: 1
Device setup request: not relevant ('-')
Data: not present ('<')
URB sec: 1619298168
URB usec: 9074
URB status: Operation now in progress (-EINPROGRESS) (-115)
URB length [bytes]: 64
Data length [bytes]: 0
[Response in: 203274]
[bInterfaceClass: Communications and CDC Control (0x02)]
Unused Setup Header
Interval: 128
Start frame: 0
Copy of Transfer Flags: 0x00000204, No transfer DMA map, Dir IN
Number of ISO descriptors: 0
Bus 001 Device 027: ID 1eaf:0004 Leaflabs Maple serial interface
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1eaf Leaflabs
idProduct 0x0004 Maple serial interface
bcdDevice 2.00
iManufacturer 1 LeafLabs
iProduct 2 Maple
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0043
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 10.01
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 1
CDC ACM:
bmCapabilities 0x06
sends break
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 255
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)
dmesg -wH
:
[ +2.391790] usb 1-4: new full-speed USB device number 27 using xhci_hcd
[ +0.181105] usb 1-4: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 2.00
[ +0.000004] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ +0.000002] usb 1-4: Product: Maple
[ +0.000001] usb 1-4: Manufacturer: LeafLabs
[ +0.000370] cdc_acm 1-4:1.0: ttyACM1: USB ACM device
[ +0.000198] usbcore: registered new interface driver cdc_acm
[ +0.000002] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbmon 与 Wireshark:
Frame 203273: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface usbmon1, id 0
Interface id: 0 (usbmon1)
Interface name: usbmon1
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Apr 24, 2021 23:02:48.009074000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1619298168.009074000 seconds
[Time delta from previous captured frame: 0.001224000 seconds]
[Time delta from previous displayed frame: 199.923870000 seconds]
[Time since reference or first frame: 5102.916738000 seconds]
Frame Number: 203273
Frame Length: 64 bytes (512 bits)
Capture Length: 64 bytes (512 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: usb]
USB URB
[Source: host]
[Destination: 1.27.2]
URB id: 0xffff9e5a096db840
URB type: URB_SUBMIT ('S')
URB transfer type: URB_INTERRUPT (0x01)
Endpoint: 0x82, Direction: IN
Device: 27
URB bus id: 1
Device setup request: not relevant ('-')
Data: not present ('<')
URB sec: 1619298168
URB usec: 9074
URB status: Operation now in progress (-EINPROGRESS) (-115)
URB length [bytes]: 64
Data length [bytes]: 0
[Response in: 203274]
[bInterfaceClass: Communications and CDC Control (0x02)]
Unused Setup Header
Interval: 128
Start frame: 0
Copy of Transfer Flags: 0x00000204, No transfer DMA map, Dir IN
Number of ISO descriptors: 0
Frame 203274: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface usbmon1, id 0
Interface id: 0 (usbmon1)
Interface name: usbmon1
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Apr 24, 2021 23:02:48.009078000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1619298168.009078000 seconds
[Time delta from previous captured frame: 0.000004000 seconds]
[Time delta from previous displayed frame: 0.000004000 seconds]
[Time since reference or first frame: 5102.916742000 seconds]
Frame Number: 203274
Frame Length: 64 bytes (512 bits)
Capture Length: 64 bytes (512 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: usb]
USB URB
[Source: 1.27.2]
[Destination: host]
URB id: 0xffff9e5a096db840
URB type: URB_ERROR ('E')
URB transfer type: URB_INTERRUPT (0x01)
Endpoint: 0x82, Direction: IN
Device: 27
URB bus id: 1
Device setup request: not relevant ('-')
Data: not present ('E')
URB sec: 1619298168
URB usec: 9078
URB status: Operation not permitted (-EPERM) (-1)
URB length [bytes]: 0
Data length [bytes]: 0
[Request in: 203273]
[Time from request: 0.000004000 seconds]
[bInterfaceClass: Communications and CDC Control (0x02)]
Unused Setup Header
Interval: 0
Start frame: 0
Copy of Transfer Flags: 0x00000000
Number of ISO descriptors: 0