USB를 통해 PC의 직렬 장치에 연결하려고 하는데 어떻게 해도 작동하지 않습니다.
이 장치는 STM32 기반 보드입니다.
나는 아치에 있고 내 사용자는 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