jens-maus / RaspberryMatic

:house: A feature-rich but lightweight, buildroot-based Linux operating system alternative for your CloudFree CCU3/ELV-Charly 'homematicIP CCU' IoT smarthome central. Running as a pure virtual appliance (ProxmoxVE, Home Assistant, LXC, Docker/OCI, Kubernetes/K8s, etc.) on a dedicated embedded device (RaspberryPi, etc.) or generic x86/ARM hardware.
https://raspberrymatic.de
Apache License 2.0
1.52k stars 186 forks source link

Bluetooth stopped working at 3.59.6.20210911 #1469

Closed in-voker closed 2 years ago

in-voker commented 2 years ago

Describe the bug Since version 3.59.6.20210911 the bluetooth doesn't work anymore at my ELV Charly (RPi3). I set the /etc/config/enableBluetooth file correctly and also tired to start /etc/init.d/S40bluetooth start manually. On version 3.59.6.20210911 the message "WARNING: bluetooth setup failed" is appearing.

Steps to reproduce the behavior

  1. installed fresh (without any backups) RaspberryMatic-3.59.6.20210703-rpi3 which is working without any issues
  2. installed fresh (without any backups) RaspberryMatic-3.59.6.20210807-rpi3 which is working without any issues
  3. installed fresh (without any backups) RaspberryMatic-3.59.6.20210911-rpi3 which shows that bluetooth is not able to beeing enabled
  4. installed fresh (without any backups) RaspberryMatic-3.59.6.20211009-rpi3 which shows that bluetooth is not able to beeing enabled

*installed fresh = flash rom directly with win32diskimager on sd

Expected behavior the start of hcitool via ssh should work to be able to use lescan

Screenshots i didn't take any screenshots because there isn't anything special to see. bluetooth is just not working with the newer versions...

System information:

Additional context i am a bit irritated because i don't find any other guys reporting this. this is the reason why I waited that long... Because it flashed a completed fresh rom on SD without any additional stuff from myself i am pretty sure it's nothing wrong with my hardware. everything works well with the 20210807 and before...

salem0815 commented 2 years ago

I have exactly the same problem! Since version 3.59.6.20210911 bluetooth doesn’t work on an ELV Charly (RPi3).

I checked /etc/init.d/S40bluetooth and tried to start bluetooth manual by the CLI. It seems to be that the necessary tools hciattach and hciconfig are missing.

If i enter hciattach or hciconfig in the CLI, i get „not found“.

For my project I use l2ping, this tool is also missing.

a-marcel commented 2 years ago

Hello,

i've the same issue with the Raspberry and i think that the issue could be that /usr/bin/hciattach is not existing anymore but this tool is needed to start /etc/init.d/S40bluetooth

salem0815 commented 2 years ago

Hi,

I found out the following:

Change log RaspberryMatic 3.59.6.20210911

There is a change from buildroot 2021.05 to 2021.08.

Change log buildroot 2021.08-rc1, released August 3rd, 2021:

In menuconfig: Target packages -> Network applications

‘build tools’ contains hciattach and l2ping!

I tested it in my own build environment by adding the package ‘build tools’ and compiling it. After this bluetooth started working.

This issue is still in RaspberryMatic 3.61.7.20220115.

jens-maus commented 2 years ago

After this bluetooth started working.

Thanks for the investigation. Are you able to submit a PR on that or at least show a diff against the defconfig? That would be highly appreciated.

salem0815 commented 2 years ago

I compared the from ‘menuconfig’ generated defconfig (RaspberryMatic 3.61.7.20220115), there is only one difference:

original:

BR2_PACKAGE_BLUEZ5_UTILS_TOOLS is not set

patched: BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y

config_orig.txt config_patch.txt