Usb host and device mode

Hi all,

I would like to inquire about the functionality of the Type-C ports on the Jetson AGX Orin. I understand that both ports are capable of functioning as DFP (Downstream Facing Ports), which implies that they can act as host devices for USB peripherals.

Could you please confirm if both Type-C ports are capable of transmitting data signals and support the connection of peripherals with typec such as microphones, speakers, or mobile devices?

Additionally, I would appreciate guidance on how to check the operational modes of these ports and any relevant steps or tools to test their functionality.

Thank you for your assistance.

@KevinFFF
Kindly assist!

That’s the purpose for USB post, already many successful cases in forum.

Suggest to do the search in forum or google it to know.

Thank u Mr. Kayccc

I had already done the search on forum, i saw some customers faced a problems.

Because of that I ask you if there is an official steps to avoid any potential problem, Im not expert on jetsons to try it without official replying from your support.

U are the experts and supports, so I will wait until the responsible one answering me.

I am curious if you are asking if the type-C port can behave as a device, such as microphone, speakers, etc., or if you are asking the reverse: If micrphones, speakers, etc., are supported by plugging in to type-C. I am thinking you want to know the former instead of the latter.

If the latter, then consider that any port which is used for flash (some models of Jetsons use a micro-OTG port with a micro-B plugged in), then the Jetson is in recovery mode and becomes a custom USB device. This does not necessarily mean that software is set up to create a device when normally booted, but it does imply the hardware is present for that port. I don’t know if anyone has used the Gadget API with type-C ports, but the older models with the micro-OTG port do function to produce devices (in fact, they lack the wiring on those ports to behave as a host…that port is generally for older models’ serial console when fully booted, along with virtual wired ethernet).

I have a USB Type-C microphone, and I would like to confirm whether it will work when connected to either the J39 or J40 Type-C ports on the Jetson AGX Orin. I have the following specific questions:

  1. I understand that for the microphone to function, the Jetson AGX Orin must act as a host (Downstream Facing Port, DFP) to transmit data signals. Are the Type-C ports on the Jetson AGX configured as DFP by default, allowing the Jetson to act as a host for USB devices such as my microphone?

  2. Can you confirm if the J39 and J40 Type-C ports are set to host mode by default? This would allow me to connect my USB microphone directly without any additional configuration.

  3. If the Type-C ports are indeed in host mode by default, can they also be used to connect other devices, such as a laptop, to send data from the laptop to the Jetson AGX Orin? Is any special configuration required to enable such functionality, or can it be done seamlessly?

I would greatly appreciate it if you could address each of these questions in detail, as I would prefer not to experiment without understanding the potential risks.

Hi,

The default setting is the type C that is using for flash is in OTG mode. And another one is in host mode only.

Ok this mean i can connect the usb typec microphone on port which is on the host mode , and it will work without any problem?

But port which is using for flashing cant use it ?

Both ports will work… as I already told, that flash port in OTG mode… so it can be usb host.

Thanks alot for ur fast replying.

Only for confirming, also if i want to connect my laptop on both j39 or j40 also will work to transmit data signals from laptop into jetson ?

also if i want to connect microphone and another usb type c device and power the jetson using dc jack cable , all will work without any potentiall problem or risky in jetson, is this correct ?

Only the flash port could be usb device mode as I already mentioned.

Ok i dont want to use jetson as usb devive, as i mentioned before i want to connect usb microphone for jetson. So jetson will work as host usb is it correct ?

So on my case if i connect usb mic , jetson will work as host usb device.

U meant if i connect laptop to jetson, the jetson will work as usb device? “Even i connect the laptop on j39 or j40” ?

Please mention all info in ur answer, because i want specific answer.

  1. Yes, if you connect a usb mic, Jetson will be USB host.

  2. When laptop is connected, which one will be the usb host/device depends on the negotiation between Jetson and your laptop.
    But as I already mentioned 3 times, only that flash port could be OTG port. The other one could only be usb host role so the negotiation will only happen on the flash port.

Thank u for ur reply and patience,

I want only to check with u to avoid any potential problem before trying.

Your microphone is a “device”. Your device needs to connect to a “host”. The port which is used for flash is only a device, and only works on another computer’s host. You can ignore that port. You are interested in all of the other ports for the microphone since all of those other ports are hosts which understand your microphone device. There is no ability to use that flash port as a host, it cannot happen.

USB is itself just a data pipe, along with some plug-n-play ability. When you plug that device into your host port, all of those ports (except for the device port used in flashing) will work for the data pipe. What happens when you plug in a USB device to a host is that the host will query the device, and the device will provide details regarding what the device is. USB will then announce the presence of the device description, and if there is a driver which can handle that device, then the driver will be paired to that device. The driver is not part of USB and is a separate question as that driver must be present for it to bind to the device.

It is true that there is a large selection of “standard” devices. There are drivers which come with any USB host for the standard devices. Despite shipping with the USB, and despite those “standard” drivers seemingly being part of USB, this is just a convenience, and technically even those drivers are not part of the USB. If your microphone uses one of those standard drivers, then if your Jetson has the software to use this microphone, then the microphone will “just work”. Consider though that there sound setup options, there are sound programs to integrate into a GUI desktop, and there is in general a lot of audio software (e.g., mixers) needed to actually get a microphone output to where it needs to go. If your USB has paired to a driver, then your audio software should be able to see and use that microphone. If your audio software is set up incorrectly, then with the driver in place it means fixing the audio setup would fix the sound from the microphone. There is no way to know what that chain of audio is that you want this microphone’s driver to feed, but that software can work when set up and a driver is paired to the microphone.

One thing anyone with a USB device should do if they have issues with it is to monitor “dmesg --follow”, and then insert the device. The first part of the log which is created due to the insert will tell you what USB saw as a result of the hot plug event. The next part of the log, if it exists, will tell you if a driver was paired to the device. Possibly some user space software will then show something as a result of seeing that device, but it might be in a different log (e.g., the X11 GUI software will have a log of an audio device being connected to the GUI…that’s the user space software).

One can say that the USB connectors, except for the one used in flashing, will work with your device. If that device requires a custom driver, then we can guarantee that the device will fail unless the custom driver is added. If the driver is one of the “standard” devices, then we can say that the driver is already present, and that both USB and the driver will work and make the microphone available. Whether or not the rest of the software which deals with the microphone will work we cannot say. You’d have to try it or talk to the people who support that particular software; at this point it is no longer a “Jetson” (nor “driver”) question. Actually, all of that USB setup, with one exception, is completely unrelated to Jetsons and is just a Linux question; that one exception is the fact that Jetsons have a USB port for flashing, and the flash port cannot behave as a host; all other USB ports will act just like any other Linux PC.

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