cancel
Showing results for 
Search instead for 
Did you mean: 

SensorModelClient?

BBake
Associate II

Hello,

While reviewing the provided Android app, I couldn't find any source code for the SensorModelClient class. Is this available anywhere? I'm trying to understand where the ongetSensorStatus handler is called, and the javadocs don't have enough information.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
udidq
Associate II

Hello,

These are the formats for Marshalled Sensor Data given in the Mesh Specification freely downloadable from : 

https://www.bluetooth.com/specifications/mesh-specifications/ .  Mesh Model Specification 1.0.1 Section : 4.2.14 , Page 120.

Client(Smartphone in this case) sends the getSensor command with the null property Id or the Property Id of the Sensor and get the Data in the Sensor Status.

Android App knows the property id of the Sensors supported already .Otherwise it should invoke 4.2.1 Sensor Descriptor Get command to get the currently supported sensors(coming in future release). 

View solution in original post

4 REPLIES 4
udidq
Associate II

Hello,

 ongetSensorStatus is the callback for the getSensor command .(GetSensorStatusCallback is the callback for this command.).

In \src\com\st\bluenrgmesh\view\fragments\other\meshmodels\sensor\SensorConfigFragment.java you call getSensor() on the node address to get the Sensordata in this callback.

SensorModelClient class is not present in the Application but part of library.

BBake
Associate II

Thank you for your response,

May I ask how the android app extracts the propertyID of the sensor? Looking through the firmware, I see this Appli_Sensor_Data_Status() function in appli_sensor.c, but the comments don't clearly explain what format A and format B actually mean other than use format A for temperature, and B for pressure. Are these formats described somewhere, and are there other formats besides these two?

Attaching a picture for better clarity0690X000009YR0CQAW.png

udidq
Associate II

Hello,

These are the formats for Marshalled Sensor Data given in the Mesh Specification freely downloadable from : 

https://www.bluetooth.com/specifications/mesh-specifications/ .  Mesh Model Specification 1.0.1 Section : 4.2.14 , Page 120.

Client(Smartphone in this case) sends the getSensor command with the null property Id or the Property Id of the Sensor and get the Data in the Sensor Status.

Android App knows the property id of the Sensors supported already .Otherwise it should invoke 4.2.1 Sensor Descriptor Get command to get the currently supported sensors(coming in future release). 

Thank you so much for your help.