4 posts / 0 new
Last post
Bharath
Offline
Last seen:1 year 5 months ago
加入:2016-04-14 07:03
Turning of BLE

Hi,
In our product once a command is received from a android phone we need to start writing data to the local SPI Flash turning off the BLE. And all the unused peripherals like BLE should be turned completely off so that it consumes least possible power. How can I achieve this? What all can I turn off? Data is collected from SPI interface.

Thank you
Bharath

Device:
MT_dialog
Offline
Last seen:3 months 16 hours ago
工作人员
加入:2015-06-08 34
Hi Bharath,

Hi Bharath,

The BLE will stay awake as long as it is needed, if there are pending BLE events the kernel will switch on the BLE core serve the pending events schedule the incoming events and then will switch off the BLE core. You dont have to do anything extra in order to turn off the radio and the BLE, the SDK takes a good care of that. You are going to have the 580 active in order to be able to operate the peripherals and the M0 whenever you would like to have SPI transactions.

Thanks MT_dialog

Bharath
Offline
Last seen:1 year 5 months ago
加入:2016-04-14 07:03
Hi MT_dialog,

Hi MT_dialog,
Sorry that I have not explained the requirement properly. I want to disconnect from Android app once I get some sort of command and also disable the advertising. So that there wont be any possibility to connect back to the BLE.

Thank you
Bharath

MT_dialog
Offline
Last seen:3 months 16 hours ago
工作人员
加入:2015-06-08 34
Hi Bharath,

Hi Bharath,

Then you should invoke the app_easy_gap_disconnect() function in order to disconnect from the phone device, when the disconnection occurs the .app_on_disconnect callback will be triggered and then in your custom function you can instruct the device what it is going to do next. In most of the examples the user_app_on_disconnect() function invokes the default_app_on_disconnect() which restarts advertising and thats why at those examples the advertising happens as soon as there is a disconnection.

Thanks MT_dialog