RTL8192CU speed issue

Hi,

I recently switched to Dietpi for my audio endpoints and am very happy with it.
Only one of my PI’s has a TP-WN822n usb wifi adapter. It is a V3 type with a RTL8192CU chipset.

The problem is that it won’t connect with speeds over 72.2Mbit and with the stock Raspbian it connected with the full 300Mbit of which it is capable.

Must be a driver problem. Can anybody help me out?

Thx in advance,
Jelle

Hi castle,

Make sure you have set the Wifi country code for your country, enables channels and power ratings legal for your country: dietpi-config > Networking: Adapters > WiFi.

note to self:
Maximum PHY data rate up to 144.4Mbps using 20MHz bandwidth, 300Mbps using 40MHz bandwidth
http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=277

If problems persist, please let us know. I’ve got a RTL8192CU Edimax Nano laying around somewhere that we can use to run some tests.

Thx for the reply Fourdee.

I have got the country code set to NL as I did with Raspbian.
So the problem still persists :wink:

Also after the most recent update of DietPi.

Hope you can help me out!

Regards,
Jelle

And to add to that, your note to self just sinked in. Looks like it is stuck on 10mhz bandwth as it is exactly half of the 20Mhz speed.

Thanks.

Git Ticket, will take a look in the next day or two, you can track progress here: https://github.com/Fourdee/DietPi/issues/564

Hi Castle,

I got expected results with my Edimax Nano:https://github.com/Fourdee/DietPi/issues/564#issuecomment-255529922, however, this is not 300mbit capable.

Can you please verify your router is running with a 40mhz channel width? Sometimes, if this is set to Auto, it can automatically flick between 20mhz and 40mhz without any indication, in which case, wifi speeds would be reduced.

Yes my router is running at 40mhz bandwidth.
When I plug it into my laptop it has a 300Mbit connection.

Back to the RPI3 it is stuck at the 72.2Mbit.
As I said earlier, with Raspbian light it runs at least at 150Mbit.

Regards,
Jelle

To add to this.
The activity led on de wifi device doesn’t come on or flicker on activity as with Jessie light.

Bizzare, lets check the status of the device might give us some more info, can you paste results of:

iwconfig wlan0

To make it more interesting, I did a complete reinstall.
I added my wireless settings in dietpi.txt before first boot.
Started up the Pi and… it connected with 300Mbt…
It ran thru the first installation scripts and after the first reboot… back to 72.2Mbit…

Here’s the dump as per your request:

root@RPI-Keuken:~# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:“Castlepoint”
Mode:Managed Frequency:2.427 GHz Access Point: E4:F4:C6:1C:4F:20
Bit Rate=65 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=58/70 Signal level=-52 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:1 Invalid misc:0 Missed beacon:0

Thanks,

Signal strength is a little low -52dBm. Just wondering if the NL country code is causing a unexplaned reduction in Wifi performance. Raspbian is set to GB as standard (naughty), which is the same channels and ratings for WiFi G, although, unsure for N so you may want to check your countries legislation for wireless N.

Can you please try the following:

  • Put the RPi in the same room and level as the router (eg: next to it). Power on and get the iwconfig wlan0 results
  • Change the country code to GB (this is the same as NL for WiFi G, 1-11 channels and 100mW power: Cisco Wireless Control System - Retirement Notification - Cisco), so iw reg set GB then wait a few seconds and iwconfig wlan0

This is with the region set to GB.
I already tried this one :slight_smile:

root@RPI-Keuken:~# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:“Castlepoint”
Mode:Managed Frequency:2.427 GHz Access Point: E4:F4:C6:1C:4F:20
Bit Rate=72.2 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=65/70 Signal level=-45 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Regards,
Jelle

Just comes to mind. At first boot after a clean install, the wifi adapter is recognised as a TP-link device.
After the first reboot initiated by the install script it get’s a new ip from the dhcp server and is not recognised as a TP-link device.

Strange isn’t it?

Jelle

This is de lsusb output:

root@RPI-Keuken:~# lsusb
Bus 001 Device 004: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hi Jelle,

Yep, very strange. DietPi doesn’t do anything that would cause this to happen during 1st run, at least, not from looking at source code and patch code.

the wifi adapter is recognised as a TP-link device

Is this from the router webpage, or obtained by lsusb (or another) ?

Also, are you using the v133 RPi image (eg: DietPi_v133*.img) ?

I’m using the 133 image.
And yes, it is from the router webpage.

Can I change the mac address in dietpi?

Regards,
Jelle

BTW
I got this from lsmod:
root@RPI-Keuken:~# lsmod
Module Size Used by
8192cu 560049 0
brcmfmac 186343 0
brcmutil 5661 1 brcmfmac
cfg80211 427855 2 brcmfmac,8192cu
rfkill 16037 2 cfg80211
bcm2835_wdt 3225 0
bcm2835_gpiomem 3040 0
uio_pdrv_genirq 3164 0
uio 8000 1 uio_pdrv_genirq
fuse 83461 1
ipv6 347530 20

As far as i’am aware Raspbian (which DietPi for RPi is based on) pulls the MAC codes directly from the device. Although, there is probably a way to override that somehow, but will require the Google treatment (search). :slight_smile:

I gave up and reverted back to plain Jessie lite.
Now the wifi adapter is working at the proper 300Mbit.

It is now back on the proper MAC address, the one it has before the first reboot when installing Dietpi.

Something is wrong with the setup. I don’t think it is the driver. Plain vanil;la Jessie uses the same.
It has something to do with the network setup. If I plug in a network cable, the cable and the WiFi share an ip/mac address and when I unplug the WiFi module, the Wlan0 stays online…

And this with a fresh unaltered install of v133…

I’ll keep monitoring the this thread when somebody comes up with something…
I do like the Dietpi. It is working nicely on other Pies in my home.

Reagards,
Jelle

Did a final check with the plain Jessie.

It uses the 8192eu settings. Dietpi uses the 8192cu version.

I will do a clean install and check if it makes a difference.

Keep you posted.

Regards,
Jelle

There were several .conf files in the /etc/modprobe.d/ directory with the Dietpi image.
Even after deletion of all but one of them it doesn’t work.

Back to Jessie lite again…