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

nrf52 BLE/beacon with accelerometer data advertising

Hello,

DK: nrf52840

SDK: 15.0.0

i want to advertise accelerometer data with BLE/Beacon 

so i tried to update the adv. packet for every 10 sec but its not  advertising updated one its showing old data

for example i have updated like this for test purpose

int CUSTOM_SERVICE_UUID_BASE=1111;

***************************************************************

void accinc()
{
nrf_delay_ms(10000);
CUSTOM_SERVICE_UUID_BASE=CUSTOM_SERVICE_UUID_BASE+1111;
}

****************************************************************

int main(void)
{
bool erase_bonds;

// Initialize.
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
peer_manager_init();

// Start execution.
NRF_LOG_INFO("Template example started.");
application_timers_start();

advertising_start(erase_bonds);

// Enter main loop.
while(1)
{
accinc();

services_init();
advertising_init();
conn_params_init();
peer_manager_init();
}
}

plz suggest me the proper way of updating the adv. packet

Parents
  • Hello Vidar,

    Thank you so much for your response....
    i compiled and run the program which u have given, so here major values are updating..!!

    Now in my application i need to upload accelerometer and gyro meter data in UUID array...and need to update for every 1 sec.
    So is it possible to update UUID with same procedure which u have done with major value upgradation..??


    (instead of increment, Updating the sensor values to UUID array)

    Regards,

    Nagendra A Karmarkar.

Reply
  • Hello Vidar,

    Thank you so much for your response....
    i compiled and run the program which u have given, so here major values are updating..!!

    Now in my application i need to upload accelerometer and gyro meter data in UUID array...and need to update for every 1 sec.
    So is it possible to update UUID with same procedure which u have done with major value upgradation..??


    (instead of increment, Updating the sensor values to UUID array)

    Regards,

    Nagendra A Karmarkar.

Children
No Data
Related