$ sudo apt install usb-modeswitch
$ sudo usb_modeswitch -KW -v 0bda -p 1a2b
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple
modes
* Version 2.5.2 (C) Josua Dietze 2017
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x0bda
DefaultProduct= 0x1a2b
StandardEject=1
Look for default devices ...
found USB ID 0bda:1a2b
vendor ID matched
product ID matched
found USB ID 8087:0024
found USB ID 1d6b:0002
found USB ID 8087:0024
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 003 on bus 002
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x0b (out) and 0x8a (in)
USB description data (for identification)
-------------------------
Manufacturer: Realtek
Product: DISK
Serial No.: not provided
-------------------------
Sending standard EJECT sequence
Looking for active drivers ...
OK, driver detached
Set up interface 0
Use endpoint 0x0b for message sending ...
Trying to send message 1 to endpoint 0x0b ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes), status 1
Trying to send message 2 to endpoint 0x0b ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes), status 0
Trying to send message 3 to endpoint 0x0b ...
Sending the message returned error -1. Try to
continue
Read the response to message 3 (CSW) ...
Response reading failed (error -1)
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!
|