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

BLE MESH stack 3.0 - message send on timer issue

Hi,

i'm using BLE MESH 3.0 Light Switch Example code. i want to send Light on-Off  command every 2 second Timer base instead of Button press.

i got an error below.

Parents
  • Hello Bjorn Kvaale

    Thanks But i'm using BLE MESH SDK 3.0 .I want to send Light On/Off Command evrny 10Second.

    If i print String every 10 second and command send on Button pressed it's working well . but i send command every 10 second code is stuck.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    APP_TIMER_DEF(m_temp_timer);
    uint8_t sec_2 =0;
    static void temp_handler(void * p_context)
    {
    UNUSED_VARIABLE(p_context);
    sec_2=1;
    }
    static void msg_send_to_server(void)
    {
    uint32_t status = NRF_SUCCESS;
    generic_onoff_set_params_t set_params;
    model_transition_t transition_params;
    static uint8_t tid = 0;
    set_params.on_off[0] = APP_STATE_ON;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Got an above Error. Please reply me ASAP.

    Thanks,

    Nikunj

  • Hi Nikunj,

    First off, you should figure out why the app error weak is called. Which error check is leading to this app_error_weak call? 

    It seems you have successfully initialized the softdevice before you intialized the mesh stack (see documentation).

    Have you taken a look at the example I provided in my first comment? Have you tried just updating that example from mesh sdk v2.1.1 to mesh sdk v3? Or just taking the standard light switch server example in mesh sdk v3 & adding the code that Simon added (i.e. timeout_config() function & adding app_timer_init() to the initialize function)?

  • Hi Nikunj,

    If you are still having trouble with this case, could you please post an updated comment? I will take a look at it then.

  • Hi I am having the same issue. Could you please let me know how you figure this out?

Reply Children