Is there some API for bt off?the wiced_bt_stack_shutdown seems not work so favorable?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_3563711
Level 2
Level 2
First like received First like given

HI everyone!

    I want to find a API to shut off the bt.But the current seems not work successfully,Is there somebody occured same issueS on BCM20206,I want to shutoff bt in root,not only close it's discoverability and connectability。mifo​@

THANKS!!!shjl

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Why do you want to shut off the BT. Maybe you use the following API to set the BT non-discoverable and un-connectable.

        /* Disable discoverability */

        wiced_bt_dev_set_discoverability( BTM_NON_DISCOVERABLE, BTM_DEFAULT_DISC_WINDOW, BTM_DEFAULT_DISC_INTERVAL );

        /* Disable connectability  */

        wiced_bt_dev_set_connectability( WICED_FALSE, BTM_DEFAULT_CONN_WINDOW, BTM_DEFAULT_CONN_INTERVAL );

View solution in original post

0 Likes
4 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Why do you want to shut off the BT. Maybe you use the following API to set the BT non-discoverable and un-connectable.

        /* Disable discoverability */

        wiced_bt_dev_set_discoverability( BTM_NON_DISCOVERABLE, BTM_DEFAULT_DISC_WINDOW, BTM_DEFAULT_DISC_INTERVAL );

        /* Disable connectability  */

        wiced_bt_dev_set_connectability( WICED_FALSE, BTM_DEFAULT_CONN_WINDOW, BTM_DEFAULT_CONN_INTERVAL );

0 Likes

Actually,when I shut off it's discoverability and connectability the module (BCM20706)can also excute scan and other action.Is there other  API like a bluetooth switch on moble phone shut down BT thoroughly?

thanks!!!

0 Likes

Sorry, I am not familiar with Android or IOS development. I can find some code for Android on the internet as follows. The IOS may have different method.

https://blog.csdn.net/wanderer_ankey/article/details/78488834

bluetoothAdapter.enable(); //open the BT

bluetoothAdapter.disable(); //close the BT

I think you can find some introduction on the internet by yourself.

0 Likes

Haha,thanks!I try to understand it.

0 Likes