Hello USB / Linux gurus!
I have an embedded system based on an Atmel ARM Cortex-A5 CPU. It runs embedded Linux kernel V3.10 that configures its high-speed USB port as a USB device.
The USB device is configured as a USB composite made up of HID, NDIS Ethernet and MTP. Everything is working well.
However When plugging in this embedded system into a host OS like Windows, a situation arises when I must notify Window of the new MTP device. Currently the only way I know how to do that is to physically unplug the USB cable from the embedded system and plug it back in. Windows then notices the 'new' MTP connection, opens a folder pointing to the files on my device and everything is great!
I would like to find a way to do exactly the same thing programmatically... in other words bring my USB device port down and up just as if I were using 'ifconfig' for Ethernet.
Is there some command I can use to suspend and resume a USB device port?
Thank you very much!
Jean-Pierre
P.S. The USB driver I'm using is called 'atmel_usba_udc.c' and contains functions like 'atmel_usba_stop()' and 'atmel_usba_start()' that I'd like to invoke from user-space.
stop()
andstart()
functions most likely are invoked when the kernel module loads and unloads. Have you triedrmmod
/insmod
? – Ben Voigtioctl
to trigger a bus reconnect. But for cases when you have only one USB device port, then reloading the kernel driver module might be a shorter path to success. – Ben Voigt