AnsweredAssumed Answered

SPWF04SA SPI how to add extra data

Question asked by bernd schönlebe on Jul 28, 2017
Latest reply on Aug 1, 2017 by bernd schönlebe

for example the datasheet offers this command

 

"AT+S.SOCKDW=<sid>,<cid> <len><cr>{data}"

 

this is the format if UART is used, but at no point is explained how I do this with SPI! All thats written is:

 

"To map an AT command in the equivalent SPI command, the following procedure applies:
1. Use the corresponding CMD ID specified in Table 1: "SPWF04Sx commands" and fill the 4th bytes of the master packet.
2. If optional parameters are available, count the number of comma-separated items after the “=” character and with that number the 6th byte of the message. Starting from the 7th byte, start to write 1 byte containing the field lengths and then copy the field bytes. Then continue with the remaining parameters.
3. Once the full payload has been filled, calculate the full message payload lengths and accordingly fill bytes 1 and 2 in the SPI message packet request."

 

Do I just add bytes after the last parameter and adjust the payload length? does the parameter needs to start with <cr> character and is just comma seperated?

 

Best Regards

Outcomes