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

Trying to enable mesh proxy service

(running a mesh 2.1 sdk)

I am provisioning my nodes over serial and do not need the GATT Provisioning service. I need to access the GATT Proxy service to send mesh data. How do I turn off the provisioning service and turn on the proxy service?

I have tried proxy_start();

proxy_start results in an assertion at mesh_adv.c line 162:        APP_ERROR_CHECK(sd_ble_gap_adv_start(m_adv_handle,  MESH_SOFTDEVICE_CONN_CFG_TAG));

I found somewhere that exiting provisioning mode could be done by calling gap_params_init() and conn_params_init() to reset the soft device. I have also tried sending the serial command to reset the radio. 

I do not know if it is related, but I have noticed that on  bootup, in mesh_stack.c, mesh_stack_start(void), there is a section to start the proxy. I have halted the processor there and seen that my provisioned device does not have a unicast address set, causing it not to be executed; yet if I let the processor run past that, the provisioning gets loaded from flash! Is that intentional?

Actually - I just realized that proxy_init(void) never gets called!

-------

I just tried to call proxy_init()... and now I have both provisioning and proxy services showing up on my phone (running nrf connect for android). I think they are conflicting with each other. How do I disable provisioning service?

Parents
  • Hi Michael, 

    It's recommended to use latest SDK for your development (current SDK is v3.0) 

    Could you explain in more detail what exactly you want to do ? 

    If you don't plan to have GATT provisioning service, please set MESH_FEATURE_PB_GATT_ENABLED = 0 

    In addition even if you have MESH_FEATURE_PB_GATT_ENABLED = 1 , when the device get provsioned, it will automatically reset the softdevice so that it will work as Proxy node only as brinehart mentioned. 

  • I discovered that when provisioning was loaded from flash, it the unicast address was set to 0. When I requested the unicast address over serial, it reported 0, so I thought it was unprogrammed and tried to set the unicast address. Since flash was already programmed, it did not save the new value, but the value in RAM was updated (which is where I thought there was a delayed load from flash). On the next powercycle, it loaded the 0 again, and did not start the proxy. I could fix this by clearing the flash data.

  • Yes, make sure before you test you erase the flash data. The flash manager module may mistakenly take the data of the previous firmware as the provisioning data. 

Reply Children
No Data
Related