Between the first message and the second one, the device is temporarily lost, and usb_modeswitch tries to re-detect it by means of a function called "search_devices".
This function failed because two variables (busnum and devnum) were not correctly reinitialized to -1 before the second call to search_devices. I succesfully fixed the problem adding:
Code: Select all
devnum=-1;
busnum=-1;
Code: Select all
i=0;
dev = NULL;
while ( dev == NULL && i < 20 ) {...
Maybe someone else encountered this problem, so the code should be fixed this way.
Regards, and happy new year!
Marco