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

Recieve string and store it in the pstorage

I would like to change the device name of the nRF51422 trough a mobile device(Android AND iOS). The name should be stored even when I disconnect the supply.

From a nordic employee i know: iOS/Apple has blocked access to the GAP Service, where the device name is located.

I will have to add a function on my project to recieve Strings and store them in the pstorage.

How should the function for recieving strings look like? Are there examples?

Parents
  • Hi,

    To change the Adv Device name, i guess, you have to change the adv packet in case of nrf51422, (can be done runtime too, just have to call some set_adv api i believe)why i am not sure because you might be working on ANT.

    Now i think there should be some uart service or say stack stream outlet to push or seek data(serial data), so by having a serial service you can have that string data into your nrf51422. And then after carry out the pstorage store activity and try not putting any for loop delays anywhere, it may block cpu 100%, instead, trust on event based callback approach and always perform any calls in main context, set or unset any flags in callback block, And then perform further based on the state of those flags.

    Hope this make sense. And the above fits regarding nrf51822 with bluetooth softdevice. I am not sure about ANT, but may be analogues to BLE.

Reply
  • Hi,

    To change the Adv Device name, i guess, you have to change the adv packet in case of nrf51422, (can be done runtime too, just have to call some set_adv api i believe)why i am not sure because you might be working on ANT.

    Now i think there should be some uart service or say stack stream outlet to push or seek data(serial data), so by having a serial service you can have that string data into your nrf51422. And then after carry out the pstorage store activity and try not putting any for loop delays anywhere, it may block cpu 100%, instead, trust on event based callback approach and always perform any calls in main context, set or unset any flags in callback block, And then perform further based on the state of those flags.

    Hope this make sense. And the above fits regarding nrf51822 with bluetooth softdevice. I am not sure about ANT, but may be analogues to BLE.

Children
No Data
Related