Connecting two zynqboards via ethernet (TCP+IP)

So finally, FreeRTOS plus TCP+IP is working with vivado and zynqboard.
My question is regarding setup in case of e.g. two zynqboards connected via ethernet.
Network interface is initialized. If i connect zynqboad1 to windows, ping+data exchange working. If i connect zynqboard2 to windows, ping+data exchange working. If i connect zynqboard1 to zynqboard2 with lwIP, ping and dataexchange are working. But if i connect zynqboard1 to zynqboard2 via TCPIP, ping works (if arp request send before ping) but the connect function fails with error code -128(pdFREERTOS_ERRNO_ENOTCONN). Is there any special settings has to be done to connect two zynqboards with tcpipstack via tcp socket?
zynqboard1 is server, zynqboard2 is client.
zynqboard1: not use gateway, not use dhcp, ip is set to 192.0.0.3, subnet mask is ffffff00, mac is 0x11 0x22 0x33 0x44 0x55 0x77.
zynqboard2: not use gateway, not use dhcp, ip is set to 192.0.0.4, subnet mask is ffffff00, mac is 0x11, 0x66, 0x33, 0x44, 0x55, 0x88.
Connection between the 2 boards was made with:
-patch cable directly, patch cable through switch, patch cable through hub
-crosslink cable directly, crosslink cable through switch(its obviously the same as pacth cable directly), crosslink cable through hub.

May I ask if there any options to be set in case of direct eth connection between two zynqboards with freeRTOS+TCPIP?

Hi @adam,

Thanks for trying out the FreeRTOS+TCP stack.
Can you help us with some clarifications.

  1. When you tried the Zync boards with PC for data-exchange, were the zync boards acting as clients and PC as server in both the cases?
  2. If the above answer is yes, then the issue seems to be when the ZyncBoard is acting as a Server
  3. Can you create a setup with ZyncBoard as Server and PC as client and share the Wireshark capture file.
  4. Is the data transfer mode TCP?
    This will help us get more data-points on the actual issue.
1 Like

Hello,

1.: tried both: zynq is server, pc is client and zynq is client, pc is server
3.: i will
4. yes, simple send x bytes, read x bytes.

HI @madaf

We are also trying to replicate the issue internally.
Can you please help us with sharing the device side server application you are using.

Thank You

Can you please help us with sharing the device side server application

Yes please, send the TCP-related code from both sides, client and server.
And also I would be curious to see your configuration in FreeRTOSIPConfig.h.

Is there any special settings has to be done to connect two zynqboards with tcpipstack via tcp socket?

There is not

Hi @madaf

I tried to reproduce the issue locally on 2 STM32 device connected via ethernet cable and the TCP connection worked fine for me. I was able to send and receiver data between the server and client.
It would be great if you can share how you are configuring the client and server on the device to look further into the issue.

Thank you

Some moments please something is started to working, im targeting two question now:
-some mac addresses not working, some yes

We changed the mac addresses and since a point it started to work. We changed nothing, but the mac addresses. We used like: 0x11 0x22 0x33 0x44 0x55… etc and on the other side 0x66 0x55 0x44… Then started to get random addresses and it seems to work.

Generally if you have assigned mac address to your hardware which accidentally matches existing connected device mac address there might be issue with the connection.
Most of the time we take MAC of any device and change the last few bytes of the address to assign it to the hardware.

No, the mac addresses not matched. I dont know why it worked with the random addresses, but it seems working right now. Thanks!

1 Like

The second bit of the MAC address (counted from MSB) indicates a locally administrated address. For the sake of it, try using ox26… instead of 0x66… to see if some component in your setup gets confused by that bit set.

1 Like

Thank you very much!