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.
This commit is contained in:
Carsten Haitzler 2018-12-24 14:27:33 +00:00
parent 22f00acfc8
commit 22031a74bb
1 changed files with 6 additions and 0 deletions

View File

@ -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