Re: Does usbconfig have modeswitch functionality?

From: Farhan Khan <farhan_at_farhan.codes>
Date: Wed, 14 May 2025 00:48:33 UTC
> Based on quirks or how?

That's a good question, if something causes this shift, what is it?

> camcontrol devlist -v

# camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
<Realtek USB Disk autorun 1.00>    at scbus0 target 0 lun 0 (cd0,pass0)
scbus-1 on xpt0 bus 0:
<>                                 at scbus-1 target -1 lun ffffffff (xpt0)


> would say as well?
>
> Also the output of
> usbconfig -d 1.2 dump_device_desc
> would be interesting.

# usbconfig
---
ugen1.5: <RTL8188GU 802.11n WLAN Adapter (Driver CDROM Mode) Realtek Semiconductor Corp.> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
---
# usbconfig -d 1.5 dump_device_desc
ugen1.5: <RTL8188GU 802.11n WLAN Adapter (Driver CDROM Mode) Realtek Semiconductor Corp.> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0bda 
  idProduct = 0x1a2b 
  bcdDevice = 0x0200 
  iManufacturer = 0x0001  <Realtek>
  iProduct = 0x0002  <DISK>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001 

> Is it a idProduct = 0xb711 ?

In CDROM mode, it is idProduct = 0x1a2b
Something is necessary to switch the device mode.

So back to the question - Does anyone on FreeBSD, ideally in `usbconfig`, already make this switch?