Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

User10076
Level 2
Level 2
Hello,

I'm having some problems with TCP/IP communication between an XMC server and a Java client.
I can send and receive TCP messages but only 5, after 5 messages my server doesn't receive anything.
I've analyzed data using Wireshark and it looks like the client is sending the message but the server doesn't show any received data, doesn't enter in the receive callback function or give any error.
Have you encountered this problem? Do you have any idea why this behaviour might happen.
Thank you!

Regards,
Petru S
0 Likes
5 Replies
User7372
Level 2
Level 2
You're providing very little information about your project, thus, I can only give general hints here:

* does the controller hang/get stuck?
* is an error handler on the controller called - which one?
* do you run out of memory?
* do you properly release/clean up received packets?

cheers, Benjamin
0 Likes
User10076
Level 2
Level 2
Hello Benjamin,

Thank you for your reply!
The controller doesn't get stuck, the board is still working properly with the other apps but not with TCP/IP.
It doesn't give any error at all. The memory is released and cleaned properly so there is no problem with running out of memory.
The TCP app freezes and nothing can acces it's methods after the fifth message, not even connecting or disconnecting clients.
I checked the defines within the app and doubled the values but there is no change in this behaviour.
I cannot give you any project information but we can discuss about the ETH app and it's behaviour.

Thank you!

Best regards,
Petru S.
0 Likes
User7372
Level 2
Level 2
hm, are you using the ETH_LWIP - app?

Ethernet is using IRQ 108 on the XMC controller.
When everything up to the XMC itself is working, IRQ_Hdlr_108 should trigger.
maybe you can start debugging here.

for debugging, I would also disable a lot of features from the LWIP, like IP fragmentation, ...

cheers
0 Likes
User7372
Level 2
Level 2
another guess, since you say you can only do 5 messages:
are you properly re-using or closing the TCP sockets?

the default ETH_LWIP-app settings are to allow only 5 concurrent active TCP connections - see the "Memory Settings" page

regards
0 Likes
User10076
Level 2
Level 2
I realize now that I forgot to specify that I am using DAVE 3.10 and not DAVE 4.2. ETH_LWIP is in DAVE 4.2 if I am not mistaking.
In this stage, I can connect up to 10 clients simultaneously, but I can receive only 5 messages totally, no matter which client sent the message.
I will look for the IRQ 108. Maybe this wil helpe me unblock something.

Thanks,
Petru S.
0 Likes