TL-WN725N (r8188eu) channel 12 & 13

Hi,

We have customers using our product outside of the US and require support of channel 12 & 13.

We are using a TL-WN725N (r8188eu) Wi-Fi dongle with our RPi4.

It appears that the dongle does not see APs on channels 12 and 13.

We tried to set the county in config.json to GB and it appears to affect the RPi built-in wifi but not the dongle. It’s also weird as the ‘iw’ utility does not seem to be able to access the dongle.

Note that in any other respect the dongle works great - it has much better and more stable performance than the RPi4 Wi-Fi.

Any tips or ideas on how to allow the dongle (r8188eu) scan the entire 2.4Ghz band?

Thank you :wink:

Hi,

When you say the iw utility does not access the dongle, do you mean iw reg set GB does not solve your problem, or something else?

Yes. iw reg get or reg set does not see the TL-WN725N (r8188eu). It only sees the Raspberry Pi 4 internal Wi-Fi.

However, wiliest does see it (it lists the channels, interacts with the device etc).

Here’s the output from iw utility:
For “iw wlan0 info” it shows:
Interface wlan0
ifindex 4
wdev 0x1
addr dc:a6:32:71:0f:10
type managed
wiphy 0
channel 36 (5180 MHz), width: 20 MHz, center1: 5180 MHz

For “iw wlp1s0u1u2 info” it shows:
command failed: No such device (-19)

For “iwlist wlp1s0u1u2 channel” it shows:
wlp1s0u1u2 11 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Frequency:2.462 GHz (Channel 11)

As you can see it reports only 11 channels (US regulatory domain), even though we set country in config.json to GB. In GB it should report 13 channels.

We also see this behavior when the device is used abroad and APs are reporting to proper regdomain.

Any help will be greatly appreciated.

I’ve had a quick look around, but haven’t found many leads yet.
This post suggests updating to a newer version might help.

You may want to try to disable the power management of the driver.
You should be able to do this by running echo 0 > /sys/module/r8188eu/parameters/rtw_power_mgnt and reloading the driver modprobe -r r8188eu && modprobe r8188eu.

It’s difficult to pinpoint your problem without having the actual hardware (or any other device that uses the same driver).

I’m also kinda wondering if you might be hitting the USB issues other people are having with the Raspberry Pi 4 on this forum.

Hi TJvV,

After further digging I found that the original driver locks to FCC region based on the EEPROM settings (which are write once at the factory). It is possible to override this setting by changing the driver.

I was able to build a new driver and allow configuration of the regdomain, thus allowing the user of channel 12 and 13 when it is used outside the US. I built the driver using the balena-os/kernel-module-build repo - which was super helpful.

We need to incorporate the new driver in new units we’ll be building as well as units we ship overseas (already manufactured, some at customer sites).

What would be your recommendation for:

  1. Installing the driver on existing units out in the field
  2. Installing the driver as part of the image we install on new SD cards

I really appreciate all the help!

Thank you.