
As shown in Figure 4.0.2 below, WSN802G application protocol datagrams use a standard header begin-
ning with a protocol identifier to discriminate WSN802G protocol messages from other message types.
Datagrams are in 32-bit, big-endian format. The standard header fields are:
Protocol Identifier:
Unique identifier for all WSN messages, 0x52464D49
Opcode:
Code indicating the type of command or response
Transaction ID:
This is an incrementing transaction reference counter. Each end of the
link must keep its own counter for transactions that it originates. The
most significant bit of the transaction ID will be set for all transactions
that the server originates.
The WSN802G application protocol messages are listed in Table 4.0.1 below. The port number that the
module sends and receives wireless UDP application messages on is defined by the
SensorServer-
PortNum
parameter, as discussed in Section 7.2. A WSN802G module will accept wireless UDP messag-
es specifically addressed to it, or that are broadcast (addressed to all modules). If a command is received
through a wireless broadcast, the WSN802G module will reply with a broadcast.
The message format is the same for both the over the air UDP payload and the serial data communicated
over either the module’s UART or SPI ports. The Protocol Identifier serves as the start character for
UART or SPI communicated packets with the Opcode used as a further validation of a API message in-
stead of application data.
Byte 0
Byte 1
Byte 2
Byte 3
WSN802G Protocol Identifier = 0x52464D49
Opcode
Transaction ID
Data (variable length)
Figure 4.0.2
Opcode
Direction
Description
0x0000
Server-to-Module
IO_READ_REQUEST
0x0001
Module-to-Server
IO_READ - IO_REPORT
0x0002
Server-to-Module
IO_WRITE_GPIO
0x0003
Server-to-Module
IO_WRITE_PWM
0x0004
Module-to-Server
IO_WRITE_REPLY
0x0005
Module-to-Server
IO_SERIAL_READ
0x0006
Server-to-Module
IO_SERIAL_WRITE
0x0007
Module-to-Server
IO_SPI_READ
0x0008
Server-to-Module
IO_SPI_WRITE
0x0010
Server-to-Module
CFG_READ
0x0011
Module-to-Server
CFG_READ_REPLY
0x0012
Server-to-Module
CFG_WRITE
0x0013
Module-to-Server
CFG_WRITE_REPLY
Table 4.0.1
©2009-2015 by Murata Electronics N.A., Inc.
HN-210D/X, HN-214 D/X Rev. 2.0 01-16-15
Page 18 of 101
www.murata.com