I've been stuck for a while now on a problem trying to create a socket.
I have an application consisting of two tasks (lets call them Task A and Task B). Task A is the main task, automatically started by MQX. Task A initializes RTCS, sets up the Ethernet device, obtains an IP address using DHCP and creates and starts Task B. Task B is supposed to create a socket and then listen for incoming remote connections. One of the first things it does is attempt to create the listening socket by calling the RTCS socket() function. However, this call never returns and worse, no other tasks appear to run after that. If I break the execution and step through the code I can see that the program seems to be looping inside the MQX dispatcher. Even the RTCS task is no longer running because I can't even ping my board.
If I try calling socket() in Task A there is no problem at all and a handle to a new socket is returned.
Am I missing something fundamental here? I've run out of things to try and I can't find an example where a socket is created on a task that is not the same one that initialized RTCS.
Any help or suggestions would be greatly appreciated.