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.
First example
AT command: AT+S.FSL
1.
Command ID: 0x25
2.
Number of parameters: 0x00
3.
Full message payload length: 0x02
Result:
SPI message 0x02 0x00 0x02 0x25 0x00
Second example
AT command: AT+S.SCAN=d,/scan.txt
1.
Command ID: 0x33
2.
Number of parameters: 0x02
a.
First Parameter: 0x01,d
b.
Second Parameter: 0x09,"/scan.txt"
3.
Full message payload length: 0x0D
Result:
SPI Message 0x02 0x00 0x0D 0x33 0x02 0x01 d 0x09 "/scan.txt"
Third example
AT command: AT+S.SOCKW=0,5<Cr>hello
1.
Command ID: 0x44
2.
Number of parameters: 0x02
a.
First Parameter: 0x01,0
b.
Second Parameter: 0x01,5
3.
Payload: "hello"
Result:
SPI Message 0x02 0x00 0x0B 0x44 0x02 0x01 0 0x01 5 "hello"
Fourth example
Asynchronous event: +WIND:1:Poweron:170726-b7ac1ba-SPWF04S
1.
kind of event (4bits): 0x01
2.
wifi_state (4 bits): 0x0
3.
Indication number: 0x01
4.
Full message payload length: 0x16
Result
: SPI Message 0x02 0x10 0x01 0x16 0x00 (170726-b7ac1ba-SPWF04S)
UM2114
SPI protocol
UM2114
-
Rev 3
page 9/66