1

I have currently set-up the following for wifi connection

My wpa_supplicant.conf file just had these two lines:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

And my config.txt file I did this:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
   wpa-scan-ssid 1
   wpa-ap-scan 1
   wpa-key-mgmt WPA-PSK
   wpa-proto RSN WPA
   wpa-pairwise CCMP TKIP
   wpa-group CCMP TKIP
   wpa-ssid "My Secret SSID"
   wpa-psk "My SSID PSK"

iface default inet dhcp

The problem lies in the fact that the WiFi seems to disconnect after about an hour. I am using the raspery pi as a kiosk to connect to a website to display information.

Can I use the following below for this hidden network, link here?

Well, there is a very simple solution:

  1. Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original
  2. Then do: cp /etc/wpa_supplicant/ifupdown.sh ./ifupdown
  3. Finally: sudo reboot

That's all. Test this by turning off/on your AP; you should see that your Raspberry Pi properly reconnects.

EDIT:

Can the above work fine with my custom config.txt file as when the raspery pi boots it gets an IP address from the router but I can not the wla0 in the Network GUI settings screen.

  • 1
    You are saying you do get an IP address for wlan0 just you cannot see it in the GUI tool? What does ip addr show wlan0 output? – goldilocks Mar 16 '15 at 14:01
  • Yes correct and when it boots it shows 192.168.5.28 on the splash screen which it got from DHCP, I think. But in the GUI it is not there (the wlan0), But I don't mind it not being there. It seems to remain connected for most of the day and then occasionally connection drops forcing me to switch off then on again and then it connects when it boots and stays connect for some time. – Dino Mar 16 '15 at 14:39
  • At the moment I can not access the pi as I need to wait till the office closes and there is no one in the reception area of my work. It seems have stayed connected for a few hours now. Apologies about the delay, I'm typing this in a rush and only partly read your answer. – Dino Mar 16 '15 at 15:23
  • Keep in mind linux GUIs are heterogeneous, meaning there's a lot of different ways of doing more or less the same thing. So you should check what that "Network GUI" app is exactly -- see if there is an "About" option in the Help menu, or what the titlebar says. I've never used one so I don't know if it is something particular to LXDE (the desktop used on raspbian, presuming you are using raspbian) or something more generic. But if you can find that out you can search more broadly for information about it or ask a more specific question on Unix & Linux. – goldilocks Mar 16 '15 at 15:55
  • The "Network GUI" is actually wpa_gui which you access from the menu like this picture here wpa_gui That picture has wlan0 as the adapter but in mine it is all blank. – Dino Mar 16 '15 at 16:08
2

Add this to the bottom of your /etc/network/interfaces file, as it prevents power-save modes in the wifi dongles.

wireless-power off

  • adding wireless-power off doest work from most adapters i have tried. – human Nov 28 '16 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.