Bluetooth mesh configuration failure (light switch client + light switch server + provisioner + ble_ant_app_hrm + ble_app_uart_coexist)

Hi Elfving,

the previous ticket find under the following link is locked. So I decided to start a new one.

https://devzone.nordicsemi.com/f/nordic-q-a/80063/bluetooth-mesh-configuration-failure

and my last answer is:

Thank you for your reply, I've try increace the CONFIG_RETRANSMIT_COUNT_MAX (/models/foundation/config/include/config_messages.h), but it still fail ocasionally..

To simplify this issue, I restart from downloading the SDK, and migrate example projects again.

Version (Migration):
PC: ubunrtu 16.04
board: nrf52832
nRF5 SDK version: nRF5_SDK_17.1.0_ddde560
nRF5 SDK for Mesh version: v5.0.0
softdevice: S332
toolchain: armgcc

The steps of example projects migration:
[ ble_ant_app_hrm + sdk_coexist(light switch client) ] ===> clients (migration ver.)
step 1. mesh SDK merge into nRF SDK
step 2. /examples/sdk_coexist/ble_app_uart_coexist/pca10040/s132/config/sdk_config.h merge into /examples/multiprotocol/ble_ant_app_hrm/pca10040/s332/config/sdk_config.h
step 3. nrf_mesh.h and hal.c add "definedS332"
step 4. combain main.c of ble_ant_app_hrm + sdk_coexist
step 5. makefile add relative .c .h CFLAGS
step 6. create a folder "include", put /examples/sdk_coexist/ble_app_uart_coexist/nrf_mesh_config_app.h into it
step 7. put /examples/sdk_coexist/ble_app_uart_coexist/mesh_main.h and /examples/sdk_coexist/ble_app_uart_coexist/mesh_main.c into project folder
step 8. nrf_mesh_config_app.h add #define GENERIC_DTT_SERVER_INSTANCES_MAX (1), #define GENERIC_ONOFF_SERVER_INSTANCES_MAX (1) and #define SCENE_SETUP_SERVER_INSTANCES_MAX (0)
step 9. put /examples/light_switch/server/include/app_config.h into "include" folder of project
step 10. #define APP_TIMER_CONFIG_RTC_FREQUENCY 0, #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 69 (in sdk_config.h)
step 11. #define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 2400, #define NRF_SDH_BLE_VS_UUID_COUNT 1 (in sdk_config.h)
step 12. RAM (rwx):ORIGIN=0x20002968, LENGTH=0xD698 (in ble_ant_hrm_gcc_nrf52.ld)
step 13. add .nrf_mesh_ram and .nrf_mesh_flash (in ble_ant_hrm_gcc_nrf52.ld)
step 14. #define ACCESS_ELEMENT_COUNT (2) (in nrf_mesh_config_app.h)
step 15. coment out ANT+ channel open (in main.c)

[ ble_ant_app_hrm + sdk_coexist(light switch client) + light switch server ] ===> server (migration ver.)
step 1. base on clients (migration ver.), replace the content of mesh_main.c to the content of /examples/light_switch/server/main.c
step 2. delete useless funtion and change function name which depands on mesh_main.h (mesh_main.c)

