what happen if set event handler onReset

when i connect a usb device through virtualhere, sometime syslog show that:

reset full-speed USB device number 111 using ehci-pci

device descriptor read/all, error 2

and then i could not connect any device any more, i need to restart virtualhere service.

So i add flowing setting in config.ini:

onReset=

I don't know if it this's gonna work.

could you explain what that config  configure for

 

#2

If it says device descriptor read/all, error 2 it means basically your USB device has buggy firmware and it needs to be physically unplugged/replugged.

On reset is not useful to fix this.

 

#3

Ok, thanks for your answer.

At default setting, when i connect a usb device, kernel logging reset ....

When set onReset=, kernel without that log, but virtualhere logging Execute "" ....

Could you tell me whether has some problem if i set onReset= in config.ini

 

#4

When the device is first used via VirtualHere, it will have a reset sent to it and the kernel will log that.

If you put in onReset= into the server config.ini file then it will skip any subsequent resets until the device is unplugged or stopped being used by virtualhere. Sometimes a USB driver on the client side might send a RESET and this confuses some devices so this custom command will skip them.

If you don't qualify the onReset with a vendor id and product id then it will just skip the reset command for all USB devices used via virtualhere. This is usually not a big deal but it might cause trouble with some devices.

So normally you should qualify the onReset with a vendor id and product id so its just applied to those devices with that vid and pid.

E.g

onReset.0424.0032=

If you don't know the vendor id/product id of the device before hand or you want to dynamically skip the reset then you can just enter into the client at runtime by right clicking on the device and selecting Custom Event Handler... and paste in exactly this. 

onReset.$VENDOR_ID$.$PRODUCT_ID$=

The $VENDOR_ID$ and $PRODUCT_ID$ will be substituted for the real values by the server when the setting is written to the server config.ini file

You can also dynamically remove the handler by right clicking on the device and selecting Custom Event Handler... and pasting in this

onReset.$VENDOR_ID$.$PRODUCT_ID$=REMOVE