Finally I solved (part) of the issue.
As I said in the last post, the problem was that wifi_connect ONLY connects to wifi, it does not sertup a LWIP stack nor calls DHCP to get an IP.
I’ve added this two lines after wifi connect.:
DiagPrintf( “Start LwIP\n”);
LwIP_Init();
DiagPrintf( “Start DHCP\n”);
LwIP_DHCP(0, DHCP_START);
with this, done, the Cannot allocate … message is gone. If I look from the AP point of view, now I can see that my board has a proper IP!! and I can ping my device from other machines in the same lan and even in remote lans (so DHCP is working properly)
But now, next stopper, no way to establish a socket with anything in the net. I always get error: -1