WiFi USB
In this section, we connect an external WiFi receiver to enable a wireless connection.
For this step we need internet connection. Make sure that the raspberry is connected with an ethernet cable.
Check with ifconfig
available connectons
$ ifconfig -a
...
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b0:a7:b9:ce:d3:58 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
We observe that there is no IP associated to wlan0
interface. Let' change that. Run the following command and copy it to the clipboard.
$ wpa_passphrase [SSID] [SSID_PASSWORD]
where SSID
and SSID_PASSWORD
are the network name and password, respectively. Then open the file wpa_supplicant.conf
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
and paste the content at the end. Also, add four additonal fields. At the end you should have somethng like below:
network={
ssid=[SSID]
psk=[SSID_PASSWORD_PSK]
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
}
Finally, reboot the raspberry and it should connect to the network by default.
$ sudo reboot
Additionally
You can set a static IP this wirelessconnectin, just as you dit with the wire d connection in section Set static IP.
Last updated
Was this helpful?