BT HH 5.0 A not detecting USB device

I'm experimenting with building a WiFi extender with a long range antenna on an external RTL8187 wifi device connected to OpenWrt router's USB port.

If I plug the USB wifi device into a Netgear WNDT3700v4 running 21.02.5 I see:

[26704526.493013] usb 1-1: new high-speed USB device number 4 using ehci-platform
[26704556.949365] usb 1-1: USB disconnect, device number 4

The target OpenWrt device is a Plusnet Hub One with OpenWrt 21.02.7, which sits under lantiq-xrx200 builds. If I plug the USB wifi device into it I see no sign of recognition in dmesg or /sys/kernel/debug/usb/devices. A USB storage stick works fine. I've also tried boosting current to the USB device using a power Y cable, but it was sitting at a stable 5V anyway without this. And a few alternate USB cables in case it was that.

The kmod-usb-* items look similar on both devices. These look like the relevant ones on the Netgear and I see equivalents on the Plusnet:

kmod-usb-core - 5.4.215-1
kmod-usb-ehci - 5.4.215-1
kmod-usb2 - 5.4.215-1

Even if the drivers, etc don't load I'd expect the basic USB device recognition to work. Before I start multiple upgrades / downgrades to try and find something which works are there known challenges in this area?

is really outdated.

I agree, does the hw work elsewhere ?

Agreed. I pulled it out of my semi-retired routers box to see if it worked.

The USB wifi device works fine when connected to a Windows PC. The aim of the project is to turn that 1 device usability into a hotspot for multiple clients. As indicated above it gets as far as USB detection on the Netgear, so signs of working. I could press on with trying to get the radio showing in LUCI, etc if useful.

appears to be 802.11g, are you sure your clients are capable of running in g mode ?

you need the USB VID and PID to be able to figure out which driver to install, unless google can help.

The USB wifi device connects fine to the upstream network on Windows and will make the Plusnet running OpenWrt a client to that same network. I'll then use the built in radios for modern clients to connect.

Even to get USB detection working? The Netgear shows VID=0bda, PID=8187

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  7 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=8187 Rev= 1.00
S:  Manufacturer=Manufacturer_Realtek_RTL8187_
S:  Product=RTL8187_Wireless
S:  SerialNumber=00E04C8FC0AD
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Alfa AWUS036H usb adapter seems to list the packages you need.

I have kmod-rtl8187 installed in anticipation of the device being detected, but until it appears on the USB list I don't expect much to happen.

I'll try plugging a few more USB things into the Plusnet to see if there is a pattern to where basic USB identification is or is not working.

although not very likely, try a powered USB hub too, if you got one.

upgrading could be a good idea too, might be a bug.

I did try boosting available current using a Y-cable to bring more current availability into the device, but the port was already a healthy 5V with device plugged in. I'll try and find my powered hub as well, in case the extra level of USB-ness magically helps.

I'll try a couple of select up and downgrades, but hard to know what to go for if it is intermittently appearing and going.

Thanks as ever :+1:

V <> A

A is usually the problem, not V.

While you need to get the USB layer device detection sorted first, RTL8187 is not going to be happy camping. Yes, the driver works (not checked on OpenWrt though) in STA mode, but its capabilities are rather limited (and e.g. AP mode is no on the table).

Yes, but a sign of the current being insufficient is that the voltage will drop under load.

Agreed. But the RTL8187 will not be in AP mode. As long as "limited" allows the OpenWrt device to be a client of the upstream network the plan is to use the built in radios an AP hotspot.

I tried 23.05.4, with same result.

On 23.05.4 and 21.02.7 the USB port shows detection of a wired optical mouse in dmesg, but not the wifi device. I'm going to assume it is some kind of USB chip / physical signalling level issue and replan.

May try a 19.x.y...

OOB 19.07.9 doesn't detect the optical mouse in dmesg (even to say it doesn't know what to do), so it looks like there is a software bit involved in the base detection that has evolved since then until 21.x.y, but not enough to find the wifi device.

is this the same as the BT HH 5.0 A ?

in that case, read https://openwrt.org/toh/bt/homehub_v5a#hardware1

Yes, same device. I had read that, and it was why I'd already tried bringing an additional 5V supply onto the rails. Doesn't change things though. Or are you referring to something that I've missed?

nah, just wanted to make sure you were aware of the USB port issue on the device.

I switched over to a Netgear R6800 to get things working.

The USB RTL8187 is then detected at USB level with a fresh OpenWrt install. There doesn't seem to be an kmod-rtl8187 on 23.x.y stable, so I dropped back to 22.03.7 for now. Once the module is added the USB device appears as a radio straight away :slight_smile:.

If the general plan comes together I'll then work out how to switch devices around for best use of features in different places and build by own image / kmod if needed.