Discussion:
driver support for USB WiFi RTL8188GU
(too old to reply)
Miroslav Lachman
2023-10-09 17:31:18 UTC
Permalink
Hi,
I accidentally bought the wrong USB WiFi Realtek RTL8188GU. I thought it
would have support in rtwn or rsu, since both drivers mention the number
8188, but I didn't notice that my purchased WiFi dongle has different
letters at the end.
Is it possible that the RTL8188GU would work with one of those drivers
after some addition of identification, or is it a completely different
chip and not possible to get it to work in FreeBSD?

Identification of the USB WiFI dongle:

# usbconfig -d ugen1.4 dump_device_desc
ugen1.4: <Realtek DISK> 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


I tried it with loaded modules on FreeBSD 13.2:

40 1 0xffffffff8506f000 a7c0 if_rsu.ko
41 1 0xffffffff8507a000 1feb0 rsu-rtl8712fw.ko
42 2 0xffffffff8509a000 19130 rtwn.ko
43 1 0xffffffff850b4000 e000 if_rtwn_usb.ko
44 1 0xffffffff850c2000 4ca8 rtwn-rtl8188eefw.ko
45 1 0xffffffff850c7000 5728 rtwn-rtl8188eufw.ko
46 1 0xffffffff850cd000 60a8 rtwn-rtl8192cfwE_B.ko
47 1 0xffffffff850d4000 5ac0 rtwn-rtl8192cfwE.ko
48 1 0xffffffff850da000 5fd8 rtwn-rtl8192cfwT.ko
49 1 0xffffffff850e0000 5fd8 rtwn-rtl8192cfwU.ko
50 1 0xffffffff850e6000 9d28 rtwn-rtl8192eufw.ko
51 1 0xffffffff850f0000 9e18 rtwn-rtl8812aufw.ko
52 1 0xffffffff850fa000 8d78 rtwn-rtl8821aufw.ko

But it was not recognized.

Kind regards
Miroslav Lachman


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gary Jennejohn
2023-10-10 08:00:05 UTC
Permalink
On Mon, 9 Oct 2023 19:31:18 +0200
Post by Miroslav Lachman
Hi,
I accidentally bought the wrong USB WiFi Realtek RTL8188GU. I thought it
would have support in rtwn or rsu, since both drivers mention the number
8188, but I didn't notice that my purchased WiFi dongle has different
letters at the end.
Is it possible that the RTL8188GU would work with one of those drivers
after some addition of identification, or is it a completely different
chip and not possible to get it to work in FreeBSD?
# usbconfig -d ugen1.4 dump_device_desc
ugen1.4: <Realtek DISK> 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
40 1 0xffffffff8506f000 a7c0 if_rsu.ko
41 1 0xffffffff8507a000 1feb0 rsu-rtl8712fw.ko
42 2 0xffffffff8509a000 19130 rtwn.ko
43 1 0xffffffff850b4000 e000 if_rtwn_usb.ko
44 1 0xffffffff850c2000 4ca8 rtwn-rtl8188eefw.ko
45 1 0xffffffff850c7000 5728 rtwn-rtl8188eufw.ko
46 1 0xffffffff850cd000 60a8 rtwn-rtl8192cfwE_B.ko
47 1 0xffffffff850d4000 5ac0 rtwn-rtl8192cfwE.ko
48 1 0xffffffff850da000 5fd8 rtwn-rtl8192cfwT.ko
49 1 0xffffffff850e0000 5fd8 rtwn-rtl8192cfwU.ko
50 1 0xffffffff850e6000 9d28 rtwn-rtl8192eufw.ko
51 1 0xffffffff850f0000 9e18 rtwn-rtl8812aufw.ko
52 1 0xffffffff850fa000 8d78 rtwn-rtl8821aufw.ko
But it was not recognized.
In current (FreeBSD-15) it's in usbdevs as:

product REALTEK RTW8821CU_CD 0x1a2b RTW8821CU_CD

You could try adding that to /usr/src/sys/dev/usb/usbdevs and then re-build
your kernel and modules and test whether it's recognized.

--
Gary Jennejohn


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Miroslav Lachman
2023-10-10 08:45:26 UTC
Permalink
Post by Gary Jennejohn
On Mon, 9 Oct 2023 19:31:18 +0200
Post by Miroslav Lachman
Hi,
I accidentally bought the wrong USB WiFi Realtek RTL8188GU. I thought it
would have support in rtwn or rsu, since both drivers mention the number
8188, but I didn't notice that my purchased WiFi dongle has different
letters at the end.
Is it possible that the RTL8188GU would work with one of those drivers
after some addition of identification, or is it a completely different
chip and not possible to get it to work in FreeBSD?
# usbconfig -d ugen1.4 dump_device_desc
ugen1.4: <Realtek DISK> 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
product REALTEK RTW8821CU_CD 0x1a2b RTW8821CU_CD
You could try adding that to /usr/src/sys/dev/usb/usbdevs and then re-build
your kernel and modules and test whether it's recognized.
Thank you for the hint, but it seems it is already in 13.2.
https://cgit.freebsd.org/src/commit/sys/dev/usb/usbdevs?h=releng/13.2&id=226fef966a1f234d871c199af77ca411f87d2389

