i have to advertise Lis3dh data. I have accelerometer and nrf52840 dk. Pls assist how can i advertise the data of lis3dh xyz values
i have to advertise Lis3dh data. I have accelerometer and nrf52840 dk. Pls assist how can i advertise the data of lis3dh xyz values
Hi,
I would suggest you take a look at Beacon Transmitter Sample Application or Direction finding connectionless beacon on how to advertise with data, and search for similar use cases on Davzone.
-Amanda H.
hi,
i know about the Beacon example and know about the advertising. But now i want to advertise the data of lis3dh accelerometer. pls assist me with some code that i can implement
Hello,
thanku for assistance
i am able to receive the data of lis3dh in manufacturer data field. My issue is that i am receiving data in HEX format values. I want to view it in form of float. how to view?
Gentle Reminder
Also, i want that my advertisement of lis3dh data to be indfinite duration. I am trying to change
APP_ADV_DURATION to 0
and BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
but still my adverting gets stopped and no change is viewd kindly help
You may do so by starting advertising following the BLE_ADV_EVT_IDLE event that is generated when the advertising module moves to idle.
Please see this ticket answer by my colleague.
The tool cannot be adjusted to present the float format in the manufacturer data field.
-Amanda
Hi,
Max. advertisement time with the BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE flag is 180 seconds, see BLE_GAP_ADV_TIMEOUT_LIMITED_MAX .
Do you get BLE_ADV_EVT_IDLE event after APP_ADV_DURATION is been expired? If so, start advertising following the BLE_ADV_EVT_IDLE event.
-Amanda
Hi,
Max. advertisement time with the BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE flag is 180 seconds, see BLE_GAP_ADV_TIMEOUT_LIMITED_MAX .
Do you get BLE_ADV_EVT_IDLE event after APP_ADV_DURATION is been expired? If so, start advertising following the BLE_ADV_EVT_IDLE event.
-Amanda
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
Hi,
Changing to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE and setting APP_ADV_DURATION to 0 should advertise unlimitedly. You need to debug or check the debug log to see why BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE causes to stop advertising.
If you use BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE, you can start advertising in the BLE_ADV_EVT_IDLE event.
I will be out of the office for the next few days and back next Monday. If you still have the issue, please create a new support case. Sorry for the inconvenience.
Regards,
Amand
thankyou it is working now
Happy to know it works.
-Amanda H.
Hello, can u assist me with a code where i can send lis3dh data in ibeacon frame format advertising