In this notebook, we show how to connect to a WiFi network.
For boards equipped with a USB interface, a WiFi dongle can be plugged into the board. Specifically a RALink WiFi dongle commonly used with Raspberry Pi kits is connected into the board. Using Linux calls and Python functions, we will determine the unique name of the dongle and then create a network entry for a known ssid/password pair.
For boards equipped with onboard WiFi module, we can follow the same process as well.
References: http://www.canakit.com/raspberry-pi-wifi.html
Make sure:
In [1]:
from pynq.lib import Wifi
port = Wifi()
In [2]:
ssid = input("Type in the SSID:")
pwd = input("Type in the password:")
port.connect(ssid, pwd)
In [3]:
! ping -I wlan0 www.yahoo.com -c 10
In [4]:
port.reset()