![Four-Faith F8 36 Series User Manual Download Page 85](http://html1.mh-extra.com/html/four-faith/f8-36-series/f8-36-series_user-manual_2324526085.webp)
F8X36 Series Router
User Manual
Appendix B API Accord Format
API operation requires that communication with the module be done through a
structured interface (data is communicated in frames in a defined order). The API
specifies how
commands, command responses and module status messages are sent and received
from the
module using a UART Data Frame.
To enter API mode :
In the transparent mode
,
send the 3-character command sequence“= = =”twice
through serial port.
The UART data frame structure is defined as follows:
SOF
Length
Command Frame data
Frame
check
sequence
1 Byte
1 Byte
2 Bytes
xx Bytes (xx<250)
1 Byte
SOF (Start of Frame):
This is a one byte field with value equal to 0xFE that defines the
start of each general serial packet.
Length :
1 byte length of the actual data.
Command :
2 byte command Id.
Frame data :
the data ranging from 0-250 bytes.
FCS (Frame Check Sequence):
This is a one byte field that is used to ensure packet integrity. This field is computed
as an XOR of all the bytes in the message starting with LEN field and through the last byte
of data. The receiver XORs all the received data bytes as indicated above and then XORs
the received FCS field. If the sum is not equal to zero, the received packet is in error.
Attention :
The data content should be send with little-endian, the lowest byte come first.
4.4.3.1 data send command
SREQ:
Fields
Sub field
Offset Example
Description
SOF
1
FE
0xFE
Length
1
06
The length of data
Command Send
2
24 5F
Fixed to 24 5F
Data
Destination
2
00 00
Destination node
address
Content
<80
41 41 41 41
The content to be send
FCS
1
7D
Frame check
sequence
SRSP: