You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
The text was updated successfully, but these errors were encountered:
cesantabot
pushed a commit
to mongoose-os-libs/wifi
that referenced
this issue
Nov 24, 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 modifiedmgos_sys_config
to the module. WiFi is a good example, it just needsbool 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 tobt.adv_enable
andbt.enable
to be applied by the application too -- the only way to disable BT now is to usebt.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 :)The text was updated successfully, but these errors were encountered: