raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=22031a74bb2c82b0031219bf938606673efb3397

commit 22031a74bb2c82b0031219bf938606673efb3397
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Dec 24 14:27:33 2018 +0000

    bluez5 - rfkill off when powering on from config - hope it fixes init
    
    so there are a bunch of nasties that bluez itself doent take care of -
    like rfkill. some devices (many i seem to find) have rfkill enabled by
    default at boot. the gui which select power on or off is largely
    useless as asking bluze to do this has no effect or fails because a
    separate rfkill subsystem is forcing things off. this is bizarre that
    bluez doesnt take care of it, but since it doesn't, we hve to. we
    already swizzled rfkill when u toggle the power checkbox, but not at
    init power on on loging (based oon last known power state of the bt
    adapter that was saved in config). i found the log saying power on
    error due to rfkill, so adding an explicit rfkill unblock should...
    help. and then if you have bt powered on - next boot it should be too.
    power it off if you dont want ti on. then it will be explicitly
    powrred off at init/boot/login.
---
 src/modules/bluez5/e_mod_popup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/bluez5/e_mod_popup.c b/src/modules/bluez5/e_mod_popup.c
index 2b6617e03..3e42a3a5b 100644
--- a/src/modules/bluez5/e_mod_popup.c
+++ b/src/modules/bluez5/e_mod_popup.c
@@ -873,6 +873,12 @@ _cb_adapter_add_delayed_setup(void *data)
                   if (ad->powered)
                     {
                        printf("==== BZ INIT REQ POWER ON %s\n", o->address);
+                       if (o->path)
+                         {
+                            const char *s = strrchr(o->path, '/');
+
+                            if (s) ebluez5_rfkill_unblock(s + 1);
+                         }
                        bz_obj_power_on(o);
                     }
                   else

-- 


Reply via email to