Unable to connect to ethernet and unable to install pynq

Hi,

  • I am using Z-turn V2 board and windows 10. I can connect my FPGA board using the serial port but not using ethernet. I check both by ‘ifconfig -a’ and ‘ip a’ that my board does not even have an IP address. I am furnishing the results below of what I get–>*

a) Using ip a

1: lo: mtu 65536 qdisc noop
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: can0: mtu 16 qdisc noop qlen 10
link/[280]
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 00:0a:35:00:01:22 brd ff:ff:ff:ff:ff:ff

b) Using ifconfig -a

can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:60

eth0 Link encap:Ethernet HWaddr 00:0A:35:00:01:22
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:54 Base address:0xb000

lo Link encap:Local Loopback
LOOPBACK MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I am pretty much lost on how to proceed. Can you please help me in simple steps both by connecting the FPGA board to LAN and directly to the host computer ? I suppose I must first fix the IP of the FPGA board and restart. Is there a step by step procedure for this to happen as I am new to the Z-turn board ?

Also, I can not install Pynq (if it is needed) using pip in command prompt. I am using python 3.8.0 and I noticed the following error–>

(myenv) C:\Users\First\AppData\Local\Programs\Python\Python38\my_proj>pip install --upgrade --upgrade-strategy only-if-needed pynq
Collecting pynq
Using cached pynq-3.0.1.tar.gz (63.0 MB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “C:\Users\First\AppData\Local\Temp\pip-install-uvf4gvx4\pynq_827392ffeef14b8ab70178f2a2ab02cc\setup.py”, line 35, in
CPU_ARCH = os.uname()[-1]
AttributeError: module ‘os’ has no attribute ‘uname’
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: There was an error checking the latest version of pip.

Dear @premcharanraj,

Welcome to the PYNQ community.

If you want to run pynq in this board, you will need to build an SD card targeting the board.

https://pynq.readthedocs.io/en/latest/pynq_sd_card.html

Mario

Hi,
Thanks.
Is there a procedure for the same using Windows 10 ?

Alternatively, is it possible to connect via ethernet without pynq in windows 10 ?

No, PetaLinux that is one of the tools needed only runs in Linux.

There are documentation describing how to setup a virtual machine.

Hi,
Okay.

In this official document ( MYE-SAM9G15/9G25 (myirtech.com)) until page number 8, I can see and read that building the SD card was done using Win32DiskImager in Windows OS. Am I right ? Please correct me if am wrong. If we see page number 8 the directories appear to be windows but Linux is used to connect to the board via ethernet later.

My query is simply the following-

  1. I have all my tools (Vivado, etc.) in Windows OS. Can’t I write the image file in the SD card using windows, as described in the above referred pdf file ? I am fine with handling unix/linux commands in the terminal of Windows OS.

  2. Can’t I connect the board via ethernet in Windows OS? I am already connected in Windows OS using serial port and can access the files using unix command.

P.S. - Sorry that am more inclined to Windows OS and it will really helpful if I get connected to the z-turn board V2 using ethernet in Windows OS. Is this possible ?

Thanks in advance

  1. You can flash the SD card image to an SD card on Windows with Win32DiskImager or Balena Etcher.

  2. You can connect to the JupyterLab session using any web browser running in any operating system. But, this machine needs to be in the same network as the board.

You can check the connection steps for the PYNQ-Z2, they are very similar to what you need to do with this board.

Mario

Ok.

I have booted using the petalinux that came with the Z-turn board. As you can see in the attached figure (1st figure), the eth0 is not yet set or the IP does not appear. From this, can you please tell me how to proceed in order to connect the ethernet in windows 10 OS (computer’s OS)? I am new to petalinux and connecting the board in Windows 10 OS (computer’s OS). So, it will be helpful if you can tell me in steps to configure ethernet.

The below figure is the IP settings of ethernet2 by which the z-turn board is connected to the computer on Windows OS. Are the settings right in it ?

Thanks

I am not familiar with that board neither with their PetaLinux image. However, you can search on the web how to setup a static IP address in a Linux operating system.

For instance, (I am not 100% sure that the link below applies to your issue)

https://www.computernetworkingnotes.com/linux-tutorials/how-to-configure-ip-address-in-linux.html

Thanks for your reply.

Your reference was partially useful.

Nevertheless, I’ve figured it out. No need to install Pynq!

I am writing the steps below so that it can be helpful for those who try to connect Z-turn board with ethernet on Windows OS computer, provided the Z-turn is mounted with SD-card that has the default boot image of petalinux.

The steps are the following:

  1. Keep the jumpers in position JP1 = 1 and JP2 = 1. Check the serial port connection by plugging both the JTAG and POWER USBs.
    Configure the following in the Putty.

    Enable ‘Serial’
    Serial line- COM4 & Speed- 115200
    Type ‘Ctrl+c’.

Z-turn# (appears in red)

P.S.- Z-turn board is connected in COM4 port in my computer. Check your’s.

  1. Plug out the power USB. Insert to mount the SD card (that comes by default with every Z-turn
    board) for booting.
    Keep the jumpers in position JP1 = 0 and JP2 = 1 for booting.
    Plug in the power USB.
    Booting procedures will start on the serial port communication window in Putty.
    It will ask for username (root) and password (root). Enter them.

    Plug the ethernet cable. See the change in ‘Network and Sharing Center’ and try to find which ethernet. In my computer it was ‘ethernet2’.

    Type ‘ifconfig -a’ to check the details of all IP addresses and the connections.
    You will see that the ‘inet addr’ is not present or configured. So, configure it.

    Type ‘ifconfig eth0 192.168.2.99
    It will show the following results:

    IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    Z-turn# macb e000b000.ethernet eth0: link up (1000/Full)
    IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

    which means the FPGA’s IP is assigned. Now fill the details of the ethernet connection (here it was ethernet2. Check your’s when you connect the board).
    Goto Ethernet2–>Properties–>click ‘Protocol internet version 4 (TCP/IPv4)’–>Properties and enable
    ‘Use the following IP address:’
    Fill there, IP address: 192.168.2.1 and Subnet mask: 255.255.255.0. Also enable 'Use the following
    DNS server addresses’and leave the 2 entries unfilled. Click ‘Ok’.

    Now check the communication by typing 'ping 192.168.2.1’in the serial communication screen of
    Putty and watch the ethernet2 data transfer and you will see the dynamic data transfer happening.
    This means the ethernet is configured and connection is established.
    Type ‘Ctrl+c’ to terminate the data trasnfer.

    Now open another new Putty and
    Enable ‘SSH’
    Type Host Name (or IP address): 192.168.2.99 and Port: 22
    Click ‘Ok’ and you will see the SSH connection configured through ethernet.
    Enter username (root) and password (root).

Now you are connected to your Z-turn board using both your serial port and ethernet. Hurray! :smiley:

P.S.-
a) Every time you start your computer after shut down, you have to assign IP for the Z-turn board or have to type the command (in bold written above) in the serial port communication window.
b) If something does not work or nothing works as instructed above, just turn OFF your computer’s firewall and try.

Good luck ! :slightly_smiling_face:
Please mark this as resolved !!!

1 Like