Closed larsgk closed 10 years ago
You need to use the USB soft-connect feature to disable the pull-up on the USB lines for at least a second. This makes it a appear to the host that the device was disconnected and reconnected and so it will be re-enumerated. This might take adding some extra hardware to your schematic, specifically a fet or transistor to control the pull-up.
We are in a situation, where we would like to bring down the USBSerial device and bring it up again with a different VID/PID. However, it seems that just calling disconnect and delete on the USBSerial object (followed by a new object construction) is not enough. We have even tried with a 2 sec delay between all calls.
example:
USBSerial* serial = new USBSerial(OLDVID, OLDPID, 0x0001, false); ... serial->disconnect(); delete serial; serial = new USBSerial(NEWVID, NEWPID, 0x0001, false);
The result in dmesg is: