Page 1 of 1

Losing connection to pi

Posted: Sun Nov 02, 2014 8:09 am
by taskman
Hi

So I connect to the pi using ssh through wifi (putty on Windows) and I alt tab. When I alt tab back and try to type I am normally disconnected then I need to reconnect, we are talking about disconnected in 1 minute or less. Sometimes I can't reconnect at all. If I give it 5 minutes or so I can sometimes connect again. I also can't connect using tightvnc in this time. If after 5 minutes I can't connect I need to go to the pi and reboot it. I have no clue why this would happen. I have very little Linux experience

Re: Losing connection to pi

Posted: Sun Nov 02, 2014 11:36 am
by DirkS
It could be that your dongle goes into power safe mode. Does your /etc/network/interfaces have the line

Code: Select all

wireless-power off
in it?
This switches off power management (in theory, at least).
Some dongles can be persuaded with some additional settings elsewhere, but for that we would need to know the exact type.
Can you post the output of 'lsusb' here?

Gr.
Dirk.

Re: Losing connection to pi

Posted: Sun Nov 02, 2014 1:34 pm
by taskman
This is what the command gives back

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wi reless Adapter [Realtek RTL8188CUS]
Bus 001 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver

The pi does go to sleep after some time, but I lose connection in 10 seconds of alt+tab. This is an example. I ran the command, copied the text into the browser, tabbed back to putty and I lost the connection


This is the contents of the file
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

I changed putty to send a keep alive every 2 seconds. I will see how that goes

Re: Losing connection to pi

Posted: Sun Nov 02, 2014 1:42 pm
by DirkS
Try modifying /etc/network/interfaces as mentioned above.
Additionally make the changes mentioned in http://www.raspberrypi.org/forums/viewt ... 65#p458761

HTH
Dirk.

Re: Losing connection to pi

Posted: Sun Nov 02, 2014 1:43 pm
by DougieLawson
The Edimax driver doesn't support using wireless-power off in the interfaces file. You need to create /etc/modprobe.d/8192cu.conf with this content

Code: Select all

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
and reboot your RPi to get it active.

Re: Losing connection to pi

Posted: Sun Nov 16, 2014 6:19 am
by taskman
Thank you, only did that now, couldn't get back to the Pi until today. Will see how this goes

Re: Losing connection to pi

Posted: Mon Nov 17, 2014 5:37 am
by taskman
This works for the wifi, it doesn't shut down now anymore. Thank you