taskman
Posts: 14
Joined: Sun Nov 02, 2014 8:00 am

Losing connection to pi

Sun Nov 02, 2014 8:09 am

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

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Losing connection to pi

Sun Nov 02, 2014 11:36 am

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.

taskman
Posts: 14
Joined: Sun Nov 02, 2014 8:00 am

Re: Losing connection to pi

Sun Nov 02, 2014 1:34 pm

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

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Losing connection to pi

Sun Nov 02, 2014 1:42 pm

Try modifying /etc/network/interfaces as mentioned above.
Additionally make the changes mentioned in http://www.raspberrypi.org/forums/viewt ... 65#p458761

HTH
Dirk.

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

Re: Losing connection to pi

Sun Nov 02, 2014 1:43 pm

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

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

taskman
Posts: 14
Joined: Sun Nov 02, 2014 8:00 am

Re: Losing connection to pi

Sun Nov 16, 2014 6:19 am

Thank you, only did that now, couldn't get back to the Pi until today. Will see how this goes

taskman
Posts: 14
Joined: Sun Nov 02, 2014 8:00 am

Re: Losing connection to pi

Mon Nov 17, 2014 5:37 am

This works for the wifi, it doesn't shut down now anymore. Thank you

Return to “Beginners”