cancel
Showing results for 
Search instead for 
Did you mean: 

Problem sending messages securely to host processor

mafredri
Associate II
Posted on November 15, 2016 at 17:10

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

* SOCKD

Both 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:Reset

The 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
0 REPLIES 0