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

How to turn off and on BLE functionality wirelessly using nRF UART/some other application without touching my deployed application?

Hello,

I want to hide the BLE(RF signals) completely soon after updating the configuration in my application and whenever I need to update the config I should be able to enable it and update the config wirelessly without touching the deployed application. Is it possible to turn off and on BLE functionality wirelessly using nRF UART/some other application? If yes, can you share the reference on HOW part?

TIA.

Regards,

Arya

  • It is possible to turn off and on BLE functionality, but how would you tell the application that it should turn on BLE functionality?

    Once you figure out that, I assume that by "hide the BLE" you mean stop advertising, right?

    You can of course scan instead of advertise, but please be aware that scanning consumes more power than advertising, so if this is a battery powered device, perhaps that is not what you are looking for.

    Best regards,

    Edvin

  • Hi Edvin,

    *Kindly confirm my understanding from above reply - so it is possible to turn off BLE functionality using nRF UART, but not possible to turn it ON again wirelessly as they will get unpaired when it goes off.

    Yes, the application is battery operated. Is it possible to stop and start advertisements using the nRF UART? I would like to know if the below two cases are possible to implement:

    a. When start message come, it should start advertising and start services and stop message come, disconnect(if it is connected) and stop advertising.

    b. When start message come, it should start advertising and start services and stop message come, stop advertising and and should not get disconnected, because I may need to start it again and I am assuming that it only be possible when it is connected with the nRF UART app.

    TIA.

    Best regards,

    Arya

  • When you write: "nRF UART" do you refer to the iOS/Android Mobile application?

    You can stop or start advertising using the nRF's UART (NB: not the same as the application nRF UART).

    You can stop and start the advertisements at any time from your application using sd_ble_gap_adv_start() and sd_ble_gap_adv_stop(). But you need to know when to do this. This is my concern. If you are not advertising, and not connected to anything, and you don't want to physically interact with the nRF, then how do you intend to tell the application that you want to start advertising?

    Another thing: Why do you need to "hide the BLE"? Is it an option to stay connected? When you are in a connection, the device is not visible for other mobile phones' bluetooth settings window.

    In fact, most devices are not visible in the bluetooth settings window. The OS will filter out most devices, and only list sound and HID devices. Do you see the device from the mobile phone's bluetooth settings at all? NB: Using a custom app, such as nRF UART or nRF Connect will list all advertising devices, so that behavior is different from the bluetooth settings page.

Related