Skip to content

Shutting down BLE support #3192

@zephyrbot

Description

@zephyrbot

Reported by Geoff Gustafson:

Sorry if there's already been a request for this, I couldn't find it.

Use case 1:
I'd hope it would be possible to have a bt_disable function? For a single application, the use could be to be able to shut down the radio and everything and only occasionally turn it on when a user interacts with the device, or for a nightly sync or something. It seems that could save a lot of power?

In ZJS, we have an off-the-beaten path reason. We support loading different JavaScript apps sequentially with our "ashell" environment. So we prefer to cleanly release all resources / hardware we connected to in one application before starting the next. If one app used BT and the next didn't, we'd like to turn it off, and then turn it back on again if needed for another app. This is useful for development purposes.

Maybe this is nuts and we should just reboot in this case. :) I guess obviously it would add overhead.

(Imported from Jira ZEP-1741)

Use case 2:
I'm trying to find a way to turn off/disable bt functionality(i.e. like bt_disbale) and restart it later on, but it looks like no such of API has been provided. Any hints will be appreciated.

To Reproduce
Steps to reproduce the behavior:

Call bt_enable
Turn off hci controller
Power on hci controller
Trying to enable and use bt again
See error
In our case, we have a host and a controller, both of them are running zephyr with HCI H:4 and we want to cut off power of controller to save power sometime, then enable it again when needed. Then we found that we can't use any bt functionalities after re-powered HCI controller.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions