USB hubs

You can configure the USB launcher service to process USB hubs when they're attached, by defining a matching rule for the USB_CLASS_HUB class.

The matching rule can choose to ignore hubs or to launch a script or driver, as suggested here:

device() {
    class(USB_CLASS_HUB) {
--      start"echo You can launch a script or driver for hubs with\z
                a certain vid $(vendor_id) and did $(product_id)."

This general device-matching rule tells the USB launcher service to ignore all hubs. This is useful when you're using the -E option to publish hub details but you want to avoid launching drivers for hubs. Without the Ignore flag, the service selects a configuration and launches a driver when a hub is attached (even if the matching rule is empty).

As the comment in the example suggests, you can also match hub devices based on their vendor IDs and device IDs. You would do this by adding the vid and did arguments to the enclosing device rule, as explained in Matching Rule Arguments. Examining the hardware details lets you launch specific drivers for specific hub types.