Closed imatespl closed 11 months ago
Hi!
Could you clarify, what is the problem? USB device is not connecting to host when proxied? I don't see any errors in the log.
Could you also try proxying the device on a Raspberry Pi? I suspect something works differently on Orange boards. I don't have one myself to test.
Also, which card reader do you use? Please give an Amazon link or something like that.
Thanks!
ok,I will try on raspberry pi,the problem is loop in get device
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 64
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_DEVICE
Control transfer succeed
Sending data to EP0(control_in): 12 01 01 02 00 00 00 40 e3 2c 63 95 20 01 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_DEVICE
Control transfer succeed
Sending data to EP0(control_in): 12 01 01 02 00 00 00 40 e3 2c 63 95 20 01 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 255
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_CONFIG
Control transfer succeed
Sending data to EP0(control_in): 09 02 5d 00 01 01 00 a0 19 09 04 00 00 03 0b 00 00 00 36 21 10 01 00 07 03 00 00 00 a0 0f 00 00 e0 2e 00 00 03 01 2a 00 00 2c 80 0a 00 5f fe 00 00 00 07 00 00 00 00 00 00 00 be 04 04 00 10 01 00 00 ff ff 00 00 00 01 07 05 81 03 04 00 01 07 05 02 02 10 00 00 07 05 83 02 10 00 00
ep0: transferred 93 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 64
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_DEVICE
Control transfer succeed
Sending data to EP0(control_in): 12 01 01 02 00 00 00 40 e3 2c 63 95 20 01 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_DEVICE
Control transfer succeed
Sending data to EP0(control_in): 12 01 01 02 00 00 00 40 e3 2c 63 95 20 01 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 255
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_CONFIG
Control transfer succeed
Sending data to EP0(control_in): 09 02 5d 00 01 01 00 a0 19 09 04 00 00 03 0b 00 00 00 36 21 10 01 00 07 03 00 00 00 a0 0f 00 00 e0 2e 00 00 03 01 2a 00 00 2c 80 0a 00 5f fe 00 00 00 07 00 00 00 00 00 00 00 be 04 04 00 10 01 00 00 ff ff 00 00 00 01 07 05 81 03 04 00 01 07 05 02 02 10 00 00 07 05 83 02 10 00 00
I also have a card reader can proxy,the console echo like this,the first get device get config like wirte to musb-hdrc driver, and the response is musb-hdrc generic not send to pc by otg, then get device again get config again,this is send to pc by musb-hdrc,and response to raw-gadget, and then usb-proxy
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 64
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_DEVICE
Control transfer succeed
Sending data to EP0(control_in): 12 01 00 02 00 00 00 40 6b 07 21 30 02 03 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_DEVICE
Control transfer succeed
Sending data to EP0(control_in): 12 01 00 02 00 00 00 40 6b 07 21 30 02 03 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 255
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_CONFIG
Control transfer succeed
Sending data to EP0(control_in): 09 02 5d 00 01 01 03 a0 32 09 04 00 00 03 0b 00 00 00 36 21 00 01 00 07 03 00 00 00 c0 12 00 00 40 1f 00 00 04 00 2a 00 00 e7 4c 06 00 6a fe 00 00 00 07 00 00 00 00 00 00 00 b2 07 02 00 0f 01 00 00 ff ff 00 00 00 01 07 05 83 03 08 00 18 07 05 84 02 40 00 00 07 05 04 02 40 00 00
ep0: transferred 93 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0300, wIndex: 0x0000, wLength: 255
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_STRING
Control transfer succeed
Sending data to EP0(control_in): 04 03 09 04
ep0: transferred 4 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0302, wIndex: 0x0409, wLength: 255
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_STRING
Control transfer succeed
Sending data to EP0(control_in): 2c 03 53 00 6d 00 61 00 72 00 74 00 20 00 43 00 61 00 72 00 64 00 20 00 52 00 65 00 61 00 64 00 65 00 72 00 20 00 55 00 53 00 42 00
ep0: transferred 44 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
**desc = USB_DT_DEVICE**
Control transfer succeed
Sending data to EP0(control_in): 12 01 00 02 00 00 00 40 6b 07 21 30 02 03 01 02 00 01
ep0: transferred 18 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 9
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_CONFIG
Control transfer succeed
Sending data to EP0(control_in): 09 02 5d 00 01 01 03 a0 32
ep0: transferred 9 bytes (in)
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 93
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_CONFIG
Control transfer succeed
Sending data to EP0(control_in): 09 02 5d 00 01 01 03 a0 32 09 04 00 00 03 0b 00 00 00 36 21 00 01 00 07 03 00 00 00 c0 12 00 00 40 1f 00 00 04 00 2a 00 00 e7 4c 06 00 6a fe 00 00 00 07 00 00 00 00 00 00 00 b2 07 02 00 0f 01 00 00 ff ff 00 00 00 01 07 05 83 03 08 00 18 07 05 84 02 40 00 00 07 05 04 02 40 00 00
ep0: transferred 93 bytes (in)
event: control, length: 8
bRequestType: 0x00 (OUT), bRequest: 0x09, wValue: 0x0001, wIndex: 0x0000, wLength: 0
type = USB_TYPE_STANDARD
req = USB_REQ_SET_CONFIGURATION
Activating 3 endpoints on interface 0
int_in: addr = 3, ep = #4
Creating thread for EP83
Start reading thread for EP83, thread id(28356)
bulk_in: addr = 4, ep = #6
Creating thread for EP84
Start reading thread for EP84, thread id(28358)
bulk_out: addr = 5, ep = #7
Creating thread for EP05
Start writing thread for EP83, thread id(28357)
Start writing thread for EP84, thread id(28359)
Start reading thread for EP05, thread id(28360)
process_eps done
event: control, length: 8
bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0301, wIndex: 0x0409, wLength: 4
type = USB_TYPE_STANDARD
req = USB_REQ_GET_DESCRIPTOR
desc = USB_DT_STRING
Start writing thread for EP05, thread id(28361)
EP83(int_in): enqueued 2 bytes to queue
Sending data to EP83(int_in): 50 02
I will confirm the amazon link
Thank you very much.
I understand the issue now. The problem lies with the Linux card reader driver, which may cause issues when it doesn't recognize the device driver. To avoid this problem, you can set the device identification as a known device manufacturer during the response of the device information.
struct usb_device_descriptor* pdata = (struct usb_device_descriptor*)&io.data;
pdata->bcdUSB = 0x200;
pdata->idVendor = 0x076b;
pdata->idProduct = 0x3021;
pdata->bcdDevice = 0x0302;
1. usb card reader info
2. when proxy windows pc can't capture pcap use wireshark
3. usb-proxy console output like loop back to get device, when get config response write to raw_gadget
4. This two file is pcap capture from orangepc and windows
orangepc pcap windows pcap
5. It may not raw_gadget issues, but i can not find how to debug it, if you could help me, I would be very grateful. Thank you.