Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to change bluetooth state without reboot #1

Open
kzyapkov opened this issue Nov 23, 2017 · 0 comments
Open

Ability to change bluetooth state without reboot #1

kzyapkov opened this issue Nov 23, 2017 · 0 comments

Comments

@kzyapkov
Copy link

kzyapkov commented Nov 23, 2017

To allow for better user flexibility, please make it possible for changes in mgos_sys_config.bt to be applied runtime, without the necessity for reboot.

This actually applies to many libraries -- they all have an _init() function which allocates resources, brings up hardware and applies configuration. For many libraries the last step is trivial to implement and make public, so that applications can apply their modified mgos_sys_config to the module. WiFi is a good example, it just needs bool mgos_wifi_set_config(const struct mgos_config_wifi *cfg) made public.

For this particular usecase, we need deregister functionality for gatts, so that bt-service-config can implement its _set_config() method and register/deregister at will. It should be possible for changes to bt.adv_enable and bt.enable to be applied by the application too -- the only way to disable BT now is to use bt.keep_enabled, but it's a sneaky way to do it. Also, it seems the BT service is enabled on boot regardless of whether a good WiFi STA config is present. BT is only disabled after successful association. What happens if your router blows up or otherwise disappears? Your neighbors take over the device :)

cesantabot pushed a commit to mongoose-os-libs/wifi that referenced this issue Nov 24, 2017
And make public.

Related to mongoose-os-libs/bt-common#1

PUBLISHED_FROM=0ba0e42b4dd28bbc393f0646541ca9faa8654cb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant