Skip to content

Internet on the PYNQ board

By default the PYNQ board cannot access the internet. However, it can be useful to have internet on the PYNQ, for example to install new software or to use external git repositories.

You check if the board has internet access by executing ping google.com in a terminal on the PYNQ. You have no internet access if it shows that it cannot find google:

Ping loss

Since it is simpler it is recommended to leave internet access off. Switch it on only if your course requires it or you need it for a particular reason.

⚠️ Warning

Never connect the PYNQ board to a TU/e network socket. This will result in the socket being disabled.

Network configuration on the PYNQ board

The network can be configured on the PYNQ in two ways:

1. The PYNQ board is a DHCP server (default)

By default the board acts as a DHCP server, which is the easiest way to use the PYNQ board. When you connect your laptop to the PYNQ board, the PYNQ board supplies the laptop with an IP address (i.e. a network address). This is the default, and there is no need to configure anything. The PYNQ board does not have access to the internet in this mode.

2. The PYNQ board is a DHCP client

Alternatively, the PYNQ board can also act as a DHCP client. When you connect your laptop to the PYNQ board, the laptop supplies the laptop with an IP address (i.e. a network address). In this mode the PYNQ board has access to the internet.

Enabling internet on the PYNQ board

Enabling internet access on the PYNQ board is different on Windows, macOS, and Linux.

Share internet on Microsoft Windows

Take the following steps (only once) to enable internet on the PYNQ board:

  1. Connect the PYNQ board to the Windows machine. Do not switch on the PYNQ.

  2. On you Windows machine, go to the following menu: Control Panel > Network and Sharing Centre > Change adapter settings. Take note of your Wi-Fi Adapter, as well as the Ethernet Adapter your PYNQ board is connected to. In this case, this is the Ethernet 2 Adapter (ASIX AX88772A).

Network Adapters

  1. Double click on the Wi-Fi Adapter, and select Properties. Then open the Sharing tab. Here, the checkbox Allow other network users to connect through this competers Internet connection should be checked. Select the Ethernet Adapter your PYNQ board is connected to in the Home networking connection drop-down menu.

Sharing Menu

  1. Close the Wi-Fi Adapter menu's, and open the Ethernet Adapter your PYNQ board is connected to. In this case the Ethernet 2 (ASIX AX88772A). In this menu, double click on Internet Protocol Version 4 (TCP/IPv4). Here, te IP address and Subnet mask should have been filled in automatically. Take note of the IP address, which in this case is 192.168.137.1.

Ethernet Ip

  1. Now you can switch on the PYNQ board and wait until the green DONE LED has lit up. Your PYNQ board will now be connected to your Windows machine via a new IP address, instead of the default 10.43.0.1 IP address. The new IP address will be in the range of 192.168.137.2-192.168.137.254.

  2. In order to find the exact IP address of your PYNQ board, you can use the following Windows Batch script, which can be run by saving this code block as find-ip.bat file. Note that your the variables BASE_IP should reflect the first 3 octets of your IP address found in step 4.

    @echo off
    setlocal enabledelayedexpansion
    
    REM Define the base IP address (e.g., 192.168.1)
    set BASE_IP=192.168.137
    
    REM Set a ping timeout of [ms] before continuing
    set TIMEOUT=100
    
    REM Define the start and end range of the IP addresses
    set /A START_RANGE=1
    set /A END_RANGE=254
    
    REM Loop through the range of IP addresses
    for /L %%I in (%START_RANGE%,1,%END_RANGE%) do (
        REM Construct the full IP address
        set IP=%BASE_IP%.%%I
    
        echo Pinging !IP!...
    
        REM Ping the IP address with a timeout of 100ms (1 second)
        ping -n 1 -w !TIMEOUT! !IP! >nul
    
        REM Check if the ping was successful
        if !errorlevel!==0 (
            echo Host found at !IP!
        )
    )
    
    endlocal
    

  3. Run the batch file to start pinging the range of IP addresses. When your PYNQ board has been found, it will show the message Host found at <IP>. Please note that the host found at 192.168.137.1 will be your Windows machine, not your PYNQ board. An example can be seen here:

Find IP

  1. Once the IP address of your PYNQ board has been found, you can change your SSH configuration with the updated IP address. In this case the new IP address will be 192.168.137.29:

SSH Config

  1. You can now connect to your PYNQ board as usual via Visual Studio Code or MobaXterm. To verify your PYNQ board has internet access, execute the ping google.com command. This should show you are receiving bytes, as shown here:

Ping Google.

⚠️ Warning

One important thing to note is that the IP address of the PYNQ board is not static in this configuration. When connected to a different (Wi-Fi) network, or after a reboot from your Windows machine or PYNQ, the IP address to which your PYNQ board is connected might change. If this happens, just re-run the Windows Batch script to find the IP address of your PYNQ board again and update you SSH configuration, as shown in steps 7-9.

If running the Batch script does not work, disable the network sharing and unplug your network adapter. Then re-enable network sharing again as described in this manual.

Share internet on macOS

Apple's security policy prevents sharing the internet on the authenticated TU/e wireless networks (e.g. WPA2 and guest). (And you shouldn't connect it to the TU/e wired network since that will disable the network socket.) You will get the following error message:

Cannot share

Internet sharing of non-authenticated networks at home or elsewhere, even when using the TU/e VPN, should work. Take the following steps (only once) to enable internet on the PYNQ board.

  1. Connect the PYNQ board to the Mac. Do not switch on the PYNQ.
  2. On your Mac open the System Settings application and select Internet Sharing (it's easiest to search for "sharing"). (On your computer "Remote Login" is probably disabled. This doesn't matter.) Internet Sharing You have to enter an administrator account and password on your computer. Internet Sharing
  3. Click on the "(i)" next to "Internet Sharing", and select "WIFI" and the Ethernet adapter (here it is the Digitus "AX88x72A"). If you are on the TU/e VPN then you should select that. Click "Done".
    Internet Sharing Internet Sharing
  4. Click on the switch of "Internet Sharing" to start sharing and confirm:
    Internet Sharing
  5. Switch on the PYNQ board and wait until the green DONE LED has lit up.
  6. You can now log in to the PYNQ board. You can verify that it has an internet connection with the ping google.com command that should show no packet losses. (Use control + c to stop the program.)
    Ping loss

    Until you switch off internet sharing, your PYNQ board will now use your laptop's connection to the internet every time you use it.

    ⚠️ Warning

    You can only switch on or off the internet sharing when the PYNQ board is off. If you change internet sharing when your board is on you will lose your connection to the PYNQ. Similarly, switching the internet sharing on and off multiple times will probably stop it from working altogether. To fix, switch off the PYNQ board and reboot your laptop.

    ⚠️ Warning

    If you enable internet sharing at home you must disable it before you can use the PYNQ board at the university. Otherwise you will get the following error.

    Cannot share

Share internet on Linux

The exact setup might differ per used distribution but for most network-manager based systems it should be similar to the following.

  1. Connect the PYNQ board to your laptop. Switch it on and wait until it has booted (the green DONE LED is on). TODO: needed?
  2. On your laptop, go to the network properties.
  3. Click 'Add network' and select 'Ethernet':
    Connection type

  4. Give the connection a name, and on the IPv4 settings page select "shared to other computers":
    Shared to other computers

  5. If you select this "profile" to be active on the network device connected to the PYNQ board, it should get an IP address when the PYNQ boots and the PYNQ board will have internet access.