Enable or disable the Bluetooth radio.


#include <btapi/btdevice.h>
int bt_ldev_set_power(const bool power_on)


BlackBerry 10.0.0



Set to a value of true to enable (turn on) the Bluetooth radio, false to disable (turn off) the Bluetooth radio.


libbtapi (For the qcc command, use the -l btapi option to link against this library)


Turns the Bluetooth radio controller on or off on the local device. In your event loop, you can monitor for the BT_EVT_RADIO_INIT event to confirm that the Bluetooth radio has been turned on and the BT_EVT_RADIO_SHUTDOWN event to confirm that the radio has been turned off. The return code for this function indicates that the function has been completed successfully and not that the Bluetooth radio controller has been turned on or off.


0 is returned upon success, -1 with the errno set otherwise. Any errno value other than the following indicates that a system error has occurred:
  • ENOMEM: There was insufficient memory to allocate required structures.
  • ENOENT: A required data entry was not found (internal error).
  • EAGAIN: The Bluetooth stack is already in the requested state.
  • EPERM: There was an error accessing required system data (internal error).

Last modified: 2014-05-14

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus