usb_wifi


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.

References
http://www.canakit.com/raspberry-pi-wifi.html

1. Create usb wifi instance


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

port = Usb_Wifi()


wlxc83a35de7cc7

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

3. Test connection


In [7]:
! ping www.xilinx.com


PING e191.g.akamaiedge.net (2.20.232.36) 56(84) bytes of data.
64 bytes from 2.20.232.36: icmp_seq=1 ttl=59 time=28.8 ms
64 bytes from 2.20.232.36: icmp_seq=2 ttl=59 time=28.9 ms
^C

--- e191.g.akamaiedge.net 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]:
port.reset()

In [ ]: