Hello again,
To sum up in a few words:
1/ launching btattach from a udev rule enables Bluetooth but it gets
killed.
2/ launching btattach via systemd works, only when adding a few sec delay.
3/ launching the systemd service from 2/ directly via udev, using the
exact same trigger conditions as in 1/ ends up with Bluetooth not
working...
What leaves me really puzzled is the difference between 1/ and 3/, as they
launch exactly the same command at almost the same time during the boot
process, but they give a different result in a 100% reproducible way.
I am attaching 5 different dmesg outputs to give a sense of the boot timing
in the different scenarios:
- dmesg.simple-udev-rule corresponds to 1/ -> OK
- dmesg.systemd-standalone-rule-with-1s-delay corresponds to 2/ -> OK
- dmesg.systemd-standalone-rule-no-delay : 2/ without the 1s delay -> KO
- dmesg.systemd-triggered-by-udev-rule-no-delay corresponds to 3/ -> KO
- dmesg.systemd-tigggered-by-udev-rule-with-1s-delay -> OK
with the line:
"bluetooth hci0: firmware: direct-loading firmware brcm/BCM.hcd"
giving a good indication of when btattach is launched during the sequence.
Maybe these files will help reveal some clues?
Regards,
Jérôme