2016-11-15 08:10 AM
Hi,
I'm trying to send messages to the host processor (the one communicating with the SPWF01SA module).As far as I know there are two methods:* /output.cgi?text=message* SOCKDBoth output.cgi and the socket server suffer from the fact that messages are indistinguishable from asynchronous indications from the SPWF01SA module.If I were to send two requests to output.cgi:/output.cgi?text=/output.cgi?text=+WIND:2:ResetThe host processor would now think that it received a valid WIND. The first request to output.cgi sends ''\r\n'' and the second ''+WIND:2:Reset\r\n'' resulting in ''\r\n+WIND:2:Reset\r\n'' which is identical to a WIND.We have this same issue when a socket client connects to the socket server. Even when we are in Data Mode, we must continuously monitor WINDs for returning to Command Mode.In this case the socket client can simply send: ''\r\n+WIND:59:Back to Command Mode\r\n\r\n+WIND:2:Reset\r\n'' which will have the same effect as the output.cgi example.While working with the SPWF01SA module I've noticed that there are many cases where the communication protocol is not deterministic and prone to errors and race conditions, I'd love to find a way around them. #socket-sockd-output-security