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

mesh gatt and ble gatt

Hi. I have read the documentation and I have a couple of questions:

  1. What makes work different mesh_gatt and nrf_ble_gatt? Why can't they work together (maybe it's because of ATT_MTU, but I'm not sure).
  2. Why can I write and read a characteristic without function gatt_init in nrf5 sdk?
  3. how the characteristics created as in the BLE project in mesh will work? i created service and characteristics. they will communicate through the mesh gatt?
Parents Reply Children
  • I tried, in your example you removed advertising, now I don't understand

  • I removed it because when you enable PB-GATT, the advertising is handled inside a_listen_start() in nrf_mesh_prov_bearer_gatt.c 

    Please try to study the mesh stack and get to understand how it work this is needed if you want to customize it and make something differently. 

    What you need to know is how the advertising is handled before provisioning (handled by the prov_bearer_gatt and after provisioning it's inside proxy.c . 

    In the default coexist we don't have proxy and PB-GATT so that's why it's handled in main.c 

  • yes, I studied well about proxy and PB-GATT in documentation. but nowhere is it clearly written that advertising and proxy cannot work together. an example of coexistence, I just got confused. I would be grateful to receive information where you can find out how everything works in libraries. Or is it just to study the program myself?

  • Hi Blastka,
    I afraid you may need to study the code. The point is that to advertise with connectable advertising, the mesh stack would need to use the softdevice to advertise. It's because the mesh stack is not created to handle BLE connection. And the softdevice only allow one advertising set at a time. So you need to combine what you want to advertise with what the mesh stack advertise (either as PB-GATT or Proxy GATT). 
    So there are 2 options: 
    First option is to remove what mesh is advertising, and only advertise with your own code in advertising_init and advertising_start in main.c 
    Second option is to do what I suggested, integrate what you want to advertise into mesh proxy/provisioning advertising. 

    The draw back of option1 is that if you don't advertise with correct format of Mesh unprovisioned UUID and Mesh proxy service, the mesh app won't be able recognize the device as a mesh node/proxy. 

Related