USBH_Device[] usbdevice = USBHostController.GetDevices();

Doesn’t seem to work corectly. If I plug in the USB device and reboot the EMX board, (the USB Device is still connected) and execute the above code, the EMX board doesn’t seem to find any usb devices. However if I do the following:

USBHostController.DeviceConnectedEvent += new USBH_DeviceConnectionEventHandler(USBHostController_DeviceConnectedEvent);

USBH_Device[] usbdevice = USBHostController.GetDevices()


void USBHostController_DeviceConnectedEvent(USBH_Device device)

Then usbdevice detects the usb device.


devices take time to be detected…sometimes seconds so your call

USBH_Device[] usbdevice = USBHostController.GetDevices();

may not work.

Try it in a loop for few seconds and all devices will be detected.

Well bummer… not exactly what I was hoping for. Thanks for the quick response.


The very first time you call it, it will do some initialization. After a second or two, it will return devices connected.


I am not Sure if this is what youre acually looking for, but if your aim is to get the USBHostController_DeviceDisconnectedEvent fired at startup sothat you dont ACTUALLY have to replug your device to get it detected, This could help.