2018-10-13 01:17 AM
Hi,
In my application I put the BlueNRG-1 unit into deepsleep with NO_Timer activated and it can only be awoken by IO12. When the unit is awaken by IO12 I check the wakesource and I confirm it was IO12 that has awaken the chip. Right after this I need to do a BLE scan by using the following instruction
result = aci_gap_start_general_discovery_proc(625, 625, PUBLIC_ADDR, 0x01);
The result code returned is 0x46 which indicates
/**
* @brief The requested operation cannot be performed by the Host in the current status.
*/
#define BLE_STATUS_NOT_ALLOWED ((tBleStatus)(0x46))
I am not sure why it is not allowed ?
The strange this is that this only happens when the unit has been awaken from DeepSleep. If I run the system normal I don't get this error
AND
When my program runs the first time I do a scan as indicated above and it works 100% and then I go into a Deepsleep awaiting to be awoken by IO12.
What am I missing?
What do I need to do when I have been awoken from sleep?
Please help as I have sitting with this problem for sometime now.
Solved! Go to Solution.
2018-10-14 10:53 AM
Okay, I have found my problem. :astonished_face:
When I am woken from sleep I first need to run the BTLE_StackTick(); before I execute my usertick().
2018-10-14 10:53 AM
Okay, I have found my problem. :astonished_face:
When I am woken from sleep I first need to run the BTLE_StackTick(); before I execute my usertick().