PYNQ-Z1 WiFi Dongle Support

WiFi dongle: TL-WN823N
Board: PYNQ-Z1
Image: 3.0.1

The board does not automatically connect to the network and/or display an access IPv4 address to use for Jupyter. I modified the file after the startup procedure to enable the WiFi port but I do not think it is connecting to the network.
I have tried multiple approaches and re-imaging the SD card, but nothing has worked.

1 Like

I am wondering if you are having trouble getting into the Jupyter notebook space in the first place because if that is the case this page should help you get access → Setup page

If you have access to the Jupyter notebook space I want to point out that there is a notebook in PYNQ to help with using a WiFi Dongle Wifi.ipynb. It is located within the common folder within the Jupyter notebook space.

If neither of these are relevant to your issue, I would love to hear more about why you want the board to connect to the internet automatically? and hopefully we can find a good solution!
Best wishes


Thank you very much for the reply.
Yes, I have finished the full setup with the board. I have tried the following:

  1. Ethernet (board) to PC (ethernet) - I set the static IP and mask of the port to connect to the PYNQ. This part works fine for an ethernet cable solution.
  2. I have connected a RALINK WiFi dongle to the board and attempted the WiFi.ipynb notebook and a python script version of the book (just the commands and libraries). I do not see the dongle connected to the WiFi (the routing table shows no link).

I would like to connect the board to the WiFi so I can set my board in a different room of my house and work on the same internet to access Jupyter and my files.



Hi again,
Thank you for your response, I understand now what you are trying to do.
I want to point out there is a way you could solve you issue is to connect your board directly to your router via an ethernet cable and following the steps outlined in the Connect to a Network Router section of the setup page you could access your files on any room of your house that gets Wi-Fi from that router.

That said I would love to help you figure out how to do this directly using a usb dongle. I have an idea about where to start.

In order to see the dongle, you will have to manually mount the USB dongle. This can be done using the terminal on the jupyter notebook space and following this tutorial → Mounting a usb. Your board will have to connects via ethernet cable for this. You do not need to access any files within the dongle so you can ignore parts of the tutorial that deal with that.

Then try running the Wifi.ipynb notebook again and see does this work for you! if it does work, we can then look at how to put this into a script that runs automatically at boot time.

Let me know how it goes!

Best Wishes,
Conor Powderly

P.S. If this doesn’t work, it would be a great help is you could share screenshots of the following

  1. Any error messages from the notebook.
  2. Enter dmesg into the terminal of the specifically we are looking for a value titled wlan0 to be assigned to the usb interface where the dongle is connected.
  3. Any other issues you encounter
1 Like

I have learned a bit more about this topic since the last reply so now I think what might be happening is that there is not a driver for the WiFi dongle you are using! Try running ipconfig -a when the usb is plugged in, if wlan0 does not show up this miss the driver for this device is not installed!

Try to install the driver, I found this tutorial here but I have not tested it as I do not have access to the same dongle → Driver download tutorial

Sorry about the confusion!, I hope this helps!
Best Wishes,
Conor Powderly

1 Like

Thank you very much for the information.
Here is my step-by-step approach I am currently using for the WiFi dongle.
Micro-USB to USB-A (for power supply)
USB HOST port on Pynq-z1 left empty
Linux access via PuTTY terminal.
Screenshot and explanation
Default expected behavior.

New configuration
USB HOST port on Pynq-z1 connected with RALINK RT5370 WiFi dongle.
Screenshot and explanation
No change in the interfaces as expected. The USB device is detected on the USB HOST port as required. I used the example script in the source code of the Pynq to attempt a connection (this can be put inside the file to run at boot). Running this script using root privileges compiles the script.
WLAN0 interface is active (USB LED shows activity as well).
No response on ping nor any update to the routing table nor any IPv4 assigned from the access point.

Other parts of your response
I tried to connect the board via ethernet DIRECTLY to my access point and I had no issues in accessing the files via Jupyter. This is okay where I can connect the board directly to an AP but I would like to simplify this setup by removing the physical link to the AP.

Please let me know your thoughts!

Okay so we know it’s not a problem with the driver because it detected in the screenshot there!

I’m now curious what changes you have made to the file? Those changes should be very similar to the code seen in in the wifi.ipyb notebook we discussed above. Would you mind sharing a link to the example script you reference above and/or sharing the you have edited?

By connecting whatever device you want to the same access point produced by the dongle it should give you access to the board files and Jupiter space without the need for a wired connection. (I will say that you won’t be able to access to internet from that device (i.e your computer) while you are connected to the PYNQ board).

Best Wishes,

Thanks for the reply.
I have not modified the yet. This is to ensure I can have some control over the process before I can set this automatically in the boot sequence.

you should try modifying the file to make the Wi-Fi connect, try importing the file into the boot file → file, creating a wifi object and using the connect method to make your connection.

Please share screenshots or a gitrepo so I can see what is going on!

Best Wishes,
Conor Powderly

It would also help if you could run the Wifi notebook on the board and share the output via screenshots!

Thanks for the reply.

This is the result of the shell command through the Wifi.ipynb file. Attempting an ifconfig command shows no IP set from the DHCP (I cannot upload more screenshots yet).

Have you gotten any confirmation if the network password and ID has been accepted in part two of the notebook?
If so, you can try running ipconfig -a again before running part three of the notebook and changing out wlan0 to any other port that shows up here to see if that works.
Another option is just to try a different wifi dongle to see if the problem is with the dongle itself.
Send screenshots of the notebook output if you can!
Best Wishes,

Thanks for the reply.
How do you know whether the ssid and password have been accepted? The cell reports nothing and according to the library, there is no return for the function of the port.connect().

Can you run the following in a notebook cell, copy the output, and post it back here?

!ip a

You can also run this command in a terminal without the !

ip a


Thanks for the reply.

WLAN0 interface shows a DORMANT state.

Same command inside the terminal.

Same issue here…

I can ping from my host pc to (usb0), rather than 192.168.1.X (wlan0).

Please, any further suggestions?

Thank you for sharing this!
In my previous configurations, I have setup
PC (ethernet port) → PYNQ-Z1 (ethernet port) and forced my PC’s ethernet port to the PYNQ’s IP address so I can access the kernel through Jupyter. The ping to the ethernet port’s IP works as expected. I have had no luck with the WiFi dongle to date.
I think there needs to be a route forced to the access point so that I can connect to the PYNQ’s kernel wirelessly.