Problem with lwip / tcpecho

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with lwip / tcpecho

1,588 Views
paulfargotstein
Contributor I

We have a board using the K64 that we're trying to do Ethernet-TCP/IP com using KDS 3.0 with KSDK 1.3.  I've been trying to bring up the lwip demo app tcpecho (bare metal) and I just can't get it to work.  One thing different from the FRDM board is we have a Micrel KSZ8794 non-managed 3-port switch connected to the Ethernet port of the micro.   Since it's non-managed, it should be transparent to the bus.  The code builds and executes.  The PC has a 2nd network card plugged in (Intel I210) and I set the IP address, etc according to the Freescale app note ("Adding lwIP to KDS3.0 Project").  I'm attempting to send messages via the PC app SocketTest v3.0 and monitoring the bus with Wireshark.  When I attempt to connect  (the IP addr is set to 168.192.1.102 and the Port is 7) to the board with TestSocket and I get a time out.  Wireshark says there's no activity from the board, only the PC and I can see the query of the board coming from the PC:

 

45 33.788063000 IntelCor_75:e0:c0 Broadcast ARP 42 Who has 192.168.1.102?  Tell 192.168.1.3

 

I've tried all 3 Ethernet ports.  192.168.1.102 is the address I've set in the code and the gateway and mask are set to 192.168.1.1 and 255.255.255.0 respectively.  The PC is set to IP adr 192.168.1.3.  The mask is 255,255,255,0 and the gateway is blank although I tried all combinations with mask 255,255,0,0 and gateway 192.168.1.1 with the same time out.

 

Any help would be appreciated.

 

-Paul

Labels (1)
0 Kudos
Reply
1 Reply

782 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Paul,

when I checked tcpecho example at the begging I used TeraTerm, but it didnt work. Then I had to use SocketTest application to see it work.

I edited the IP address in tcpecho example to be 192.168.1.200 and my laptop has 192.168.1.110. Then in socketTest application I started a connection as client to address 192.168.1.200 in Port 7. This is not very obvious but it is defined in line 119.

err = tcp_bind(echo_pcb, IP_ADDR_ANY, 7);

You may find useful the following document which is based in tcpecho example with FreeRTOS and it explains how to make it work with SocketTest.

How to Add lwIP to KDS3.0 Project

If the problem persists please try with a FRDM-K64 board to consider or discard the possibility of hardware issue.

Regards,

Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply