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

Subscribe the mesh app to model status updates

Is it possible to subscribe the mesh app (ios and android) for status updates of generic models?

Thank you

Parents
  • Hello,

    No, unfortunately. The nRF Mesh app can only set the subscription and publication addresses to the nodes, and not subscribe itself or publish anything on it's own. It is however possible, but it would require some changes. You can find links to the source code here: 

    https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Mesh/GetStarted

    The provisioner (phone/app) has all the keys necessary to both send and listen to mesh packets, so it should be doable. Exactly how though, I am not sure. 

    EDIT:

    I just remembered that the nRF Mesh app doesn't actually "speak Mesh". It uses BLE to configure the devices, and the devices "speak Mesh" between each other.

    Mesh is basically advertising packets, so it may be possible to both send packets and listen to packets, but it is not as trivial as I first imagined.

    The simple answer that this is not possible. The complicated answer, and maybe the answer you want to hear is that it may be, but it would require a reasonable amount of work. Not trivial.

    Best regards,

    Edvin

Reply
  • Hello,

    No, unfortunately. The nRF Mesh app can only set the subscription and publication addresses to the nodes, and not subscribe itself or publish anything on it's own. It is however possible, but it would require some changes. You can find links to the source code here: 

    https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Mesh/GetStarted

    The provisioner (phone/app) has all the keys necessary to both send and listen to mesh packets, so it should be doable. Exactly how though, I am not sure. 

    EDIT:

    I just remembered that the nRF Mesh app doesn't actually "speak Mesh". It uses BLE to configure the devices, and the devices "speak Mesh" between each other.

    Mesh is basically advertising packets, so it may be possible to both send packets and listen to packets, but it is not as trivial as I first imagined.

    The simple answer that this is not possible. The complicated answer, and maybe the answer you want to hear is that it may be, but it would require a reasonable amount of work. Not trivial.

    Best regards,

    Edvin

Children
  • Hi Edvin,

    I'm going to better explain what I need.

    I'm working on a mesh app based on your sample nrf mesh app to be used to provision and control mesh nodes.

    What I need is to keep the app GUI sync-ed with the mesh nodes state.

    The generic onoff servers are configured to publish avery state change to a group address C666.

    If I could subscribe the app to C666 I should be able to get the state changes in real time, when the app is running obviously.

    Any suggestion on how to accomplish that?

  • Hello,

    The issue is that even though you listen for advertisement packets, depending on the operating system, you may not be able to scan with the radio 100% of the time, so you can't guarantee that you get the mesh message that you are looking for. Instead, I suggest that you add a BLE service (in addition to your proxy service) that you can use to send the updated state to the phone that is connected. 

    If you are interested, there is an example in the Mesh SDK called ble_app_uart_coexist, which is a mesh light switch client, in addition to the Nordic UART over BLE service, which you can use to send data back and forth over BLE.

    To see how to use it, check out this guide:

    https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Mesh_SDK/v3-1-0/md_examples_sdk_coexist_ble_app_uart_coexist_README

    Best regards,

    Edvin

Related