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

Show Subscription and Publishing addresses list for a mesh node using Mesh SDK 3.1.0

Dear dev community,

I've got a very simple question: How can I see the subscription and publishing addresses list in any mesh node for any model?

Thank you!

Regards,

//EA

Parents Reply Children
  • Received a reply from the Android nRF Mesh developer: "I’m assuming that he is talking about nRF Mesh for Android. Yes currently the app only shows what the current configuration is this is because another user may have changed certain configuration. There are two ways, the user can look at the existing configuration on each model to know who’s subscribing/publishing to what or send some extra configuration messages such as ConfigModelPublicationGet,  ConfigModelSubscriptionSet to the desired nodes to find this out. If the configuration is already known i’d just iterate through each node/element/model in the network to find out who’s publishing/subscribe to who."

  • Hi Bjorn. Thanks for replying. I apologize for not replying earlier, I was in vacations and arrived today back to office.
    I appreciate your reply. But my question was different. Perhaps I wasn't clear enough. My question is:

    How can I show the subscription and publishing addresses within the mesh node FIRMWARE (such that I could share that date via UART or RTT or any other data-link/ flash storage). 

    I just need to know can I expose these lists from the DSM or any other mesh protocol-stack layer where that information is kept...

    Thank you very much!

    Regards,

    //EA

  • Hi EA, 

    Bjørn is on vacation so I will take over the case. 

    Actually what Bjørn suggested is relevant. You can use CONFIG_OPCODE_MODEL_PUBLICATION_GET opcode to get the current publication configuration of the model via the config server. 

    In your case you want to get the publication address locally, you can actually follow what we have inside send_publication_status() (called by handle_config_model_publication_get() ) in config_server.c to know how to get the value out. 

    Basically you would need to get the publish address handler of the model, and then from that find the actual address in dsm database, using dsm_address_get(). You can find other publication configuration inside send_publication_status() code as well. 

Related