WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Edimax EW-7811Un Loosing connection during night  (Read 4107 times)

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Edimax EW-7811Un Loosing connection during night
« on: June 20, 2017, 02:52:12 PM »
Hi,
have a strange problem with as rasp running as home automation server. wlan is working all the day but seems to die during the night.
Next morning i can't ping the ip .... but sometime if a have running the ping for 2 minutes or so it came back ... i think it have something
to do with
a. loosing the connection to the router -> how can i check and reestablish the connection?
or
b. wlan stick entering power save mode -> how can i disable this feature?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Edimax EW-7811Un Loosing connection during night
« Reply #1 on: June 20, 2017, 08:47:58 PM »
Hi aug
Quote
b. wlan stick entering power save mode -> how can i disable this feature?
Maybe this is of some use:
https://www.raspberrypi.org/forums/viewtopic.php?t=61665

Online polikuo

  • Hero Member
  • *****
  • Posts: 732
Re: Edimax EW-7811Un Loosing connection during night
« Reply #2 on: June 21, 2017, 12:15:38 AM »
a. loosing the connection to the router -> how can i check and reestablish the connection?

I've heard most modern routers feature power saving (at night) enabled by default.

When the router reboots the next morning, some setting may be lost.

Modify:

Oh! You're using a USB adapter.

I use BUFFALO myself.

This phenomenon happens quite often.

Usually cause by overheat.
« Last Edit: June 21, 2017, 12:20:04 AM by polikuo »

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Re: Edimax EW-7811Un Loosing connection during night
« Reply #3 on: June 21, 2017, 03:49:22 AM »
Hi aug
Quote
b. wlan stick entering power save mode -> how can i disable this feature?
Maybe this is of some use:
https://www.raspberrypi.org/forums/viewtopic.php?t=61665

I have no folder modprobe.d under /etc but a empty file modprobe.conf .... not really sure what do do.... create folder and file or edit the conf-file.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Edimax EW-7811Un Loosing connection during night
« Reply #4 on: June 21, 2017, 05:23:38 AM »
edit modprobe.conf and add it to your backup.

I guess the other option is to use the "blacklist" boot code to prevent the module being loaded and then manually "modprobe"  the module with the desired options.
« Last Edit: June 21, 2017, 05:26:55 AM by Juanito »

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Re: Edimax EW-7811Un Loosing connection during night
« Reply #5 on: June 22, 2017, 05:27:29 AM »
I added
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
into /etc/modprobe.conf and it worked..... ;-)

But i have a other very strange problem with the network
I configure eth0 with
 ifconfig eth0 add 192.168.1.99 up
and then
 ifconfig wlan0 add 192.168.1.2 up

wlan0 is the interface for daily work and eth0 for cases everything goes wrong and is normally not connected. But unless i connect eth0
wlan0 is not working ... very strange

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Edimax EW-7811Un Loosing connection during night
« Reply #6 on: June 22, 2017, 09:31:28 AM »
You should not configure two interfaces on the same subnet.
The kernel is likely trying to route through the disconnected eth0.

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Re: Edimax EW-7811Un Loosing connection during night
« Reply #7 on: June 22, 2017, 11:04:24 AM »
You should not configure two interfaces on the same subnet.
The kernel is likely trying to route through the disconnected eth0.
hm....maybe this is the reason .... but wlan is also not working if i execute ifconfig eth0 down during boot.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Edimax EW-7811Un Loosing connection during night
« Reply #8 on: June 22, 2017, 11:13:22 AM »
Hi aug
Try placing  eth0  on  192.168.2.99

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Re: Edimax EW-7811Un Loosing connection during night
« Reply #9 on: June 22, 2017, 12:27:53 PM »
Hi aug
Try placing  eth0  on  192.168.2.99

did it ... problem still exists .... not sure if it's really a network problem ... change the wlan stick tomorrow and add an usb hub with additional power


Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1244
Re: Edimax EW-7811Un Loosing connection during night
« Reply #10 on: June 22, 2017, 08:22:03 PM »
Couple of thoughts. 

1)  piCore doesn't have a network manager.  If you are using both eth0 and wlan0, eth0 will be set as the default route.  If you unplug eth0, the default route will not automatically change to wlan0.  You have to manage that yourself.

2) What version of piCore are you running?  The default 8192.ko driver in the 4.9.y kernels doesn't work well in piCore. (The same driver  seem to work fine in full Raspbian).   

One thing you can try..... this will try to use the nl80211 driver for wpa_supplicant first.

Code: [Select]
echo "nl80211,wext" | sudo tee -a /etc/sysconfig/wifi-wpadrv > /dev/null
echo "etc/sysconfig/wifi-wpadrv" >> /opt/.filetool.lst
filetool.sh -b

I have had nightmares with this driver it would work okay with some chipsets and not at all with others.  In the end, I had to do the same thing that OSMC does, revert to an older realtek driver.   To do this, you have to build your own kernels....which is a long story.  (For the record 4.1.y kernels with the 8192 driver were only marginally better)   So for right now, I would not recommend a wifi stick that uses the 8192 driver.

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Re: Edimax EW-7811Un Loosing connection during night
« Reply #11 on: June 23, 2017, 11:14:39 AM »
Couple of thoughts. 

1)  piCore doesn't have a network manager.  If you are using both eth0 and wlan0, eth0 will be set as the default route.  If you unplug eth0, the default route will not automatically change to wlan0.  You have to manage that yourself.

2) What version of piCore are you running?  The default 8192.ko driver in the 4.9.y kernels doesn't work well in piCore. (The same driver  seem to work fine in full Raspbian).   

One thing you can try..... this will try to use the nl80211 driver for wpa_supplicant first.

Code: [Select]
echo "nl80211,wext" | sudo tee -a /etc/sysconfig/wifi-wpadrv > /dev/null
echo "etc/sysconfig/wifi-wpadrv" >> /opt/.filetool.lst
filetool.sh -b

I have had nightmares with this driver it would work okay with some chipsets and not at all with others.  In the end, I had to do the same thing that OSMC does, revert to an older realtek driver.   To do this, you have to build your own kernels....which is a long story.  (For the record 4.1.y kernels with the 8192 driver were only marginally better)   So for right now, I would not recommend a wifi stick that uses the 8192 driver.

It's a very old version with 4.1.13 .... but can't change for other reasons (home automation). Tried with the other driver but the same, also power is not the problem (used other power supply, external hub with additional power and a new wlan stick) .... :-(