[ ble_ant_app_hrm + sdk_coexist(light switch client) + provisioner ]
step 1. put /examples/provisioner/src/node_setup.c and /examples/provisioner/src/provisioner_helper.c into project folder
step 2. put all file in /examples/provisioner/include into "include folder of project folder, except app_config.h and nrf_mesh_config_app.h
step 3. #define MODEL_ACKNOWLEDGED_TRANSACTION_TIMEOUT (SEC_TO_US(10)), #define ACCESS_DEFAULT_TTL (MAX_PROVISIONEE_NUMBER > NRF_MESH_TTL_MAX ? NRF_MESH_TTL_MAX : MAX_PROVISIONEE_NUMBER) (nrf_mesh_config_app.h)
step 4. #define ACCESS_MODEL_COUNT(4) (nrf_mesh_config_app.h)
step 5. #define CONFIG_SCENARIO_COMMON delete NODE_SETUP_CONFIG_APPKEY_BIND_HEALTH and NODE_SETUP_CONFIG_PUBLICATION_HEALTH (config_scenarios.h)
step 6. #define CONFIG_SCENARIO_COMMON delete NODE_SETUP_CONFIG_APPKEY_BIND_HEALTH and NODE_SETUP_CONFIG_PUBLICATION_HEALTH (config_scenarios.h)
step 7. #define CONFIG_SCENARIO_LIGHT_SWITCH_CLIENT_EXAMPLE delete the second CONFIG_ONOFF_CLIENT (config_scenarios.h)
step 8. #define CONFIG_SCENARIO_LIGHT_SWITCH_SERVER_EXAMPLE delete the second CONFIG_ONOFF_SERVER (config_scenarios.h)
step 9. #define APP_TIMER_KEEPS_RTC_ACTIVE 1 (in sdk_config.h)
step 10. makefile add relative .c
step 11. /examples/provisioner/src/main.c merge into mesh_main.c
step 12. #define DSM_SUBNET_MAX(20), #define DSM_APP_MAX(35), #define DSM_DEVICE_MAX(35), #define DSM_VIRTUAL_ADDR_MAX(15), #define DSM_NONVIRTUAL_ADDR_MAX(15) (nrf_mesh_config_app.h)

[ ble_ant_app_hrm + sdk_coexist(light switch client) + provisioner(light switch client self provision) ] ===> Provisioner/Client (migration ver.)
step 1. in struct network_dsm_handles_data_volatile_t, replace health instance to generic_onoff_client_t client_instance (network_setup_types.h)
step 2. app_default_models_bind_setup() add publish and subscription setting of light switch client (mesh_main.c)
step 3. models_init_cb() add calback function setting of light switch client (mesh_main.c)
step 4. mesh_main_button_event_handler() add message publish function of light switch client (mesh_main.c)
step 5. coment out all normal BLE service (main.c)

When use the Provisioner/Client (migration ver.) to provision and configure two devices, these situations would happen:
(1)provision and configure two servers (migration ver.), configuration data transmition retry many times ===> might okay, but the process of the second server take time and fail ocasionally
(2)after the second server (migration ver.) had provisioned and configured, the second server (migration ver.) delete provision and configuration and Provisioner/Client (migration ver.) immediately ===> might okay, and the process of provision and configuration will implement smoothly but fail ocasionally
(3)provision and configure two clients (migration ver.) ===> totally ok, even the second client would be provisioned and configured smoothly
(4)provision and configure two servers (migration ver.), and trun the first server off ===> totally ok

And I also use the Provisioner/Client (migration ver.) to provision and configure the light switch example form Mesh SDK
Version (light switch example form Mesh SDK):
PC: ubunrtu 20.04
board: nrf52832
nRF5 SDK version: nRF5_SDK_17.0.2_d674dde
nRF5 SDK for Mesh version: v5.0.0
softdevice: S332
toolchain: armgcc

(5)provision and configure two servers (example form Mesh SDK ver.) ===> totally ok, even the second server would be provisioned and configured smoothly

So, it seems like provisioner/client is work normally, but the server(migration ver.) have some unknow issue.
Are there any configurations I didn't set? or do you have any suggestions for me to try?

The archive file below is my Client (migration ver.), server (migration ver.), Provisioner/Client (migration ver.) project, hope it helps!

4643.nordic_devzone_mesh_bluetooth_mesh_configuration_failure.zip

Regards,
Erin

  • Hey Erin!

    Yes it seems that an answer was verified in the previous post, which locks it (so that we don't get several new questions on old posts that we don't monitor any longer).

    I'll see if I can unlock the thread. It would be better if we could communicate there in order for everything to be consistent and in one place.

    Best regards,

    Elfving

Related