This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF5 SDK for Mesh: How to change the proxy models advertising data during operation?

Dear Nordic Experts,

A few short questions about mesh advertising in regard to Softdevice s132, 7.3.0, Mesh SDK 5.0.0 and nRF5 SDK 17.0.2:

  1. How do you change the advertised name of a mesh node during operation - the name broadcasted by the proxy model?
  2. Is the vendor id, device id and firmware version already part of the proxy models advertising data? If not, how do you add it to the proxy models advertising data?

Any clarifications are welcome,
Thank you,
Michael.

Parents
  • Hello Mike,

    I will have to get back to you on this.

    Regards,

    Elfving

  • Hi Elfving,

    Thanks for your help with this! Any updates on it?

    Michael.

  • Hello again, sorry about the wait. 

    How do you change the advertised name of a mesh node during operation - the name broadcasted by the proxy model?

    You can see the node name defined as GAP_DEVICE_NAME in nrf_mesh_config_app.h, but changing it programmatically can be a bit more work. You would have to use the function sd_ble_gap_device_name_set() that you can see in ble_softdevice_support.c and then adv_data_node_id_set() from proxy.c. adv_data_node_id_set is also a static function, so definitely have to modify several parts of the code. There are unfortunately no straight forward API or way to do this, but it should be possible.

    Is the vendor id, device id and firmware version already part of the proxy models advertising data? If not, how do you add it to the proxy models advertising data?

    In section 7.2 in the spec you can see that none of this is being advertised, and what is being advertised is required. You can add what you need to this however, as long as it doesn't end up being longer than 32bytes.

     

    Regards,

    Elfving

Reply
  • Hello again, sorry about the wait. 

    How do you change the advertised name of a mesh node during operation - the name broadcasted by the proxy model?

    You can see the node name defined as GAP_DEVICE_NAME in nrf_mesh_config_app.h, but changing it programmatically can be a bit more work. You would have to use the function sd_ble_gap_device_name_set() that you can see in ble_softdevice_support.c and then adv_data_node_id_set() from proxy.c. adv_data_node_id_set is also a static function, so definitely have to modify several parts of the code. There are unfortunately no straight forward API or way to do this, but it should be possible.

    Is the vendor id, device id and firmware version already part of the proxy models advertising data? If not, how do you add it to the proxy models advertising data?

    In section 7.2 in the spec you can see that none of this is being advertised, and what is being advertised is required. You can add what you need to this however, as long as it doesn't end up being longer than 32bytes.

     

    Regards,

    Elfving

Children
  • Hi Elfving,

    thanks for the clarification. Do you have any ideas what causes sd_ble_gap_device_name_set() to return error code NRF_ERROR_INTERNAL (3)? The error isn't mentioned at the docs, making it a little difficult to figure out what's wrong...

    The firmware is based on the generic level example from the Mesh sdk (5.0.0), running with Softdevice s132 7.3.0 and nRF SDK 17.0.2.

    Thank you,
    Michael.

  • Hello,

    BlueMike said:
    d_ble_gap_device_name_set() to return error code NRF_ERROR_INTERNAL (3)?

    That means the allocated length for the device name is too short. You can configure this yourself using ble_gap_cfg_device_name_t. I can imagine the naming being a bit confusing, we were planning on replacing it with NRF_ERROR_DATA_SIZE.

    Regards,

    Elfving

  • Hi Elfving,

    thank you very much for the clarification!

    Michael.

Related