cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bobsmith999
Visitor
Visitor
6,898 Views
Registered: ‎04-11-2017

Cannot connect to lwIP echo server on Zynq

Jump to solution

Hi,

 

I am trying to run the lwIP echo server application project template from the Xilinx SDK on my PYNQ board. I have followed this tutorial for the Zybo FPGA board (which also contains the ZYNQ):

 

https://reference.digilentinc.com/learn/programmable-logic/tutorials/zybo-getting-started-with-zynq-server/start

 

This tutorial uses the GigE enthernet controller, so the only thing in my Vivado block design is the Zynq PS, with ETH0 enabled. Everything works fine until the very last step, when I come to connect to the echo server using telnet. The PYNQ is telling my via serial comms that

 

Board IP: 192.168.1.10

Netmask : 255.255.255.0

Gateway : 192.168.1.1

TCP echo server started @ port 7

 

So I followed the instructions in the above link to set up the ethernet connection on my Windows PC with the static IP address 192.168.1.11 using the given netmask. Unfortunately when I come to connect via telnet using Putty, it tells me that the host is unreachable. I have also tried using my Ubuntu PC but I get the same problem.

 

I have tried debugging the echo server in the Xilinx SDK by setting a break point in the recv_callback() function, but it never seems to reach that part of the code, indicating that no packets are ever received from my PC.

 

Does anybody have any idea what I could be doing wrong please?

 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
hbucher
Scholar
Scholar
8,228 Views
Registered: ‎03-22-2016

@bobsmith999 

Yes, I was referring to the LWIP DHCP option you showed.

You see that the chip is not any of the ones supported (Marvell or TI). 

I have a zybo board and it has a Realtek chip. Probably the same as the Pynq, do you know what chip it uses?

I think the Xilinx guys are going to support it soon. Meanwhile I submitted a small patch.

https://github.com/HFTrader/embeddedsw/commit/ce6296fb26e877a6367039d95c67d0fd00fe16c1

As per the threads, it is a problem as it will not execute any necessary initialization (MDIO clock, etc). 

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post

10 Replies
hbucher
Scholar
Scholar
6,879 Views
Registered: ‎03-22-2016

@bobsmith999 

Could you post all the serial output here?

 in the bsp under LWIP, enable DHCP

Connect the board to a router

Check if it acquires an IP address

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
bobsmith999
Visitor
Visitor
6,871 Views
Registered: ‎04-11-2017

@hbucher, thank you for your response.

 

Here is my full serial output:

 

-----lwIP TCP echo server ------

TCP packets sent to port 6001 will be echoed back

WARNING: Not a Marvell or TI Ethernet PHY. Please verify the initialization sequence
link speed for phy address 1: 100
DHCP Timeout
Configuring default IP of 192.168.1.10
Board IP: 192.168.1.10

Netmask : 255.255.255.0

Gateway : 192.168.1.1

TCP echo server started @ port 7

 

When you say enable DHCP, are you referring to lwip_dhcp under dhcp_options? If so, this was already enabled when I created the application project from the template:

 

bsp.png

 

The only setting I have tried altering is phy_link_speed, which I changed to 100Mbps.

 

I have connected my PC and the PYNQ to a router and ran the application. The PYNQ does not appear in the DHCP clients list (my PC does), so it does not seem to be acquiring an IP address. This seems to be confirmed by the DHCP timeout in the serial output.

 

Regarding the warning "Not a Marvell or TI Ethernet PHY. Please verify the initialization sequence", a thread on the Digilent forum indicated that this was not a problem. However this thread indicates that it may be. The reply suggests changing auto negotiation to fixed speed in the bsp, but I can't seem to find an option to do this?

 

I have just tried turning on some of the debug options in the bsp and I am getting repeated warnings

 

tcp_slowtmr: no active pcbs

 

Many thanks for your help.

 

P.S. I do not seem to be the only one experiencing this:

 

https://forums.xilinx.com/t5/Embedded-Processor-System-Design/Zybo-lwip-server-echo-example-connection-fails-SDK-20017-2/td-p/800830

0 Kudos
hbucher
Scholar
Scholar
8,229 Views
Registered: ‎03-22-2016

@bobsmith999 

Yes, I was referring to the LWIP DHCP option you showed.

You see that the chip is not any of the ones supported (Marvell or TI). 

I have a zybo board and it has a Realtek chip. Probably the same as the Pynq, do you know what chip it uses?

I think the Xilinx guys are going to support it soon. Meanwhile I submitted a small patch.

https://github.com/HFTrader/embeddedsw/commit/ce6296fb26e877a6367039d95c67d0fd00fe16c1

As per the threads, it is a problem as it will not execute any necessary initialization (MDIO clock, etc). 

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post

bobsmith999
Visitor
Visitor
6,832 Views
Registered: ‎04-11-2017

@hbucher

 

Ah I did not know that there was a problem with the Realtek chips. You are correct - the PYNQ uses the Realtek RTL8211E-VL PHY the same as the Zybo. It is interesting that Digilent have the tutorial for the Zybo which makes no mention of this issue. Do you know if the Realtek chips were previously supported?

 

I had a look at the two files you patched and copied these into my own lwip directory. It appears that in xemacpsif.c you do not need any change in the get_IEEE_phy_speed() function, and it won't compile with the change you made since phy_reg is not defined in there. Once I removed this, I ran the application and I am now able to connect:

 

term.png

 

Thanks once again for your help - I really appreciate it.

hbucher
Scholar
Scholar
6,820 Views
Registered: ‎03-22-2016

@bobsmith999  I don't believe the Realtek chips were ever supported. 

I had the Zybo for over an year - I love it because I can test and prototype small projects very fast with it. For some reason synthesis and place/route take 1/10th of the time that it takes to process a project of the same size for the ZCU102. 

But then I hit this snag with the ethernet. It never really worked, even following the tutorial - which is a monster cover up, mind you. They keep selling the zybo with ethernet with Realtek chips, probably because of price, but it is really not supported in any sense either by them or by Xilinx.

I would imagine that for a development board you'd get something whose components are solid (it is) and supported (it is not) by all the tools involved. Guess again.

I was going to sell it on ebay and buy a zedboard. But then I looked at myself and asked - "am I an engineer or a soy boy?" It took me a couple of days of aimless debugging and going through the chip maker specs I found that both Realtek and Marvell follow very closely the 10/100/1G spec, which defines all the MDIO management registers. It seems that the standard is so old that everyone has already converged. Then I had the hunch and everything worked.

Glad it helped you.

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
jackielee
Visitor
Visitor
6,289 Views
Registered: ‎11-23-2017

@bobsmith999I have the same problem with you,the only difference is that i use the zedboard.But i see that you have solved it.you said that you copied the two files to your lwip directory.I cant't figure it out which directory and you removed which file.can you specifically describe the steps?

I really appreciate it.thank you very much.

0 Kudos
sgy004
Visitor
Visitor
5,026 Views
Registered: ‎09-01-2018

hi,almost same problem.run echo server on 7z100 with phy 88e1111.got those messages:

-----lwIP TCP echo server ------
TCP packets sent to port 6001 will be echoed back
Start PHY autonegotiation
Waiting for PHY to complete autonegotiation.
autonegotiation complete
link speed for phy address 7: 1000
DHCP Timeout
Configuring default IP of 192.168.1.10
Board IP: 192.168.1.10
Netmask : 255.255.255.0
Gateway : 192.168.1.1
TCP echo server started @ port 7

 

but the board do not reply arp request when ping 192.168.1.10, when arp request the rx_led flash.

my ip addr is 192.168.1.11,seems everything is ok.

SO,does anybody have any idea what I could be doing wrong please?

 

Thanks!

 

0 Kudos
sameertest
Observer
Observer
3,165 Views
Registered: ‎02-08-2018

Hello, I am facing the same problem. Unable to understand which files to take from the provided patch. Please explain in detail

0 Kudos
sameertest
Observer
Observer
3,152 Views
Registered: ‎02-08-2018

Inspite of taking the two files of bsp, I am stuck in the same situation of no echo

 

realtek.jpg

 

 

putty_error.png

0 Kudos
sameertest
Observer
Observer
3,139 Views
Registered: ‎02-08-2018

ping works fine, after removing isolation in the advanced configuration of zynq

Packet sender utility is able to send packets

but no display (echo) on teraterm

telnet (with putty) doesn't work

0 Kudos