hello, Is there any examples to write beacon properties like uuid major and minor in flash memory when i edit the values from mobile app i want to advertise those values. in nrf52840 using sdk 14.1
hello, Is there any examples to write beacon properties like uuid major and minor in flash memory when i edit the values from mobile app i want to advertise those values. in nrf52840 using sdk 14.1
Hi,
It's not implemented. You need to implement your own application code to do so. You need to write code to handle the write command from the phone. And then write that value down into flash. Then write some code to check the value in the flash and if it's not 0xFFFF or the default one, you read the value and use it in your beacon advertising packet.
To learn how to write to flash have a look at the fds example here and the library documentation here.
If you don't want to retain the value after the device get reset then you don't need to write to flash.
If you want to update advertising packet, you simply set the new value using sd_ble_gap_adv_data_set(), you don't need to stop and start advertising. I assume you advertising at the same time as having a connection ?
If you don't want to retain the value after the device get reset then you don't need to write to flash.
If you want to update advertising packet, you simply set the new value using sd_ble_gap_adv_data_set(), you don't need to stop and start advertising. I assume you advertising at the same time as having a connection ?