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

Accelerometer data advertising

i have to advertise Lis3dh data. I have accelerometer and nrf52840 dk. Pls assist how can i advertise the data of lis3dh xyz values 

Parents Reply
  • when i have i have:

     BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE; 

    APP_ADV_DURATION to 18000 and 

    static void on_adv_evt(ble_adv_evt_t ble_adv_evt)

    { uint32_t err_code;

    switch (ble_adv_evt)

    { case BLE_ADV_EVT_FAST:

    err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);

    APP_ERROR_CHECK(err_code);

    break;

    case BLE_ADV_EVT_IDLE:

    sleep_mode_enter();

    break;

    default:

    break; } }

    my device advertises for 3 mins.

    BUT when 

    changed flags to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

    and APP_ADV_DURATION to 0 ; 

    case BLE_ADV_EVT_IDLE:

     err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST); APP_ERROR_CHECK(err_code);

    break;

    default:

    break;

    but this way the device stops advertising.

    What i need is that my device should advertise unlimitedly

    pls help

Children
Related