I'd like to cycle (simulate unplug and re-inserting) a USB device (modem) after a certain event has fired. I found a sample on codeproject:
That allows me to identify+eject the device via its non-volatile serial, but I need it to recycle, not just eject.
I have read this:
I do not understand it.
This has been mentioned in other USB related posts:
It is not relevant to my problem.
Got it working by using a commandline tool called devcon, which I then called from code.
Dropped devcon.exe into one of the system paths so it works everywhere.
Devcon: devcon
called: DEVCON Remove *usb"*MI_01"
then called: DEVCON rescan
code:
You can use the C# Hardware Helper Lib and add the ResetDevice function.
Just make sure you add
at the
public class Native
under //PARMS,