Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
bernhard
Posts: 3
Joined: 12 May 2021, 13:16

yet another device with 0bda:1a2b not switching to c811

Post by bernhard » 12 May 2021, 14:14

I bought yet another usb wifi stick, which has 0bda:1a2b and is not switching to c811 with usb_modeswitch (see also: viewtopic.php?f=3&t=2936). It is an Inter-Tech DMG-19 and documentation says that it uses Realtek RTL-8811CU chipset
(see https://www.pollin.de/p/wlan-usb-adapte ... bps-741384 and/or https://www.inter-tech.de/products/netw ... ter/dmg-19). I tried different eject methods, but none of these changed anything under Linux and/or Raspbian Buster. In the latter I also installed the latest data packet without success. It labels 0bda:1a2b as "D-Link DWA-171 Wifi Dongle", but it uses apparently a different method to achieve the modeswitch.

The logfile with EnableLogging=1 is attached.

I am tempted to use the 33 days evaluation period for http://www.usblyzer.com/ to monitor the hot-plug communication under MS Windows, but I do not really know if I can find a solution for the problem. Does anybody have some recommendations or objections?

Additional question: Is it possible to add a second method to the 0bda:1a2b file. Paging through the different files I see only one per file.

thanks in advance for any help
Attachments
usb_modeswitch_1-1_2.txt
Log file with EnableLogging=1
(3.52 KiB) Downloaded 62 times

LOM
Posts: 1380
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: yet another device with 0bda:1a2b not switching to c811

Post by LOM » 12 May 2021, 18:03

We can have another obda:1a2b based on the Manufacturer string which is Realtek in your dongle and is D-Link Corporation in the D-Link version, as reference see all the config files for 05c6:1000.
First you have to find out though how to switch it, I don't have any experience with Realtek devices so I have no idea on possible switch messages.
You could try to eject the virtual cd-rom on the cmd line:
sudo eject /dev/sr0 but that should be the same as sending the StandardEject switch message.

You can log the USB communication in MS Win with Wireshark + USBPcap, they are free.

bernhard
Posts: 3
Joined: 12 May 2021, 13:16

Re: yet another device with 0bda:1a2b not switching to c811

Post by bernhard » 14 May 2021, 10:52

hmm, I tried to use sudo eject on the command line already without success, see above.

I logged the communication with USBlyzer, but I have some problems in interpreting the results. Digging through the packets, my impression is that the driver does try to eject the disc with a start/stop unit command containing the following bulk data:
55 53 42 43 B0 B2 CE A2 00 00 00 00 00 00 06 1B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00
followed by a test unit ready command containing the following bulk data:
55 53 42 43 20 38 AA A5 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
but I am a little bit lost/overwhelmed by the information provided.

now I don't know how to use that info for additional testing.

LOM
Posts: 1380
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: yet another device with 0bda:1a2b not switching to c811

Post by LOM » 14 May 2021, 11:41

Yes the stop/start cmd is the eject media cmd, it is usually preceded by the 06 1e cmd which is the prevent/allow media removal cmd.
usb_modeswitch StandardEject is 4 cmds, allow media removal + stop unit for SCSI LUN0 and the same sequence for SCSI LUN1, this because some dongles have 2 USB Storage devices, one is a TF/SD card and one is the virtual cd-rom which can be either on LUN0 or LUN1.

If you have filtered the capture to only log communication with this USB storage device (virtual cd-rom) then there will be no more entries in the capture when this device disappears due to it being switched, so the switch command should be one of the last cmds you see near the end of your capture. The test unit ready cmd may then be used as a check that the device has disappeared.
Please confirm that the capture stops after that.

Did you try to eject the cd-rom device from linux cmdline?

bernhard
Posts: 3
Joined: 12 May 2021, 13:16

Re: yet another device with 0bda:1a2b not switching to c811

Post by bernhard » 14 May 2021, 13:07

LOM wrote: 14 May 2021, 11:41 Did you try to eject the cd-rom device from linux cmdline?
yes I tried that several times without sucess.

After having switched successfully under windows, I ejected and unplugged the stick and moved it to the raspi, and now lsusb list it as c811. I have no idea how long it must be offline to switch back/and or if it now was successfully switched by usb_modeswitch and the udev rules. I am completely puzzled.

Post Reply