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

Bluetooth mesh using prov bearer gatt and gatt proxy

Hello.

When I try to initialize provisioning bearer gatt with turned on the proxy, provisioning bearer is reconfigure the mesh_gatt which it will not work with proxy anymore.

mesh_gatt.c - initialisation function:

memcpy(&m_gatt.uuids, p_uuids, sizeof(mesh_gatt_uuids_t));
m_gatt.evt_handler = evt_handler;
...
NRF_MESH_ERROR_CHECK(sd_ble_gatts_characteristic_add(m_gatt.handles.service, &char_md, &attr_char_value, &m_gatt.handles.rx));
...
NRF_MESH_ERROR_CHECK(sd_ble_gatts_characteristic_add(m_gatt.handles.service, &char_md, &attr_char_value, &m_gatt.handles.tx));

m_gatt.p_context = p_context;

After the provisioning bearer initialization, the proxy char handles and event handler will be replaced.

What I am doing wrong? Do I need to init the provisioning bearer gatt if already have proxy?

Parents Reply Children
  • My application is based on the gatt proxy example. I tried to rewrite the example so that the provisioning began at the button press. After I moved the provisionee bearer initialization, that it inits when the application starts, the proxy stopped working.

    The function mesh_provisionee_prov_start in my application has only call nrf_mesh_prov_listen.

    The functions calls nrf_mesh_prov_generate_keys, nrf_mesh_prov_init, nrf_mesh_prov_bearer_gatt_init, nrf_mesh_prov_bearer_add moved to init function which I call at startup.

Related