Getting up and running with Raspberry PI ( Wifi )

by / Saturday, 07 November 2015 / Published in Linux, RaspberryPI, Raspbian, Technical
raspberryPi

Download the Raspbian from the following link:

https://www.raspberrypi.org/downloads/raspbian/

Follow the following link to get the image burned onto an SD Card:

https://www.raspberrypi.org/documentation/installation/installing-images/README.md

To get the wireless up and running, you need to purchase a USB-Wifi.

I used the following:

 http://www.amazon.com/Wifi-Antenna-Raspberry-Pi-Instructions/dp/B00H95C0A2/

Note: No monitor or Keyboard are required to get the Raspberry Pi up and running.

You can easily SSH to Raspberry Pi by connecting it over the ethernet. It will be assigned an IP provided by the DHCP of the Router. You can figure out the IP from the Router’s Connected Devices page. Use that IP to login into the Raspberry PI.

Maheshs-MacBook-Pro:~ maheshkumar$ ssh pi@10.0.0.245
The authenticity of host '10.0.0.245 (10.0.0.245)' can't be established.
ECDSA key fingerprint is SHA256:CkiTxPLDbpJBTYTNT2XXMia/iTTCOsvUn9UuJm69+xU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.245' (ECDSA) to the list of known hosts.
pi@10.0.0.245's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Nov  7 00:28:02 2015
pi@raspberrypi ~ $

Once logged in

pi@raspberrypi ~ $ ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:71:97:53
          inet addr:10.0.0.245  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: 2601:281:8102:c964::7c95/128 Scope:Global
          inet6 addr: 2601:281:8102:c964:af92:e449:e27f:e87c/64 Scope:Global
          inet6 addr: fe80::ba27:ebff:fe71:9753/64 Scope:Link
          inet6 addr: 2601:281:8102:c964:ba27:ebff:fe71:9753/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2530 errors:0 dropped:1 overruns:0 frame:0
          TX packets:739 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:270894 (264.5 KiB)  TX bytes:76513 (74.7 KiB)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1104 (1.0 KiB)  TX bytes:1104 (1.0 KiB)
pi@raspberrypi ~ $

After inserting the Wireless module:

pi@raspberrypi ~ $ ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:71:97:53
          inet addr:10.0.0.245  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: 2601:281:8102:c964::7c95/128 Scope:Global
          inet6 addr: 2601:281:8102:c964:af92:e449:e27f:e87c/64 Scope:Global
          inet6 addr: fe80::ba27:ebff:fe71:9753/64 Scope:Link
          inet6 addr: 2601:281:8102:c964:ba27:ebff:fe71:9753/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1138 errors:0 dropped:2 overruns:0 frame:0
          TX packets:723 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:103200 (100.7 KiB)  TX bytes:112278 (109.6 KiB)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1192 (1.1 KiB)  TX bytes:1192 (1.1 KiB)
wlan0     Link encap:Ethernet  HWaddr 00:e1:b0:54:12:73
          inet addr:10.0.0.253  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: 2601:281:8102:c964::a9de/128 Scope:Global
          inet6 addr: fe80::2e1:b0ff:fe54:1273/64 Scope:Link
          inet6 addr: 2601:281:8102:c964:a499:4886:26b8:7e47/64 Scope:Global
          inet6 addr: 2601:281:8102:c964:2e1:b0ff:fe54:1273/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:236 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:34092 (33.2 KiB)  TX bytes:28560 (27.8 KiB)
pi@raspberrypi ~ $ 

To assign a static IP to the Wireless Module:

root@raspberrypi:/home/pi# cat /etc/network/interfaces
# Please note that this file is written to be used with dhcpcd.
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'.
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 10.0.0.13
netmask 255.255.255.0
gateway 10.0.0.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
root@raspberrypi:/home/pi# 

To connect to the wireless module automatically:

pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="Winternet_is_Coming"
        psk="*Password*"
}
pi@raspberrypi ~ $

To test connectivity and connect to the network provided.

sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

Leave a Reply

TOP