Sometimes USB devices need certain commands to be sent to them to workaround their in-built differences (or quirks). Most USB devices will work with VirtualHere without having to set anything special in the configuration.
However some devices like iPads/iPods and some phones require certain commands to be sent on specific events to function properly. VirtualHere will automatically generate the special events for iPad/iPhone/iPod2G and Galaxy S without requiring any changes by you.
Devices that VirtualHere does not have default quirk handlers for will require special configuration:
The way the VirtualHere server handles this is to provide a callback mechanism to enable a bash script to be executed to issue commands. The callback mechanism is specified in the server configuration. The event type is specified and a dot, then vendor id and optionally a dot and product id that the quirk is specified for. If no product id is specified, all products from that vendor have the quirk script executed against.
For example the default iPad scripts are as follows (written inside the server config.ini)
onEnumeration.05ac=cat $DEVPATH$/bNumConfigurations > $DEVPATH$/bConfigurationValue
onBind.05ac=cat $DEVPATH$/bNumConfigurations > $DEVPATH$/bConfigurationValue
VirtualHere will replace
$DEVPATH$ with the kernel device path at runtime. What these line do is set the iPad configuration to the maximum configuration number supported by the device when its first plugged in and when it is "used" by a remote client. This allows proper operation of the iDevice.
There are six events that the VirtualHere server provides callbacks to:
onBind.<vendor_id>[.<product_id>] - Occurs when the user selects "Use" on the client.
onEnumeration.<vendor_id>[.<product_id>] - Occurs when the USB device goes through "enumeration" when it is first plugged into the server
onReset.<vendor_id>[.<product_id>] - Occurs when a device is required to be "reset"
onPassToKernel.<vendor_id>[.<product_id>] - Occurs when a device control is passed from VirtualHere (for example if the device or bus is ignored) to the Linux Kernel (host).
onClearHalt.<vendor_id>[.<product_id>] - Occurs when a device endpoint has the USB "clear halt" applied to it
onResetEp.<vendor_id>[.<product_id>] - Occurs when a device has the linux "reset endpoint" operation applied to it
onUnbind.<vendor_id>[.<product_id>] - Occurs when a device is unbound from a user, e.g the User selects "Stop Using"
The USB Specification provides exact definitions of "enumeration" and "reset", and "clear halt"
Contact email@example.com for help with setting your device quirks.