For my application I need to listen for connection on TCP port 80 and 81 (for example).
To realize this I can register two TCP server with
T+SCON=S,TSN,80,0 and T+SCON=S,TSN,81,0 .
WIzfi respond both with [OK].
If I connect to TCP server on port 81, then the connection is established on socket ref 0.
But unfortunately if I try to connect to TCP server on port 80, then connection is rejected.
If I “register as service”, then I do not need to care for AP join or disconnect / socket connect and disconnect, Wizfi automatically open the socket server.
But if I “open at once”, then I need to monitor joined/disconnected status, and “open at once” every sucessfull AP join.
But there is more problem.
I can detect AP connection state by WSTAT polling.
But If AP restarted, then AP disapper just for short time.
For this case WSTAT polling is not works well.
This is why “register as service” is very helpful.
Moreover “open at once” open for just one connection.
If connetion are closed need to detect it and register socket again.
I test this problem with 1.0.5.2 firmware, and I got a same result (as 1.0.3.3).
If I try to open socket server on port 80 and 81, then only port 81 are responding.
The “Added TCP Server Multi Connection” of are maybe related to multi connection on a same port only.
Unfortunately does not make a sense I set FSOCK9 to 0 or 1, the result are same.
If I try to open socket server on port 80 and 81 it is success, but only port 81 are responding.
The port 80 are respond with R at TCP level.