AnsweredAssumed Answered

BF537 socket programming and network problem

Question asked by sirnoname on Dec 24, 2011
Latest reply on Dec 25, 2011 by sonic

Hello together,

 

I have a unsolvable problem here at my stamp board.

I am using bf537 board and RC5 of 2011 and I tried the new Image for testing purpose with same results.

I did a simple network server with UDP receiving. For this I use the common bind and resuable option to a port 2797.

In the beginning all works but if I increase the uClinux size with some programs there are problems.

There are two problems which comes randomly:

1. The server will receive a blank packet from the correct IP address

2. The server gets a packet from 0.0.0.0

 

If I restart the application it works forever!

I tried to reopen the socket out of the program while the error occours with no success, only a restart of the application does help.

Then I did a random workaround in the recvfrom() function, I set the last address variables to NULL (structure and size of structure).

It worked.

Then I set the two variables to global instead of using variable pointer to variables in the function - it worked or mybae it get stable for some reason.

 

All looks like a bad memory managment but I cannot get into it.

Is there something which can help me there out?

Outcomes