...
Data types used in this documentation are described in the data types table. There is no string data type and arrays should be considered as a regular array of any basic data type. When describing a field, numbers in front of the data type indicates the array size. For instance, 4L means a sequence of four unsigned longs (16 bytes). If the quantity is omitted it must be considered as 1. All data types that are longer than one byte should be considered as little endian.
The generic request frame is below:
Size | Description |
---|---|
B | Frame Size (n+1 bytes) - CRC not included |
B | Register Address |
nB | Frame Data (if any) |
2B | CRC |
Response frames are described below. All answers must be synchronous, with 500ms of timeout. After this timeout two retries can be done, with timeouts of 1000ms and 2000ms, respectively. If sensor board continues not responding, it should be considered in failure state and the mode should try to identify the board again at each one minute.
...
Sensor Board Register Map
The set of registers that should be implemented are listed below:
...
If the power supply is provided by sensor it should report this information using the sensor capabilities field. In this case, this register is used to read the battery charge.
Request
|-------+------+-------------|
| Value | Size | Description |
|-------+------+-------------|
| 0x01 | B | Size |
| 0x06 | B | Address |
| CRC | S | CRC |
|-------+------+-------------|
Response
|--------+------+----------------------------|
| Value | Size | Description |
|--------+------+----------------------------|
| Size | B | Response size |
| Status | B | Response status |
| Charge | B | Battery charge (0 to 100%) |
| CRC | S | CRC |
|--------+------+----------------------------|
Read Battery charge (0x07)
...
Value | Size | Description |
---|---|---|
0x01 | B | Size |
0x06 | B | Address |
CRC | S | CRC |
Response
Value | Size | Description |
---|---|---|
0x03 | B | Size |
Status | B | Response status |
0x06 | B | Address |
Charge | B | Battery charge (0 to 100%) |
CRC | S | CRC |
Read Battery charge (0x07)
When the battery is attached to the mote, it can use this register to report battery charge to the sensor board. A sensor board with display could show this information to the user.
Request
Value | Size | Description |
---|---|---|
0x02 | B | Size |
0x07 | B | Address |
Charge | B | Battery charge (0 to 100%) |
CRC | 2B | CRC |
Response
Value | Size | Description |
---|---|---|
0x02 | B | Size |
Status | B | Response status |
0x07 | B | Address |
CRC | 2B | CRC |
Wireless network status (0x08)
This register is used to report the wireless status to the sensor board. A sensor board with display could show this information to the user.
Request
|--------+------+----------------------------|
| Value | Size | Description |
|--------+------+----------------------------|
| 0x02 | B | Size |
| 0x07 | B | Address |
| Charge | B | Battery charge (0 to 100%) |
| CRC | S | CRC |
|--------+------+----------------------------|
Response
|--------+------+-----------------|
| Value | Size | Description |
|--------+------+-----------------|
| Size | B | Response size |
| Status | B | Response status |
| CRC | S | CRC |
|--------+------+-----------------|
Wireless network status (0x08)
This register is used to report the wireless status to the sensor board. A sensor board with display could show this information to the user. In this case, sensor capability should indicate that wireless information is required.
Request
|--------+------+-----------------------------|
| Value | Size | Description |
|--------+------+-----------------------------|
| 0x02 | B | Size |
| 0x08 | B | Address |
| Status | B | Network status (see table) |
| CRC | S | CRC |
|--------+------+-----------------------------|
Response
|--------+------+-----------------|
| Value | Size | Description |
|--------+------+-----------------|
| Size | B | Response size |
| Status | B | Response status |
| CRC | S | CRC |
|--------+------+-----------------|
Wireless network strength (0x09)
This register is used to report the wireless strength to the sensor board. A sensor board with display could show this information to the user. In this case, sensor capability should indicate that wireless information is required.
Request
|--------+------+-------------------------------------|
| Value | Size | Description |
|--------+------+-------------------------------------|
| 0x02 | B | Size |
| 0x09 | B | Address |
| Status | B | Network signal strength (0 to 100%) |
| CRC | S | CRC |
|--------+------+-------------------------------------|
Response
|--------+------+-----------------|
| Value | Size | Description |
|--------+------+-----------------|
| Size | B | Response size |
| Status | B | Response status |
| CRC | S | CRC |
|--------+------+-----------------|
Display register (0x0A)
If the sensor has some display attached (reported in capabilities field),the mote can use it for bringing information to the user. The display need to have a way to map the ASCII information received for a specific display line. Character displays organized as 24x2 (24 columns and 2 lines) are a natural candidate but other displays can be used since a proper mapping is provided.
Request
|-------------+------+-------------------------------|
| Value | Size | Description |
|-------------+------+-------------------------------|
| 26 | B | Size |
| 0x0A | B | Address |
| Line | B | Display Line |
| Information | 24B | Display information, in ASCII |
| CRC | S | CRC |
|-------------+------+-------------------------------|
Response
...
In this case, sensor capability should indicate that wireless information is required.
Request
Value | Size | Description |
---|---|---|
0x02 | B | Size |
0x08 | B | Address |
Charge | B | Network status (see table) |
CRC | 2B | CRC |
Response
Value | Size | Description |
---|---|---|
0x02 | B | Size |
Status | B | Response status |
0x08 | B | Address |
CRC | 2B | CRC |
Wireless network strength (0x09)
This register is used to report the wireless strength to the sensor board. A sensor board with display could show this information to the user. In this case, sensor capability should indicate that wireless information is required.
Request
Value | Size | Description |
---|---|---|
0x02 | B | Size |
0x09 | B | Address |
Charge | B | Network signal strngth (0 to 100%) |
CRC | 2B | CRC |
Response
Value | Size | Description |
---|---|---|
0x02 | B | Size |
Status | B | Response status |
0x09 | B | Address |
CRC | 2B | CRC |
Display register (0x0A)
If the sensor has some display attached (reported in capabilities field),the mote can use it for bringing information to the user. The display need to have a way to map the ASCII information received for a specific display line. Character displays organized as 24x2 (24 columns and 2 lines) are a natural candidate but other displays can be used since a proper mapping is provided.
Request
Value | Size | Description |
---|---|---|
0x1A | B | Size |
0x0A | B | Address |
Line | B | Display line |
Information | 24B | Display information, in ASCII |
CRC | 2B | CRC |
Response
Value | Size | Description |
---|---|---|
0x02 | B | Size |
Status | B | Response status |
0x0A | B | Address |
CRC | 2B | CRC |
Main server address (0x0B)
...