2

I know udevadm info gives the devtype of disks as disk. However, how would I get the devtype of a usb wifi adapter? (ie wlan, wwan, etc)

6

Use lsusb and find your device. I will post my lsusb as an example

Bus 002 Device 007: ID 13b1:0026 Linksys WUSB54GSC v1 802.11g Adapter [Broadcom 4320 USB]
Bus 002 Device 006: ID 0a5c:2148 Broadcom Corp. BCM92046DG-CL1ROM Bluetooth 2.1 Adapter
Bus 002 Device 005: ID 0a5c:4503 Broadcom Corp. Mouse (Boot Interface Subclass)
Bus 002 Device 004: ID 0a5c:4502 Broadcom Corp. Keyboard (Boot Interface Subclass)
Bus 002 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 8086:0186 Intel Corp. WiMAX Connection 2400m
Bus 001 Device 003: ID 04f2:b1d6 Chicony Electronics Co., Ltd CNF9055 Toshiba Webcam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 007 is the old wifi card and the format for the udev command with USB devices is

 udevadm info /dev/bus/usb/{BUS_NUMBER}/{DEVICE_NUMBER}

So I would enter udevadm info /dev/bus/usb/002/007 to get the info.

What you need to enter depends on your lsusb results.

For USB network-related device types to be used by udev:

  1. Get the name of the interface from ifconfig.
  2. Then run: udevadm info /sys/class/net/{name of interface}
  3. Search for: ID_TYPE=. This type will be more specific than DEVTYPE=usb_device. A type of generic may indictate the driver hasn't set a type for this device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.