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

Automatically shut down BLE communication (power_manage ();)?

Hi~ I used keil software environment for development. Apply Ble UART example code from nordic keil example. Example code down load to nRF51 Development Kit and run, program correct actuation in nRF51 Development Kit.

I used a smartphone and installation nRF ToolBox app from nordic. image description

Executive UART icon can receive wireless signals from the nRF51 Development Kit. Transfer string also correctly. image description

After power-on and never connector with smart phone, LED1 on nRF51 Development Kit is blink continue.

But never connector with any smart phone continue after a period of time (about several minutes), LED1 on nRF51 Development Kit is OFF, and can't Connect your smart phone. You must have the power-off and power-on again to re-connect with your smart phone.

I think it may automatically shut down is that right?

Trace example code can be found in the program has been executed power_manage() the while loop.

How can I change the example program without through a period of time after the phone can not connect.

Parents Reply
  • Thank you a lot. I traced the nordic example code and found a the key parameter #define APP_ADV_TIMEOUT_IN_SECONDS 180 . That set the ble options advertising timeout 180 seconds. Change the parameter also can change the time required to enter timeout. But I want to let system never enter timeout, set parameter is 0 let It does not seem advertise forever. set parameter is 0 will very quick enter timeout state.

Children
No Data
Related