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

How to use Bluetooth Mesh GATT provisioning with regular BLE stack?

I am running an example from Mesh SDK (v2.1.1) named "ble_app_uart_coesixt". I see device in Bluetooth list, everything is ok. But I need to provision this device using my smartphone without other devices. My goal is to provision device and than communicate with regular BLE uart profile. I can't understand how to combine "light_switch proxy_client" with coexist example. As I see it is just GATT service, and I don't need a "proxy" feature itself, only need to provision device with BLE. How can I do it?

Parents
  • Hi,

    You will need to use the proxy functionality to provision the device via the nrf mesh iOS/Android app. It might be easiest to try out the light switch proxy client & proxy server examples first & then add the uart functionality to those examples, like explained here. It could also be useful to take a look at this Youtube video on provisioning with the nrf mesh app.

    Kind Regards,

    Bjørn

  • I did this steps:

    1. Copy coexist example to sdk folder as written inside readme file
    2. Open this project (compiles and runs succesfully)
    3. Add proxy files (mesh_gatt.c, proxy.c, proxy_filter.c, nfv_mesh_prov_bearer_gatt.c, mesh_adv.c)
    4. Add preprocessor MESH_FEATURE_GATT=1 and GATT_PROXY=1
    5. Build (without errors or warnings), erase flash, start debug
    6. And than it just falls into breakpoint inside app_error_weak.c.

    Then I did this in file main.c:

    1. Comment all APP_TIMER_DEF() ... BLE_DB_DISCOVERY_DEF()
    2. Comment all BLE callbacks and local methods.
    3. Leave only log_init(), timers_init(), power_management_init(), ble_stack_init(), mesh_main_init(), mesh_main_start()
    4. It runs successfully and can be provisioned

    If I uncomment only gatt_init() with NRF_BLE_GATT_DEF(m_gatt) then it fall to breakpoint AFTER attempt to connect in nRF Mesh. If I uncomment only advertising_init() with BLE_ADVERTISING_DEF(m_advertising) then it falls as startup at breakpoint.

    I can't say where is problem, because softdevice can't use debug stepping. As I understand it conflicts with radio module or something. Can you provide an example for both GATT Proxy and BLE stack coexist?

Reply
  • I did this steps:

    1. Copy coexist example to sdk folder as written inside readme file
    2. Open this project (compiles and runs succesfully)
    3. Add proxy files (mesh_gatt.c, proxy.c, proxy_filter.c, nfv_mesh_prov_bearer_gatt.c, mesh_adv.c)
    4. Add preprocessor MESH_FEATURE_GATT=1 and GATT_PROXY=1
    5. Build (without errors or warnings), erase flash, start debug
    6. And than it just falls into breakpoint inside app_error_weak.c.

    Then I did this in file main.c:

    1. Comment all APP_TIMER_DEF() ... BLE_DB_DISCOVERY_DEF()
    2. Comment all BLE callbacks and local methods.
    3. Leave only log_init(), timers_init(), power_management_init(), ble_stack_init(), mesh_main_init(), mesh_main_start()
    4. It runs successfully and can be provisioned

    If I uncomment only gatt_init() with NRF_BLE_GATT_DEF(m_gatt) then it fall to breakpoint AFTER attempt to connect in nRF Mesh. If I uncomment only advertising_init() with BLE_ADVERTISING_DEF(m_advertising) then it falls as startup at breakpoint.

    I can't say where is problem, because softdevice can't use debug stepping. As I understand it conflicts with radio module or something. Can you provide an example for both GATT Proxy and BLE stack coexist?

Children
No Data
Related