I am investigating Bluetooth mesh examples, which you presented, and I faced with incomprehension with initialization of struct bt_mesh_elem
. Can you explain the meaning of location descriptor in mesh element (bt_mesh_elem.loc
)?
For instance, in an example of Zephyr Project repository https://github.com/zephyrproject-rtos/zephyr/blob/v2.3-branch/samples/boards/nrf/mesh/onoff-app/src/main.c#L264-L269 all elements have location equals to 0.
However, in an example of nRF Connect SDK repository https://github.com/nrfconnect/sdk-nrf/blob/v1.3-branch/samples/bluetooth/mesh/light/src/model_handler.c#L166-L182 elements have location equals from 1 to 4.
But I didn't notice any behaviour differences of examples depending on the location member.
In the comment to this structure member https://github.com/zephyrproject-rtos/zephyr/blob/v2.3-branch/include/bluetooth/mesh/access.h#L64 is written: Location Descriptor (GATT Bluetooth Namespace Descriptors). As I guess, it implies this GATT Namespace Descriptors. Do those above-mentioned location members correspond to values in a table from 0x0000
to 0x0110
, which are called description field? Is it right that your location member in the structure is this description field in the specification? As I understand, the second table (GATT Bluetooth Namespace Descriptions) on this page has meaning only when namespace contains the value 0x01
(Bluetooth SIG) from the first table. But I couldn't find a piece of code where Zephyr RTOS set namespace field equals to 0x01
.
Could you clarify these details about the location member in bt_mesh_elem
structure?