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

Coexistence examples: SDK UART coexistence example

Greetings...

Please help me understand why PB-GATT support is removed from SDK UART coexistence example?

The dilemma I am facing is as follows:

1. No PB-GATT for SDK UART coexistence example;

2. Mesh LPN supports only PB-GATT;

How can I solve this problem such that I can have a Mesh Network which supports LPN nodes provisioning?

Thank you!

M.

Parents
  • Hello,

    It is correct. The SDK coexistance uart example doesn't support PB-GATT out of the box, but it is possible to add it. Just look at how it is done in the light switch client or server examples.

    Best regards,

    Edvin

  • Hello Edvin,

    Thanks for the response. I was able to build, however, I got this error below:

    <info> app: Debug logging for UART over RTT started.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at ......\nRF5SDK.15.3.0\nrf5SDKforMeshv320src/examples/common/src/mesh_adv.c:147
    PC at: 0x0005C62D
    <error> app: End of error report

    What does it mean?

    1. I am out of memory?

    2. I have not allocated memory?

    3. How do I work around it?

    Thanks.

    M.

  • Try to increase NRF_SDH_BLE_VS_UUID_COUNT in sdk_config.h

    What SDK version are you using, and what is the function that returned err_code = 4 that was passed onto APP_ERROR_CHECK(err_code) before line 147 in mesh_adv.c. Was it sd_ble_gap_adv_set_configure()?

    If so, it says on line 1802 in ble_gap.h (the description of sd_ble_gap_adv_set_configure() ):

    * @retval ::NRF_ERROR_NO_MEM                          Not enough memory to configure a new advertising handle. Update an existing advertising handle instead.

    How are you including the PG-GATT service? Do you add a new advertising set, or just add the service?

  • Hi Edvin,

    What you said above is true. Below is the call stack trace for your reference:

    As for your question: "How are you including the PG-GATT service? Do you add a new advertising set, or just add the service?"

    It is beyond my ability to answer for now since I just started working  with nRF for about couple weeks. But I am sure you may figure it out from the call stack above. My guess is that the code is trying to add the service to an existing advertising set, since we do have an advertising set to support the standard PB-ADV already in the coexistence example.

    If "Not enough memory to configure a new advertising handle", will it make more difficult to create a new advertising set?

    I tried increase NRF_SDH_BLE_VS_UUID_COUNT = 4, it gave me the same error.

    Was this an educated guess? Please feel free to correct me...

    I appreciate your help!

    M.

  • Hello,

    You can take a look at this site:

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v3.2.0%2Fmd_doc_getting_started_gatt_proxy.html&cp=5_2_1_5_1

    But it may be easier to add the NUS service to any of the other examples than adding the provisioning service to the coexistence example. 

     

    Min said:
    It is beyond my ability to answer for now since I just started working  with nRF for about couple weeks. But I am sure you may figure it out from the call stack above.

     Unfortunately I can't tell what's going on from the callstack. If you .zip the project folder, that would make it easier to see.

    Best regards,

    Edvin

  • Hi Edvin,

    Thanks for the response and I agree with you. I will wait for the future Nordic Mesh release on this one...

    I was able to add uart to the server code in light_switch example under Mesh 3.2.0 + SDK 15.3.0 release.

    It received data from UART fine, however, all the printf calls go directly to SES Debug Terminal instead of an UART terminal as you can see as follows:

    <t: 0>, main.c, 439, ----- BLE Mesh Light Switch Server Demo -----
    <t: 13022>, main.c, 357, Initializing and adding models
    <t: 13025>, main.c, 252, App OnOff Model Handle: 2
    <t: 17898>, mesh_app_utils.c, 65, Device UUID (raw): C3D12D8D4134B54C8DDF96A0D164F5B8
    <t: 17901>, mesh_app_utils.c, 70, Device UUID : 8D2DD1C3-3441-4CB5-8DDF-96A0D164F5B8
    data received from uart: ttttt

    data received from uart: eeeee

    data received from uart: sssss

    data received from uart: ttttt

    .....

    I am totally lost as why this happens. Will you be able to shed some light on this?

    How do we direct printf calls to uart instead of SES debug terminal in Mesh server code?

    Thanks!

    M.

Reply
  • Hi Edvin,

    Thanks for the response and I agree with you. I will wait for the future Nordic Mesh release on this one...

    I was able to add uart to the server code in light_switch example under Mesh 3.2.0 + SDK 15.3.0 release.

    It received data from UART fine, however, all the printf calls go directly to SES Debug Terminal instead of an UART terminal as you can see as follows:

    <t: 0>, main.c, 439, ----- BLE Mesh Light Switch Server Demo -----
    <t: 13022>, main.c, 357, Initializing and adding models
    <t: 13025>, main.c, 252, App OnOff Model Handle: 2
    <t: 17898>, mesh_app_utils.c, 65, Device UUID (raw): C3D12D8D4134B54C8DDF96A0D164F5B8
    <t: 17901>, mesh_app_utils.c, 70, Device UUID : 8D2DD1C3-3441-4CB5-8DDF-96A0D164F5B8
    data received from uart: ttttt

    data received from uart: eeeee

    data received from uart: sssss

    data received from uart: ttttt

    .....

    I am totally lost as why this happens. Will you be able to shed some light on this?

    How do we direct printf calls to uart instead of SES debug terminal in Mesh server code?

    Thanks!

    M.

Children
Related