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

Where to use lib_aci_set_local_data

Hello Nordic Team, i've get my things working and i figured out how i can set service data and to display it in nRF Master Control.

Now i want to CHANGE my service data every 5 seconds for example.

Till now, i've used lib_aci_set_local_data like it is set in BLE-Broadcast example (maybe you open this sketch and see) within part: case ACI_DEVICE_STANDBY:

I tried to use it outside the switch-case, but then i get "You're in a while(1) loop" with ACI D message.

As long as i set it within case ACI_DEVICE_STANDBY: it is working for the first set of data, but then never changes.

How and where do i have to set local data without getting this while(1) error?

Noone here to help?

Parents
  • Hi, I'm sorry for the late reply. Add this above the while (1); to print the status code: Serial.println(aci_evt->params.cmd_rsp.cmd_status, HEX); Anyway you could upload your code so I can see what you are doing when you call set_local_data? Are you calling it directly in the loop? And are you waiting for the command response event from the previous set_local_data before calling it again?

Reply
  • Hi, I'm sorry for the late reply. Add this above the while (1); to print the status code: Serial.println(aci_evt->params.cmd_rsp.cmd_status, HEX); Anyway you could upload your code so I can see what you are doing when you call set_local_data? Are you calling it directly in the loop? And are you waiting for the command response event from the previous set_local_data before calling it again?

Children
No Data
Related