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:
- Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original
- Then do: cp /etc/wpa_supplicant/ifupdown.sh ./ifupdown
- 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.
ip addr show wlan0
output? – goldilocks Mar 16 '15 at 14:01wpa_supplicant
I guess. You can check if that's running (it should be, although things might continue to work without it, I'm not sure) withps -C wpa_supplicant
. Another issue I've seen here with that is multiple instances of it, which might create confusion. – goldilocks Mar 16 '15 at 16:29wpa_supplicant
running and wlan0 off line. – goldilocks Mar 16 '15 at 17:40ps -C wpa_suplicant
command and got and extra line which said 2886 ? 00:00:00 wpa_supplicant – Dino Mar 16 '15 at 17:51ip addr show wlan0
you should get that IP address in there. – goldilocks Mar 16 '15 at 17:57