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

How send message to all from peripheral to peripheral in the multiperipheral example?

I am trying to create a network mesh using the multiperipheral example.

In the original version the communication is possible only:

central >> peripherals peripferals >> central

Ans now I wanna sent som messages peripheral to peripheral.

For this I adapted the led_status_send_to_all method but I have a problem.

._build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_lbs_led_status_send (referred from main.o).

I already copy the ble_bs_c.c to BLE Services folder.

Is it possible to do what I am doing or are there other way to do it? How I can fix it?

Parents
  • I suspect that you have forgotten to enable the lbs service in sdk_config.h. Please add this to the file:

    // <q> BLE_LBS_C_ENABLED  - ble_lbs_c - Nordic LED Button Service Client
     
    
    #ifndef BLE_LBS_C_ENABLED
    #define BLE_LBS_C_ENABLED 0
    #endif
    

    That should hopefully solve the "undefined symbol" error.

    To send messages between peripherals you will have to implement some sort of relay mechanism in your central application. Just make the central forward all packets it receives from one peripheral to all the other peripherals.

Reply
  • I suspect that you have forgotten to enable the lbs service in sdk_config.h. Please add this to the file:

    // <q> BLE_LBS_C_ENABLED  - ble_lbs_c - Nordic LED Button Service Client
     
    
    #ifndef BLE_LBS_C_ENABLED
    #define BLE_LBS_C_ENABLED 0
    #endif
    

    That should hopefully solve the "undefined symbol" error.

    To send messages between peripherals you will have to implement some sort of relay mechanism in your central application. Just make the central forward all packets it receives from one peripheral to all the other peripherals.

Children
Related