It looks like idProduct = 0x1a2b is just the fake CD-ROM drive. Should I
found some different id and add it?
I am sorry for maybe stupid question but this is the first time I play
with USB WiFi dongle on FreeBSD.

Kind regards
Miroslav Lachman



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Juraj Lutter
2023-10-11 11:14:45 UTC
Permalink
Post by Andrey V. Elsukov
1) is this idProduct = 0xb711 the ID I should try to add somewhere?
2) is there a way to avoid manual eject every time I try to use this dongle? (I tried usbconfig -d ugen1.4 add_quirk UQ_MSC_IGNORE with no luck)
https://github.com/torvalds/linux/blob/1c8b86a3799f7e5be903c3f49fcdaee29fd385b5/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c#L7792
The most corresponding our analog seems to be rtwn(4) driver. But it lacks support for rtl8710b. Even if you add device id, it won't work.
I have also found https://github.com/McMCCRU/rtl8188gu


Juraj Lutter
***@FreeBSD.org



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Juraj Lutter
2023-10-10 08:49:12 UTC
Permalink
Post by Miroslav Lachman
Thank you for the hint, but it seems it is already in 13.2.
https://cgit.freebsd.org/src/commit/sys/dev/usb/usbdevs?h=releng/13.2&id=226fef966a1f234d871c199af77ca411f87d2389
It looks like idProduct = 0x1a2b is just the fake CD-ROM drive. Should I found some different id and add it?
I am sorry for maybe stupid question but this is the first time I play with USB WiFi dongle on FreeBSD.
These dongles often starts in “mass storage mode” where you can find (mostly) Windows drivers on it.
Once you do “eject” on the “mass storage device”, the dongle should switch into “Wireless NIC” mode.

hth
otis



Juraj Lutter
***@FreeBSD.org



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gary Jennejohn
2023-10-10 11:18:12 UTC
Permalink
On Tue, 10 Oct 2023 11:18:57 +0200
Post by Miroslav Lachman
Thank you for the hint, but it seems it is already in 13.2.
https://cgit.freebsd.org/src/commit/sys/dev/usb/usbdevs?h=releng/13.2&id=226fef966a1f234d871c199af77ca411f87d2389
It looks like idProduct = 0x1a2b is just the fake CD-ROM drive. Should I found some different id and add it?
I am sorry for maybe stupid question but this is the first time I play with USB WiFi dongle on FreeBSD.
These dongles often starts in ?mass storage mode? where you can find (mostly) Windows drivers on it.
Once you do ?eject? on the ?mass storage device?, the dongle should switch into ?Wireless NIC? mode.
Thank yoy, that get me further.
# eject -v /dev/cd0
eject: trying device /dev//dev/cd0c
eject: trying device /dev//dev/cd0
eject: trying device /dev/cd0
eject: ejecting media from /dev/cd0
# tail -f /var/log/messages
Oct 10 11:04:21 xxx kernel: ugen1.4: <Realtek DISK> at usbus1 (disconnected)
Oct 10 11:04:21 xxx kernel: umass0: at uhub3, port 3, addr 4 (disconnected)
Oct 10 11:04:21 xxx kernel: cd0 at umass-sim0 bus 0 scbus4 target 0 lun 0
Oct 10 11:04:21 xxx kernel: cd0: <Realtek USB Disk autorun 1.00> detached
Oct 10 11:04:21 xxx kernel: (cd0:umass-sim0:0:0:0): Periph destroyed
Oct 10 11:04:21 xxx kernel: umass0: detached
Oct 10 11:04:21 xxx kernel: ugen1.4: <Realtek 802.11n WLAN Adapter> at
usbus1
Oct 10 11:04:21 xxx webcamd[61945]: webcamd: Cannot find USB device
But no wlan device detected
# sysctl net.wlan.devices
# usbconfig -d ugen1.4 dump_device_desc
ugen1.4: <Realtek 802.11n WLAN Adapter> 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 = 0xb711
bcdDevice = 0x0200
iManufacturer = 0x0001 <Realtek>
iProduct = 0x0002 <802.11n WLAN Adapter>
iSerialNumber = 0x0003 <00E04CB82101>
bNumConfigurations = 0x0001
1) is this idProduct = 0xb711 the ID I should try to add somewhere?
2) is there a way to avoid manual eject every time I try to use this
dongle? (I tried usbconfig -d ugen1.4 add_quirk UQ_MSC_IGNORE with no luck)
1) could be worth a try, since the CD and WLAN functions have unique
idProduct values.
2) I must admit that I have no idea how to do this.

--
Gary Jennejohn


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Andrey V. Elsukov
2023-10-11 10:18:02 UTC
Permalink
1) is this idProduct = 0xb711 the ID I should try to add somewhere?
2) is there a way to avoid manual eject every time I try to use this
dongle? (I tried usbconfig -d ugen1.4 add_quirk UQ_MSC_IGNORE with no luck)
In linux 0xb711 device is handled by rtl8xxxu driver:
https://github.com/torvalds/linux/blob/1c8b86a3799f7e5be903c3f49fcdaee29fd385b5/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c#L7792

The most corresponding our analog seems to be rtwn(4) driver. But it
lacks support for rtl8710b. Even if you add device id, it won't work.
--
WBR, Andrey V. Elsukov



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...