Rabbit RCM6700 and Dynamic C 10.72 sockets not working properly

Hello,

After using the patch for the writing of flash memory (Dynamic C Serial Flash Patch) it was necessary to change to the software version Dynamic 10.72 (before we worked with another previous version). Now, all our FW has problems with the client / server system implemented with TCP sockets (previously it worked fine), it loses the connection on numerous occasions.

Have there been any changes in the libraries that have made the basic sockets management functions not work properly?

1 Like

Which version were you using previously? There were many changes in Dynamic C 10 over its release history, including some to improve compatibility with ANSI C.

Are you using uC/OS-II? Co-states and co-functions? If you run sample programs using sockets can you reproduce the failures?

One common cause of socket problems is declaring your socket as an auto variable on the stack of a function that exits (e.g., other than main), or in the stacks of separate tasks. When you call tcp_tick(), it needs access to each of those structures, and it will fail if it was released (created in function that has exited) or the task isn’t running (uC/OS-II).

Make sure you declare your sockets as “static” or as global variables.

If you run your program in the debugger with NET_VERBOSE and TCP_VERBOSE defined (in project options, or before #using dcrtcp.lib), do you see any output that might point to why the sockets are dropping? If you capture packets on your network using Wireshark, can you see what’s happening when the socket closes?

If you can reliably reproduce the failure with a stripped down program, you can submit it to Digi’s Tech Support department with a bug report.