Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: adding address in answer just to avoid keeping state in send() functions ... Is next step ito add transaction ?

...

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:

SizeDescription
BFrame Size (n+1 bytes) - CRC not included
BRegister Address
nBFrame Data (if any)
2BCRC

 

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)

...

ValueSizeDescription
0x01BSize
0x06BAddress
CRCSCRC

 

Response

ValueSizeDescription
0x03BSize
StatusBResponse status
0x06BAddress
ChargeBBattery charge (0 to 100%)
CRCSCRC

 

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 

ValueSizeDescription
0x02BSize
0x07BAddress
ChargeBBattery charge (0 to 100%)
CRC2BCRC

 

Response

ValueSizeDescription
0x02BSize
StatusBResponse status
0x07BAddress
CRC2BCRC

 

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

ValueSizeDescription
0x02BSize
0x08BAddress
ChargeBNetwork status (see table)
CRC2BCRC

 

Response

ValueSizeDescription
0x02BSize
StatusBResponse status
0x08BAddress
CRC2BCRC

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

ValueSizeDescription
0x02BSize
0x09BAddress
ChargeBNetwork signal strngth (0 to 100%)
CRC2BCRC


Response

ValueSizeDescription
0x02BSize
StatusBResponse status
0x09BAddress
CRC2BCRC

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

ValueSizeDescription
0x1ABSize
0x0ABAddress
LineBDisplay line
Information24BDisplay information, in ASCII
CRC2BCRC

 

Response

ValueSizeDescription
0x02BSize
StatusBResponse status
0x0ABAddress
CRC2BCRC

 

Main server address (0x0B)  

...