This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Meaning of location descriptor in mesh element: bt_mesh_elem.loc

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?

Parents
  • Hi,

    Yes, this is the GATT Bluetooth Namespace Description and uses that set of values. The comment on that page about Namespace does not apply for Bluetooth mesh - for the given field in the Bluetooth mesh stack (that is, that "len" field), the namespace per definition is in the Bluetooth SIG namespace.

    The field is used to identify elements when there are multiple elements on the same node, primarily meant for the end user (e.g. a light bulb fixture with one bulb on the "right" side and one bulb on the "left" side, that are controlled by different elements.)

    Regards,
    Terje

Reply
  • Hi,

    Yes, this is the GATT Bluetooth Namespace Description and uses that set of values. The comment on that page about Namespace does not apply for Bluetooth mesh - for the given field in the Bluetooth mesh stack (that is, that "len" field), the namespace per definition is in the Bluetooth SIG namespace.

    The field is used to identify elements when there are multiple elements on the same node, primarily meant for the end user (e.g. a light bulb fixture with one bulb on the "right" side and one bulb on the "left" side, that are controlled by different elements.)

    Regards,
    Terje

Children
No Data
Related