webset - feature or fault?

Thanks to Cocoontech provided chat room for us to discuss that in real time.
 
To summarize our discussion, server CGI should not put SET_WC=00120012 as last thing in the CGI code, since web server will send DISCONNECT and FIN to the WebControl immediately after that. Then WEBSET function will have no time to process the request from server.  Due to RAM limitation in WebControl, we do not have anyway to let TCP buffer to make another copy of the incoming data.  To work around this limitation is that user server CGI need to add some comment about the data sent AFTER SET_WC= number string.  If during testing, WEBSET did not receive the whole number string, user will need to in its CGI code add more comment at the end of the data (20 bytes to 50 bytes).  That will give WEBSET function more time to process the SET_WC number string.
 
Ross, if the above is not clear enough, please do provide your description on this.
 
CAI_Support said:
Ross, if the above is not clear enough, please do provide your description on this.
 
That makes sense to me - now that I know what's going on!
 
Saying that another way, hopefully for someone else who encounters the same problem...
 
The WebControl board has very limited RAM. When it receives a reply to the webset command it has to try to parse the data as it is received. The TCP/IP stack clears the buffer when it receives the FIN/ACK, so the webcontrol must have completed scanning before then.
 
In order to give it a fighting chance, add some padding after the  SET_WC=nnnn string purely to give it time. On the board I tested it appears to require a minimum of 5 characters plus whatever the length of the "nnnn" string is. 20+ is probably fairly safe.
 
Back
Top