USB Wifi Example

In this notebook, a wifi dongle has been 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. This demo was first done using an iPhone hotspot wireless connection.


1. Create usb wifi instance

In [5]:
# Make sure the base overlay is loaded
from pynq import Overlay
from pynq.drivers import Usb_Wifi

port = Usb_Wifi()


In [ ]:
port.connect('ssid', 'pwd')

3. Test connection

In [7]:
! ping

PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=59 time=28.8 ms
64 bytes from icmp_seq=2 ttl=59 time=28.9 ms

--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 28.880/28.926/28.973/0.176 ms

4. Reset connection

In [8]:

In [ ]: