cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
14,539 Views
Registered: ‎09-24-2009

Can't ping a TCP Echo Server

Jump to solution

I am trying to connect to a TCP Echo server from the example xapp1026. I believe I have compiled it correctly and download it, therefore the application is running on the board, but there is no way to connect it. In the board side, I am using Microblaze with Xilkernel 4.00 + lwIP 3.00.

 

The network settings are:

Board:

IP: 192.168.1.10

Mask: 255.255.255.0

Gateway: 192.168.1.1

 

PC:

IP: 192.168.1.9

Mask: 255.255.255.0

Gateway: 192.168.1.1

 

I have connected them with a cross-over cable. The messages printed out in RS323 are:

 

-----lwIP RAW Mode Demo Application ------
Board IP:       192.168.1.10
Netmask :       255.255.255.0
Gateway :       192.168.1.1
netif_set_ipaddr: netif address being changed
netif: IP address of interface xe set to 192.168.1.10
netif: netmask of interface xe set to 255.255.255.0
netif: GW address of interface xe set to 192.168.1.1
netif: added interface xe IP addr 192.168.1.10 netmask 255.255.255.0 gw 192.168.
1.1
netif: setting default interface xe
tcp_bind: bind to port 7

              Server   Port Connect With..
-------------------- ------ --------------------
         echo server      7 $ telnet <board_ip> 7

 

After that, when I try to connect "telnet 192.168.1.10 7", I cannot succeed. Even to ping, it cannot reach the destination.

 

I have also checked if the LED RX from the board blinks when I try to ping, and it does. So I believe the problem is in somewhere in the software and/or configuration.

 

Is there any thing that I am missing? Any reason the packet is not arriving in the transport layer? I have activated all debug messages from lwIP, but I can only see:

 

tcp_slowtmr: no active pcbs

 

Thanks for your attention, and I am looking forward to hearing some insight!

 

Greetings,

Rodolfo Lossio

 

Tags (5)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
18,984 Views
Registered: ‎09-24-2009
I found the problem in my source code. In platform.c from the Xapp1026, in the function that enables the interruption, there is a DEFINE that is not encapsulated in platform.h. So in case you add a IP in EDK with a different name from the sample code, the compiler will miss some parts of the code.

View solution in original post

0 Kudos
15 Replies
Highlighted
Participant
Participant
14,526 Views
Registered: ‎10-29-2008

This is essentially the same position I am in right now.  I have discovered that the software parameter in MSS for specifying the speed of the processor is set to 100000000 instead of my actual speed of 125000000 and I am working to correct this and see if it is a problem for some reason.  I also noticed that you are using LwIP 3.00 ... I started here also, but I believe that LwIP v1.3.0 is actually the newer version and the preferred one to use.

 

I have been looking with wireshark and have found that the stack is not responding to ARP requests at all.  Of course, without an ARP response nothing else is going to work since no one will know the MAC address of the board.  It appears that no data is making it to LwIP for some reason ... I'm trying to track down why. 

 

Steve 

0 Kudos
Highlighted
Participant
Participant
14,514 Views
Registered: ‎10-29-2008
Clock speed fix hasn't helped... this is not the answer.
0 Kudos
Highlighted
Contributor
Contributor
14,507 Views
Registered: ‎08-04-2009

Check the computer Network Adapter settings >> Advanced >>Link Speed and Duplex  and set it for 100Mbps Full Duplex  after which try to ping

 

Regards
Archu
0 Kudos
Highlighted
Visitor
Visitor
14,504 Views
Registered: ‎09-24-2009

Dear Achu,

 

It is already set to 100 Mbps Duplex, you can see that the LED for 100 Mbps is ON. I also tried with 10 Mbps, so only the second LED will be ON.

 

Greetings,

Rodolfo Lossio 

0 Kudos
Highlighted
Contributor
Contributor
14,501 Views
Registered: ‎08-04-2009

 

 

Check the Heap  and stack Size and set it 0x20000

Regards
Archu
0 Kudos
Highlighted
Visitor
Visitor
14,499 Views
Registered: ‎09-24-2009

Yup, both stack and heap are set in 0x2000.

 

I have tracked all posts talking about lwIP. I hope I didn't miss any issue. 

0 Kudos
Highlighted
Visitor
Visitor
18,985 Views
Registered: ‎09-24-2009
I found the problem in my source code. In platform.c from the Xapp1026, in the function that enables the interruption, there is a DEFINE that is not encapsulated in platform.h. So in case you add a IP in EDK with a different name from the sample code, the compiler will miss some parts of the code.

View solution in original post

0 Kudos
Highlighted
Visitor
Visitor
14,004 Views
Registered: ‎05-22-2010

hello

 

which DEFINE?? can u plz paste tht line?

thanx

 

0 Kudos
Highlighted
Participant
Participant
13,795 Views
Registered: ‎04-14-2010

I have the same problem.  I just used the demo boards from Xilinx (spartan 3A DSP 1800, and spartan 3E starter board) and use the default system from base system build.  I need to add timer and interrupt controller if they are not in system in default.

 

In stead of using XAPP1026, I used LwIP echo server example project (similar to the helloWorld, and memor Test example) come with SDK11.4, there is no compiling error. The terminal display showing the correct IP/Mask/Gateway address. On wireshark, I saw "Gratuitous ARP for 192.168.1.10 (Request)" was sent out from FPGA board when I run the LwIP echo server. Then, the FPGA board never response to any ARP packges form ping or telnet. 

 

I thought the LwIP echo server project coming with SDK should be easy to use. But I have stuck there for two weeks. Does any one have any suggestions.

 

Thank you so much in advance.

 

Tom

 

0 Kudos
Highlighted
Participant
Participant
8,269 Views
Registered: ‎02-13-2010

Which DEFINE?

 

can u write the code of DEFINE?

 

 

0 Kudos
Highlighted
Visitor
Visitor
8,259 Views
Registered: ‎09-24-2009

Sorry, I don't have my code here.

 

But just make sure that all DEFINES you have in your code are in xparameters.h

0 Kudos
Participant
Participant
8,250 Views
Registered: ‎10-29-2008

FYI, my particular problem was that when I wired up the hardware in my MHS file, I missed one of the clocks or reset lines on the TEMAC.  I found it by taking a working example and going over the MHS lines one line at a time and verifying that I had not missed anything.

 

Steve

0 Kudos
Highlighted
7,580 Views
Registered: ‎08-17-2011

Hi, Tom. You probably have solved your problem, right?

I'm now facing the same problem as you did.  But my board does not even respond to ARP from PC, so either Ping or Telnet is impossible.

If possible, can you pls guide me a little bit? I'd be truly grateful for it....

0 Kudos
Highlighted
7,122 Views
Registered: ‎11-03-2013
Hey facing same problem. When using wireshark i can see ARP asking who has 192.168.1.4(my PC's ip) Tell . But FPGA is getting no response. I can ping but cannot connect to PC using hyperterminal/teraterm.
jeevanreddymandali
0 Kudos
Highlighted
Contributor
Contributor
6,629 Views
Registered: ‎05-26-2014

Hello All,

             Did anyone got the solution for this, even i'm facing same problem.

            Please help. 

 

            thanks

0 Kudos