How to use orign nano usb3.0 as device mode?

I have used raw-gadget driver on orign nano platform, it worked on usb2.0 when host communicated with device with libusb library.
But when i connect it with pc host by usb3.0 cable,it show error asblow,Anyone can help me?thanks

bulk out address:1
bulk in address:129
bulk_out: addr = 1
bulk_in: addr = 1
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x100, wIndex: 0x0, wLength: 8
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_DEVICE
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x100, wIndex: 0x0, wLength: 18
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_DEVICE
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0xf00, wIndex: 0x0, wLength: 5
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_BOS
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0xf00, wIndex: 0x0, wLength: 5
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_BOS
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x200, wIndex: 0x0, wLength: 9
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_CONFIG
config->wTotalLength: 41
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x200, wIndex: 0x0, wLength: 41
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_CONFIG
config->wTotalLength: 41
event: control, length: 8
  bRequestType: 0x0 (OUT), bRequest: 0x9, wValue: 0x1, wIndex: 0x0, wLength: 0
  type = USB_TYPE_STANDARD
  req = USB_REQ_SET_CONFIGURATION
ioctl(USB_RAW_IOCTL_EP_ENABLE): Invalid argument
bulk_out: ep = #-1

Hi,
This is constraint of Jetson Nano developer kit. The micro-B port support USB2 device mode. USB3 device mode is not supported. Please note this.

thanks DaneLLL,But when i test USB Mass Storage function used exist example in path /opt/nvidia/l4t-usb-device-mode, I found the udisk is usb3.0 device when i run lsusb, it outputs :

Bus 004 Device 049: ID 0955:7020 NVidia Corp. 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0b95:772b ASIX Electronics Corp. AX88772B
Bus 001 Device 002: ID 0b05:19af ASUSTek Computer, Inc. 
Bus 001 Device 004: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hi,

The print may be incorrect. Please check the carrier board specification:

In 2.1 USB Ports, J28 port is shown in table 2-1. It only has D+/D- pins and no USB3 TX/RX pins.

Looks like your topic is in wrong category, you should be using Orin Nano developer kit instead of Jetson Nano. Please refer to
https://developer.nvidia.com/downloads/assets/embedded/secure/jetson/orin_nano/docs/jetson_orin_nano_devkit_carrier_board_specification_sp.pdf

If you connect to J5, it should switch to device mode automatically. Please use type-A to type-C cable, connect type-A to the post PC, and connect type-C to J5.

yes,we used orign nano,I connect with right usb cable (type-A for pc,typce-c for device which i used in our others produect).if I connect pc usb2.0 slot,it run ok(print below),but connect usb3.0 slot,not work.

event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x100, wIndex: 0x0, wLength: 64
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_DEVICE
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x100, wIndex: 0x0, wLength: 18
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_DEVICE
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0xf00, wIndex: 0x0, wLength: 5
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_BOS
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0xf00, wIndex: 0x0, wLength: 5
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_BOS
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x200, wIndex: 0x0, wLength: 9
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_CONFIG
config->wTotalLength: 41
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x200, wIndex: 0x0, wLength: 41
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_CONFIG
config->wTotalLength: 41
event: control, length: 8
  bRequestType: 0x0 (OUT), bRequest: 0x9, wValue: 0x1, wIndex: 0x0, wLength: 0
  type = USB_TYPE_STANDARD
  req = USB_REQ_SET_CONFIGURATION
bulk_out: ep = #0
bulk_in: ep = #1
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x300, wIndex: 0x0, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x303, wIndex: 0x409, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
17:04:49 : usb_gadget.cpp(739) *****enter bulk_read_loop******
event: control, length: 8
  bRequestType: 0x80 (IN), bRequest: 0x6, wValue: 0x304, wIndex: 0x409, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
17:04:49 : main.cpp(42) .......start usb translate........

Is this still an issue to support? Any result can be shared?

We switched cdc-ncm solution, it works. thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.