Jump to content
  • 0

lwIP issue on Eclypse Z7


davwamai

Question

Hello,

I am currently trying to develop a system that reads an analog signal from the ZMOD ADC and continuously sends the data over ethernet to a host machine. I figured I'd start with getting the lwIP echo server demo up and running to begin with, but I quickly ran into some problems I cannot figure out. 

Plainly (and because I have very limited networking knowledge to provide a more in-depth explanation), the program is stuck attempting to establish a connection to the board, printing "Trying 192.168.1.10..." then going dormant. 

I found what I thought could be a solution to the issue here, but unfortunately the problem persists. There is very limited information regarding the configuration of the platform BSP or the actual hardware design one should implement in Vivado to obtain a usable bitstream for this particular demo, so I went off the assumption that all that was required hardware-wise was the ZYNQ-PS after connection automation from watching a few lwIP bring-up tutorials. This is where I believe the issue is rooted. I find it hard to believe that so little is to be done to configure the GEM (or whatever is used to define the PHY functionality) sufficiently. There must be something I am missing. 

  • I'm using a platform based on a Vivado design that has other components apart from the ZYNQ PS (ADC controller, AWG controller, AXI interconnect, etc.), though none of them should interfere with the processes of the lwIP application project (I think). 
  • I've tried the low-hanging-fruit fixes, sudo telnet <ip><port>, swapping ethernet cables, connecting via ipv6, connecting via putty.
  • I've verified that the PYNQ PS configuration for Ethernet is correct, and tried EMIO rather than MIO 52 .. 53. 

I'm sure that the amount of information I've provided on the issue is not enough to give anyone an idea of what the true problem is. I'm really just looking for a good place to start investigating rather than a definitive fix. 

I am not sure of what kind of further information I should provide, mostly because I am not sure what kind of information is useful for a circumstance like this. Please let me know if anyone has any clarifying questions and I will do my best to provide an answer to them. 

Screenshot 2023-06-14 133352.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

What status messages do you get from the echo server over the USBUART serial port? DHCP timeout?

It's important whether you're going over a network or doing direct connection to a PC. If direct connection from the Eclypse to a PC is an option, you ought to just need to manually set an IP address for the PC's ethernet adapter before attempting to connect. This works pretty straightforwardly with default LWIP BSP settings for me.

Thanks,

Arthur

Link to comment
Share on other sites

  • 0

I frequently connect hardware under development to my working PCs using a free Ethernet port.

As Art mentioned, this is better done with a spare Ethernet port using a static IP address instead of DHCP. A router will provide an IP address to devices connected to it but this can change depending on what's connected, and in what order. It's just easier to work with fixed IP addresses. Not all of my work PC have 2 Ethernet ports. I have a number of USB 3 1 GbE and 2.5G Ethernet adapters for this. They are cheap. If you have a spare USB 3 port on you PC just assign it a static address. I want to say that this is easier in Linux than Windows, but there are so many Linux distributions, and changes from version to version, and ways to control Ethernet ports.. it can drive me a bit crazy(er) at times. You'll need to set up your FPGA board with a fixed IP address as well.

In order to talk together on an Ethernet cable, the devices on both ends have to have IP addresses and masks that are reachable ( compatible ). This is why I like using a second Ethernet port; the PC doesn't try and connect to the network on the development Ethernet interface, and I can do whatever development activities that I want on the static IP assigned Ethernet interface. I 'd advise making your static IP addresses unreachable from your internet or LAN connection IP addresses. 192.xxx.xxx and 10.xxx.xxx are not reserved and are frequently used for local connections.

The first thing that I do before trying to do anything useful is to ping the connection both ways to affirm that they are able to communicate. Of course, both devices need to support basic functionality like ping.

It shouldn't be too hard to find information for how to set up Ethernet interfaces with some internet searching. For Linux, the Desktop you choose can complicate things. I was astonished to discover that Ubuntu 22 doesn't even install net-tools by default; had to find out the hard way... but that's what Linux is all about, I suppose.

Telnet is the same thing. Make sure that both devices support it and are compatible. If you are going to use an Ethernet interface you will need some basic understanding of how it works. I hope that this post has some useful tips.

I never do development work on a PC that is capable of being connected to the internet; I just pull that cable out of the RJ-45 jack.

Edited by zygot
Link to comment
Share on other sites

  • 0
22 hours ago, artvvb said:

What status messages do you get from the echo server over the USBUART serial port? DHCP timeout?

It's important whether you're going over a network or doing direct connection to a PC. If direct connection from the Eclypse to a PC is an option, you ought to just need to manually set an IP address for the PC's ethernet adapter before attempting to connect. This works pretty straightforwardly with default LWIP BSP settings for me.

Thanks,

Arthur

Just for information's sake, I was able to get the demo working pretty much right after posting. Silly connection oversight caused a DHCP timeout, can't remember exactly what since it was a few days ago. Thanks for the reply, though. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...