This is applicable to both ADWSN solutions (ADRadioNet and AD6LoWPAN).
The specific sensor values that are being sent from a given sensor mote can be determined by the "sensor mask" value. This value is part of the payload sent from the node. The feature of sensor mask is added in the ADRadioNet EDKv2.0 & AD6LoWPAN EDKv1.0. Users can download the latest code from the download link from EngineerZone pages (ADRadioNet and AD6LoWPAN), or, directly from http://www.analog.com/wsn
The two byte "sensor mask" is as shown below.
In both ADRadioNet & AD6LoWPAN, the above "sensor mask" is assumed. If some sensors are to enabled in a specific node, those alone will be enabled in the sensor mask register. The sensor data corresponding to these enabled sensors will be available in the prescribed order as defined by the user (from LSB side). The length of the each sensor payload is defined a priori (for example, the accelerometer sensor will have 3 float values corresponding to x, y & z-axis. Similarly, for ALS, it is a single value. All values are assumed "float" for ease of implementation).
Please find the example sensor information packet below, captured by the PC UI tool, by enabling the following sensors
The sensor data is color coded in this example as below. The statistics information is available right after the sensor data.
Yellow color ==> INT_MARK
Light Green ==> SINGLE_MARK
Red color ==> Sensor Enable Mask
Dark Green ==> Temperature Data
Dark Yellow ==> Accelerometer (X, Y and Z axis)
Grey color ==> Temperature and Relative Humidity
Pink color ==> Ambient Light Sensor APDS9005
In this example, the sensor mask = 0x0056, indicating the following sensors are enabled in the system - ADT75, ADXL362, SHT21 and ALS (APDS9005). The below table shows how the value of mask is calculated.
The sensor data representation corresponding to this example, at “Network overview” window of PC tool will be as below
SHT21 Relative Humidity
Please note, the overall schema of this sensor representation can be changed based on user requirement. (like for example - the easiest is changing the sensor mask register as per user requirement; for this few modifications in code are required). It is up to the user to add an application level logic to handle the sensor data as desired.
This FAQ was generated from the following discussion: Identifying sensors enabled and sensors data, from a data packet of WSN node in a network.