duq
Posts: 7
Joined: Wed Nov 07, 2012 10:30 pm

USB Wifi Adapter with RTL8188CUS - disconnects

Sat Apr 11, 2015 5:14 pm

Hi, I've been able to use this adapter reliably with a debian system, but for some reason it disconnects often with a Pi. I've paged through the long 46-page thread on the topic, but most discussion is from years earlier or about the general networking configuration. So my question:

With a 3.18.6 or later kernel, and using the pre-installed firmware-realtek driver on a system that is properly configured and works well with another wifi adapter, what else do I need to do to get the adapter working reliably and not dropping out?

It seems I'm not the only one with this problem as of 3.17 or 3.18; see e.g.:

https://github.com/raspberrypi/linux/issues/755

Thanks

MrEngman
Posts: 3961
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Sat Apr 11, 2015 7:41 pm

duq wrote:Hi, I've been able to use this adapter reliably with a debian system, but for some reason it disconnects often with a Pi. I've paged through the long 46-page thread on the topic, but most discussion is from years earlier or about the general networking configuration. So my question:

With a 3.18.6 or later kernel, and using the pre-installed firmware-realtek driver on a system that is properly configured and works well with another wifi adapter, what else do I need to do to get the adapter working reliably and not dropping out?

It seems I'm not the only one with this problem as of 3.17 or 3.18; see e.g.:

https://github.com/raspberrypi/linux/issues/755

Thanks
What driver are you using as I'm not sure what the "pre-installed firmware-realtek driver" is? The driver I am using does not use any extra firmware files. The one I am using is 8192cu.ko in directory /lib/modules/3.18.11-v7+/kernel/drivers/net/wireless/rtl8192cu. I've used this driver with the Pi since it first appeared without issues.

There is a built in driver but it is no longer compiled into the Pi kernel due to problems ever since the Pi was produced and was replaced by the 8192cu driver. When 3.18 first appeared the 8192cu driver was left out but has now been re-included. If you are not using the 8192cu driver I would suggest you change to it and generate the extra file, details below.

If you are using the 8192cu driver do you have the file /etc/modprob.d.8192cu.conf? If not generate the file using

Code: Select all

/etc/modprobe.d/8192cu.conf
and add the line

Code: Select all

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
This file disables power management and stops it disconnecting from the USB if it does power down. Reboot after generating the file to make it active.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

duq
Posts: 7
Joined: Wed Nov 07, 2012 10:30 pm

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Sun Apr 12, 2015 2:32 am

Hi, by pre-installed I meant the firmware that is part of the debian non-free packages that can be installed on other debian systems with "apt-get install firmware-realtek"; doing so on raspbian shows: "firmware-realtek is already the newest version."

I followed your instructions and have not had any dropped connection for several hours, so it seems to have solved the problem. Thanks a lot!

MrEngman
Posts: 3961
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Sun Apr 12, 2015 2:47 am

duq wrote:Hi, by pre-installed I meant the firmware that is part of the debian non-free packages that can be installed on other debian systems with "apt-get install firmware-realtek"; doing so on raspbian shows: "firmware-realtek is already the newest version."

I followed your instructions and have not had any dropped connection for several hours, so it seems to have solved the problem. Thanks a lot!
Glad to be able to help.

Re the firmware, the driver 8192cu does not use a separate firmware file so the firmware-realtek status is irrelevant and the package can even be removed to save a bit of space on your SD card.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

duq
Posts: 7
Joined: Wed Nov 07, 2012 10:30 pm

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Mon Apr 13, 2015 3:55 pm

The adapter is still working perfectly. I have a question about what you wrote in your last post about the driver. Is the 8192cu driver part of the kernel as of 3.17 or 3.18 then? Raspbian includes "non-free" packages in sources.list and the firmware-realtek package is pre-installed, but where does the 8192cu driver come from? The adapter does not work in a debian jessie system with a 3.16 kernel unless I install firmware-realtek there (and then it works perfectly without changing the power management flags).

User avatar
DougieLawson
Posts: 37732
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Mon Apr 13, 2015 4:13 pm

The 8192cu driver did get built in to the 3.18 kernel, because there's a lot of Edimax EW7811 dongles out there.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

duq
Posts: 7
Joined: Wed Nov 07, 2012 10:30 pm

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Mon Apr 13, 2015 4:44 pm

Thanks for the explanation. So much complexity to all of this! It's amazing anything works at all.

rfall
Posts: 1
Joined: Thu Oct 27, 2016 7:27 pm

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Thu Oct 27, 2016 7:29 pm

This worked like a charm for me, too. Thanks for this!

jayt80
Posts: 22
Joined: Tue Nov 08, 2016 11:53 pm

Re: USB Wifi Adapter with RTL8188CUS - disconnects

Wed Dec 07, 2016 1:46 am

This worked for me also!!

Thank you so much! I was about to go out and buy another wifi dongle.

I'm using latest version of Raspbian on a pizero 1.3.

Return to “General discussion”