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

Coexist Mesh SDK 2.1.1 + nrf SDK 15 ble_app_uart ,the GATT open mesh does not work

Nordic Team,

sdk:mesh sdk 2.1.1 + nRF5_SDK_15.0.0

Reference ble_app_uart_coexist example. Coexistence provisioner + ble_app_uart

Initialize:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define APP_ADV_INTERVAL 800
int main(void)
{
bool erase_bonds;
uart_init();
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
// Start execution.
printf("\r\nUART started.\r\n");
NRF_LOG_INFO("Debug logging for UART over RTT started.");
mesh_main_init();
advertising_start();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

the provisioner cannot scan server

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
<t: 25>, mesh_main.c, 710, ----- BLE Mesh Light Switch Provisioner Demo -----
<t: 570>, mesh_main.c, 639, Initializing and adding models
<t: 588>, mesh_main.c, 692, Setup defaults: Adding keys, addresses, and bindings
<t: 779>, provisioner_helper.c, 336, netkey_handle: 0
<t: 1223>, mesh_main.c, 739, <start>
<t: 1227>, mesh_main.c, 726, Starting application ...
<t: 1232>, mesh_main.c, 728, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
<t: 1238>, mesh_main.c, 729, Dev key : 46621EA8155AC9C7280F994AF21A8646
<t: 1243>, mesh_main.c, 730, Net key : 1114817C45766C32A04668DB65382055
<t: 1249>, mesh_main.c, 731, App key : 127CBE674B5E705399A12A8FECF0CCD3
<t: 1254>, mesh_main.c, 732, <t: 144514>, mesh_main.c, 500, Button 1 pressed
<t: 144518>, mesh_main.c, 404, Waiting for Server node to be provisioned ...
<t: 149627>, provisioner_helper.c, 288, Scanning For Unprovisioned Devices
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

comment out :

//advertising_start();

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<t: 24>, mesh_main.c, 710, ----- BLE Mesh Light Switch Provisioner Demo -----
<t: 601>, mesh_main.c, 639, Initializing and adding models
<t: 621>, mesh_main.c, 692, Setup defaults: Adding keys, addresses, and bindings
<t: 822>, provisioner_helper.c, 336, netkey_handle: 0
<t: 837>, mesh_main.c, 739, <start>
<t: 841>, mesh_main.c, 726, Starting application ...
<t: 846>, mesh_main.c, 728, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
<t: 852>, mesh_main.c, 729, Dev key : 1086CD369B9057BEE0243469DB9F18B6
<t: 857>, mesh_main.c, 730, Net key : EC20A1D51E999EF6EB2AF4BDABA0D564
<t: 862>, mesh_main.c, 731, App key : 5E2D01FFB1E78BDF8F71FE3109E3C7FE
<t: 61025>, mesh_main.c, 500, Button 1 pressed
<t: 61029>, mesh_main.c, 404, Waiting for Server node to be provisioned ...
<t: 66162>, provisioner_helper.c, 288, Scanning For Unprovisioned Devices
<t: 94880>, provisioner_helper.c, 145, UUID seen: 0059FFFF00000000C0F47E06363D6194
<t: 94886>, provisioner_helper.c, 97, UUID filter matched
<t: 95529>, provisioner_helper.c, 265, Provisioning link established
<t: 108107>, provisioner_helper.c, 260, Static authentication data provided
<t: 120448>, provisioner_helper.c, 192, Provisioning completed received
<t: 120453>, provisioner_helper.c, 197, Adding device address, and device keys
<t: 120460>, provisioner_helper.c, 220, Addr: 0x0100 addr_handle: 1 netkey_handle: 0 devkey_handle: 1
<t: 123955>, provisioner_helper.c, 156, Local provisioning link closed: prov_state: 2 remaining retries: 2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

In mesh sdk1.0.1 +sdk 14.2 no such problem.How do I change it?

  • when the gatt is connected, it cannot scan to the server.

    Fullscreen
    1
    2
    3
    4
    5
    6
    #define APP_ADV_INTERVAL 800 /**< The advertising interval (in units of 0.625 ms. This value corresponds to 500 ms). */
    #define APP_ADV_DURATION BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED /**< Disable advertising timeout. */
    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(200, UNIT_1_25_MS) /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Did you take a look at the readme located here: nrf5_SDK_for_Mesh_v2.1.1_src\examples\sdk_coexist\ble_app_uart_coexist? I noticed a few bugs in the sdk_coexist uart example that were reported internally. 

    How are you currently testing this example? Are you using the regular provisioner, the client ble_app_uart coexist example & a regular mesh light switch server example?

  • Hi Bjorn,

    thank you for your reply!

    provisioner example:“nrf5_SDK_for_Mesh_v2.1.1_src\examples\light_switch\provisioner”

    server example:“nrf5_SDK_for_Mesh_v2.1.1_src\examples\light_switch\server”

    ble_app_uart_coexist example: "nrf5_SDK_for_Mesh_v2.1.1_src\examples\sdk_coexist\ble_app_uart_coexist"

    Refer to the README.md file, the ble_app_uart_coexist example works fine

    Then refer to ble_app_uart_coexist example

    I want coexist the provisioner exapmle and ble_app_uart example in the nRF5_SDK_15.0.0

    start advertising, mesh can not scan to the server

    but stop advertising working fine

    GATT and MESH can't work together

    What other bugs have been discovered? I am going to develop products on this sdk.

     

  • Sorry for the delayed response. Yes, there have been a few issues with the coexist examples. I was not able to build the example when I tried the ble_app_uart_coexist example. This is something the mesh developers are looking into at the moment & which should work in the newest mesh sdk v2.2.0. Do you need to use mesh sdk v2.1.1 or can you wait until the v2.2.0 release?

    You could also add the uart functionality to a mesh example or add mesh to the ble_app_uart example by following the documentation posted here if you cannot wait for the next release.

  • When is next release, is there a major update?