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

Bluetooth Mesh Application

Hi,

I have the following application in mind: I want to create a bluetooth mesh network, in which one node will broadcast sensor readings, some nodes will be used to hop the data (relay nodes) to expand the coverage of the network, and one node will be used as a gateway to collect the broadcast data and transmit it to another network. 

I have read the Creating custom models document, but I'm not sure how to program the relay nodes, as in how to program them so that they actively scan for packets and when they receive, they understand that it's not meant for them but for a different address node, then eventually sending it to other nodes in the network.  Please guide me on this. 

If I wish to use android application to get the nodes provisioned in the network, what code should be implemented in the node to provide such functionality as I didn't find any relevant section in Creating custom models

Also, Online Power Profiler has different roles in BLE settings (Advertising, Advertising (non-con/scan), Connection (Peripheral), Connection (Central)), are these modes relevant to Bluetooth mesh? If yes then according to the application that I described above, can you explain which nodes will be in which modes?

Thanks & Regards,

Shyam Joshi

Parents
  • Hi,

    Some of this has already been answered here: nRF Mesh

    In order to get provisioned from a smartphone, the project needs to enable the PB-GATT feature, which is the GATT provisioning bearer. Do this by defining MESH_FEATURE_PB_GATT_ENABLED to 1, for instance in nrf_mesh_config_app.h, which is already done by default in several examples in our SDK, including for the light switch examples.

    Note that you would also probably want to configure the nodes. For that, from a smartphone, you need at least one node in the network that the smartphone can connect to over the GATT bearer. (For normal mesh communication, not only for provisioning.) To enable GATT proxy for a node, define MESH_FEATURE_GATT_PROXY_ENABLED to 1. This is also done by default for the light switch examples, in their nrf_mesh_config_app.h.

    Bluetooth mesh nodes using the ADV bearer, which is the default bearer for Bluetooth mesh, will use advertising for sending messages. Any time not used for sending, will be used receiving (scanning).

    For nodes using the GATT bearer, some of the time will be used in normal BLE connections.

    For Low Power Nodes, advertising is used whenever they need to send a packet. They also use advertising and scanning when communicating with their Friend node.

    Regards,
    Terje

  • Note that you would also probably want to configure the nodes. For that, from a smartphone, you need at least one node in the network that the smartphone can connect to over the GATT bearer. (For normal mesh communication, not only for provisioning.)

    I don't understand what do you mean by the above statement. Can you please elaborate further?

  • Hi,

    For setting up what addresses each model should publish to, and subscribe to, as well as what application key the model should use. For that you need to configure the node. This is usually also done from the provisioner, as you do need the device key for the device in order to do configuration.

    For more information on this, please consult Bluetooth Mesh concepts from our nRF5 SDK for Mesh documentation, and in particular the "Device life cycle" section of that page.

    Regards,
    Terje

Reply
  • Hi,

    For setting up what addresses each model should publish to, and subscribe to, as well as what application key the model should use. For that you need to configure the node. This is usually also done from the provisioner, as you do need the device key for the device in order to do configuration.

    For more information on this, please consult Bluetooth Mesh concepts from our nRF5 SDK for Mesh documentation, and in particular the "Device life cycle" section of that page.

    Regards,
    Terje

Children
  • Thank you for your reply. I've integrated my custom model with light switch example, as MESH_FEATURE_PB_GATT_ENABLED and MESH_FEATURE_GATT_PROXY_ENABLED are by default defined to 1 so I'll be able to provision and configure all the nodes using nRF Mesh Android application right?

    In the previous replies you said that 

    Note that you would also probably want to configure the nodes. For that, from a smartphone, you need at least one node in the network that the smartphone can connect to over the GATT bearer.

    Why you said at least one node? Don't I need all the nodes to be configured using the android application, for that all of the nodes should support GATT proxy, right? 

    Also, I understand that during provisioning and configuration, the nodes gets assigned a unicast address, publication and subscription address, and keys. So as this provisioning process happens after the device is programmed, how do I control the address that nodes send message to? For example consider access_model_reliable_publish() used in the client model, does this API publishes to the address that is assigned during configuration as publication address? 


Related