Created
September 6, 2015 05:00
-
-
Save vik-y/2c532ca0c0a5dcea124f to your computer and use it in GitHub Desktop.
Raspberry pi wifi connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For the wifi to work properly on raspberry pi you have to do the following. | |
Insert the memory card into some laptop or mobile. | |
Edit and put the respective files provided in this gist | |
1. /etc/network/interfaces | |
2. /etc/rc.local | |
3. /etc/wpa_supplicant/wpa_supplicant.conf | |
After doing all this put the memory card back into the raspberry pi and you are done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# /etc/network/interfaces | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# /etc/rc.local | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. | |
# | |
# By default this script does nothing. | |
# Remember - detect.py and cron.py should be present in the same folder | |
# path to the script provided should be complete | |
# eg. python /home/vikas/detect.py & | |
# python /home/vikas/cron.py & | |
python location-of-detect.py & | |
python location-of-cron.py & | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# /etc/wpa_supplicant/wpa_supplicant.conf | |
network={ | |
ssid="Wifi-Name" | |
scan_ssid=1 | |
key_mgmt=WPA-PSK | |
psk="Wifi-Password" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment