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

Questions about nRF8001 dynamic data

Hello, I am writing a fairly complex application using the Arduino SDK and an nRF8001. I have a lot of what I want to do working based on looking at the code in the different demos. But I have some questions about how the dynamic data in the nRF8001 works. I'm sort of combining the UART and proximity code with a custom service to get the functionality I want.

The communication has to be secure so I have security and encryption enabled. I bond with the remote device and save/restore the dynamic data to preserve bonding data which I store in FLASH across resets. And I have to support the concept of a "discovery mode" where I try bonding with a new host device or go back to the old one if no new device connects and bonds right.

My question is about how things like putting the radio to sleep and resetting it affect the dynamic data. Also, I notice the Nordic examples set up the HW version "device information" but wait until after a connection has been established. I need to set up a number of the device information characteristics beyond just HW version for identification purposes.

So, the questions are:

  • Can I set values into the "server database" the radio maintains before a connection happens? Things like device information or battery level. Can I write that data as soon as I come out of standby using lib_aci_set_local_data()?
  • Does restoring dynamic data wipe out any server data that has been stored already? I'm thinking yes.
  • Does putting the radio to sleep and waking it back up require restoring dynamic data and setting back up server data? I'm thinking no.
  • Does resetting the radio require restoring dynamic data and setting back up server data? I'm thinking yes.
  • Does server data go away when you disconnect and have to be restored on a new connection? I'm thinking no.

I'm finding the nRF8001 a nice radio to use compared to others I have used in the past. With a few answers to the questions above I think I can make it do everything we need.

  • Hi Fred,

    @Can I set values into the "server database" the radio maintains before a connection happens?

    Yes.

    @Can I write that data as soon as I come out of standby using lib_aci_set_local_data()?

    Yes.

    @Does restoring dynamic data wipe out any server data that has been stored already? I'm thinking yes.

    Yes.

    @Does putting the radio to sleep and waking it back up require restoring dynamic data and setting back up server data? I'm thinking no.

    No.

    @Does resetting the radio require restoring dynamic data and setting back up server data? I'm thinking yes.

    No. If you are issuing doing a Radio Reset using lib_aci_radio_reset, then you do NOT need to setup the server data again (See Section 24.12.1 of the nRF8001 Product Specification). Only a power cycle of nRF8001 chip will result in the loss of dynamic data (See Section 22, of the nRF8001 Product Specification)

    @Does server data go away when you disconnect and have to be restored on a new connection? I'm thinking no.

    No.

    Hope this helps.

    Cheers, Balaji

  • Balaji, Right on! Thanks for the info! Off to finish my coding now.

Related