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

Mesh-SDK v1.0.1: Light switch demo not working correctly

Hi,

I am trying to run the light switch example of the nRF5-SDK-for-Mesh-v1.0.1 on total 2 boards(1-client (own nrf52832 board) and 1-servers (dev kit nrf52832 with pca10040)). Only 1 server gets provisioned as expected.
On the client when I press the zero button on the rtt to make set simple_on_off_client_set...
The first time it goes well. From the first time the program gets stuck.
Whenever I restart the client, works the first time.
Can someone help with this problem?

Logs Client:

1st time:

<t:          0>, main.c,  441, ----- BLE Mesh Light Switch Client Demo -----  
<t:          0>, nrf_mesh_sdk.c,  187, Initializing softdevice  
<t:          0>, nrf_mesh_sdk.c,  122, Initializing SoftDevice...  
<t:          3>, nrf_mesh_sdk.c,  131, Ram base: 0x200031B0  
<t:         22>, nrf_mesh_sdk.c,  197, Initializing mesh stack  
<t:        582>, nrf_mesh_sdk.c,  205, Enabling mesh stack  
<t:        588>, main.c,  183, Setting up access layer and models - abcd  
<t:        593>, device_state_manager.c, 1522, <>Setting dsm_init  
<t:        600>, access.c,  595, <>Add flash manager success  
<t:       5498>, main.c,  257, <> provisioner_wait_for_unprov  
<t:     295853>, access.c,  320, <>MESH_EVENT_CB_CALLED  
<t:     295857>, access.c,  324, <>NRF_MESH_EVT_MESSAGE_RECEIVED  
<t:     295860>, access.c,  285, <>mesh_msg_handle  
<t:     295863>, access.c,  293, RX: [aop: 0x0004]  
<t:     295866>, access.c,  314, handle_incoming message  
<t:     295870>, main.c,  312, Node 0x0100 alive with 0 active fault(s), RSSI: -65  

2nd time:

<t:     447381>, main.c,  321, Button 0 pressed  
<t:     447384>, main.c,  340, simple_on_off_client_set  
<t:     447388>, simple_on_off_client.c,  191, <>before send_reliable_message  
<t:     447391>, access.c, 1030, <> before packet_tx  
<t:     447395>, transport.c, 1572, <> before upper_transport_tx  
<t:     447399>, transport.c, 1427, <> before unsegmented_packet_tx  
<t:     447402>, core_tx.c,   59, <> inside bearer_if_get  
<t:     447405>, core_tx.c,   61, <> after NRF_MESH_ASSERT is_power_of_two  
<t:     447409>, core_tx.c,   64, <> after NRF_MESH_ASSERT index < BEARER_COUNT  
<t:     447421>, core_tx.c,  105, <> before bearer_if_get  
<t:     447424>, core_tx.c,   59, <> inside bearer_if_get  
<t:     447435>, nrf_mesh_sdk.c,  112, Softdevice assert: 4097:205414:256  

Logs Server (Just receive events in first time):

1st time:

<t:          0>, main.c,  121, ----- BLE Mesh Light Switch Server Demo -----  
<t:        515>, core_tx.c,   59, <> inside bearer_if_get  
<t:        565>, device_state_manager.c, 1522, <>Setting dsm_init  
<t:        572>, access.c,  595, <>Add flash manager success  
<t:        578>, main.c,   85, Initializing and adding models  
<t:        645>, main.c,   95, Successfully provisioned  
<t:     468477>, access.c,  320, <>MESH_EVENT_CB_CALLED  
<t:     468480>, access.c,  324, <>NRF_MESH_EVT_MESSAGE_RECEIVED  
<t:     468483>, access.c,  285, <>mesh_msg_handle  
<t:     468486>, access.c,  293, RX: [aop: 0x00C1]  
<t:     468489>, access.c,  314, handle_incoming message    
<t:     468493>, main.c,  112, simple_on_off_server_t set  
<t:     468496>, main.c,  113, Got SET command to 0  
<t:     468500>, transport.c, 1572, <> before upper_transport_tx  
<t:     468504>, transport.c, 1427, <> before unsegmented_packet_tx  
<t:     468507>, core_tx.c,   59, <> inside bearer_if_get  
<t:     468526>, core_tx.c,  105, <> before bearer_if_get  
<t:     468529>, core_tx.c,   59, <> inside bearer_if_get 

2nd time: (nothing)

I already changed the client board with the server and it does not even work the first time i enter the number zero.

Client Logs:

<t:    4550381>, main.c,  321, Button 0 pressed  
<t:    4550384>, main.c,  340, simple_on_off_client_set  
<t:    4550388>, simple_on_off_client.c,  191, <>before send_reliable_message  
<t:    4550392>, access.c, 1030, <> before packet_tx  
<t:    4550395>, transport.c, 1572, <> before upper_transport_tx  
<t:    4550399>, transport.c, 1427, <> before unsegmented_packet_tx  
<t:    4550403>, core_tx.c,   59, <> inside bearer_if_get   
<t:    4550421>, core_tx.c,  105, <> before bearer_if_get  
<t:    4550425>, core_tx.c,   59, <> inside bearer_if_get  
<t:    4550436>, core_tx.c,  109, <> after bearer_if_get  
<t:    4550439>, network.c,  643, <> after core_tx_packet_send  
<t:    4550442>, access.c,  461, <t:    4558973>, access.c, 1030, <> before packet_tx  
<t:    4558977>, transport.c, 1572, <> before upper_transport_tx  
<t:    4558981>, transport.c, 1427, <> before unsegmented_packet_tx  
<t:    4558984>, core_tx.c,   59, <> inside bearer_if_get  
<t:    4559003>, core_tx.c,  105, <> before bearer_if_get  
<t:    4559006>, core_tx.c,   59, <> inside bearer_if_get  
<t:    4559017>, core_tx.c,  109, <> after bearer_if_get  
<t:    4559021>, network.c,  643, <> after core_tx_packet_send  
<t:    4559024>, access.c,  461, <>TX: [aop: 0x00C1]  

Server Logs:

<t:          0>, main.c,  121, ----- BLE Mesh Light Switch Server Demo -----  
<t:        519>, core_tx.c,   59, <> inside bearer_if_get  
<t:        569>, device_state_manager.c, 1522, <>Setting dsm_init  
<t:        576>, access.c,  595, <>Add flash manager success  
<t:        581>, main.c,   85, Initializing and adding models  
<t:        648>, main.c,   95, Successfully provisioned  
  • Have you taken a look at this infocenter link for testing the light switch example? Did you remember to set SERVER_COUNT (in light_switch_example_common.h) to the number of servers in your example (i.e. one server for your use case)? Also, I find it helps if you only have one device on at a time. By that I mean turning on the client device, compiling the client light switch example, erasing the client device & downloading the code onto the client device. Then, turn the client off & turn the server device on. Then, repeat the same process for the server (i.e. use server example instead). Finally, turn both devices on, connect to the devices in two separate RTT terminals & the example should work.

  • Also, what do you mean by your "own nrf52832 board"? I am unsure if a custom board will work for running the mesh sdk out of the box, as the infocenter link I sent in my last comment specifically says that you need to use a PCA10028 or PCA10040 for the client & a PCA10028, PCA10031, or PCA10040 for the server.

Related