1)Edit network card and add ip / broadcast / gateway address
pi@raspberrypi ~ $ cat /etc/network/interfaces
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 192.168.1.33
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
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
pi@raspberrypi ~ $
2) Add wifi router name & password
pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="hubname"
psk="password"
key_mgmt=WPA-PSK
}
pi@raspberrypi ~ $
3)View your ip
pi@raspberrypi ~ $ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr
inet addr:192.168.1.33 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:915 errors:0 dropped:148 overruns:0 frame:0
TX packets:329 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:202526 (197.7 KiB) TX bytes:49840 (48.6 KiB)
pi@raspberrypi ~ $