SpiderKenny2
Posts: 18
Joined: Wed Apr 22, 2015 3:14 pm

WiFi drops - EDIMAX EW-7811Un

Fri Apr 24, 2015 1:51 pm

Hi everyone

I have a compute module on the CMIO board, running 2014-12-24 Raspbian Wheezy.
I installed an Edimax EW-7811Un wifi dongle on USB and it pretty much worked straight out of the box once I set the wpa-supplicant information.

The issue I am facing is that if the WiFi interface is idle it drops off the network for a few seconds at a time.
If I keep the WiFi interface busy (for example, by doing a PING from the compute module to the router) then the wifi stays up no problem.

So say for example if I use ssh to login to the compute module from another machine, my ssh session will stop responding if it is idle for more than just a few seconds.

If I also logon to the compute module via the serial console, and from there keep the wifi busy by doing :
ping 192.168.1.254 (my router address) then the ssh session will work perfectly.

I cannot see anything in /var/log/messages or /var/log/kernel to explain why it drops and re-establishes the wifi when idle.

Any ideas?

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

Re: WiFi drops - EDIMAX EW-7811Un

Fri Apr 24, 2015 2:34 pm

Could be a power management issue although that normally takes rather longer than a few seconds to kick in when the wifi is idle.

However, you could try adding the file /etc/modprobe.d/8188eu.conf with

Code: Select all

sudo nano /etc/modprobe.d/8188eu.conf
and adding the single line content

Code: Select all

options 8188eu rtw_power_mgnt=0 rtw_enusbss=0
This will disable power management for the 8188eu driver.


MrEngman
Last edited by MrEngman on Thu Jul 30, 2015 3:36 pm, edited 1 time in total.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

SpiderKenny2
Posts: 18
Joined: Wed Apr 22, 2015 3:14 pm

Re: WiFi drops - EDIMAX EW-7811Un

Fri Apr 24, 2015 3:13 pm

Thank you - I will give that a try.

SpiderKenny2
Posts: 18
Joined: Wed Apr 22, 2015 3:14 pm

Re: WiFi drops - EDIMAX EW-7811Un

Fri Apr 24, 2015 3:27 pm

I created the file /etc/modprobe.d/8188eu.conf with the contents you suggested and this seems to have corrected the issue.
So thank you!
MrEngman wrote:Could be a power management issue although that normally takes rather longer than a few seconds to kick in when the wifi is idle.

However, you could try adding the file /etc/modprobe.d/8188eu.conf with

Code: Select all

sudo nano options 8188eu rtw_power_mgnt=0 rtw_enusbss=0
and adding the single line content

Code: Select all

options 8188eu rtw_power_mgnt=0 rtw_enusbss=0
This will disable power management for the 8188eu driver.


MrEngman

SpiderKenny2
Posts: 18
Joined: Wed Apr 22, 2015 3:14 pm

Re: WiFi drops - EDIMAX EW-7811Un

Mon Apr 27, 2015 3:10 pm

Hmmm.
That seemed to work on Friday, but today it is back to it's old tricks.

After I booted up today it was a few minutes before I tried to "ssh" to the module. The attempt to login timed out, and all pings to it's address failed.

Using a serial module on GPIO14 and GPIO15 I logged in and started a ping form the compute module to the router. This brought the wifi back up and as long as the ping is going the wifi stays up. If I stop the ping, the wifi drops after a short time and nothing external can bring it back up, I have to do something from the serial console to awaken the wifi.

Can you confirm I have this right:
I have a file called "8188eu.conf" at /etc/modprobe.d :

Code: Select all

-rw-r--r-- 1 root root   47 Apr 24 15:19 8188eu.conf
The file contains a single line:

Code: Select all

options 8188eu rtw_power_mgnt=0 rtw_enusbss=0
Is that all I should need to keep the device awake?

SpiderKenny2
Posts: 18
Joined: Wed Apr 22, 2015 3:14 pm

Re: WiFi drops - EDIMAX EW-7811Un

Mon Apr 27, 2015 3:34 pm

I think according to http://www.andreagrandi.it/2014/09/02/h ... -raspbian/ all references to 8188eu should in fact be 8192cu including the device name and the file name.
I updated all references and it seems to work now.

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

Re: WiFi drops - EDIMAX EW-7811Un

Mon Apr 27, 2015 3:43 pm

Looks to be the same I use, however ...

Sorry but it looks like I screwed up. The EW-7811Un uses the 8192cu driver, not the 8188eu driver, doh! I copied the details from my Pi running with a TP-Link TL-WN725N adapter, not my Pi with the EW-7811Un adapter.

To fix it change the value 8188eu in the file to 8192cu and rename the file to 8192cu.conf. That should work rather better.

Sorry, I really must get my brain sorted. :D


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

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

SpiderKenny2
Posts: 18
Joined: Wed Apr 22, 2015 3:14 pm

Re: WiFi drops - EDIMAX EW-7811Un

Mon Apr 27, 2015 4:11 pm

Hi again.

Now worries - it was a good learning exercise for me, so thank you!

Return to “HATs and other add-ons”