Bluetooth Problem + Zwave Modul (Razberry (ZWave-Gateway)) in RPI 3B

Begonnen von Micky, 25 August 2023, 14:50:01

Vorheriges Thema - Nächstes Thema

Micky

Hi Zusammen,

habe leider wieder Probleme mit dem Bluetooth in Verbindung mit dem Zwave Modul (Razberry (ZWave-Gateway)), nach jedem Neustart war das Bluetooth Modul ohne Device MAC :

root@raspberrypi:~# hcitool dev
Devices:


Musste man händisch immer mit DOWN & UP starten

hciconfig hci0 up
Dann war das so sobald man scan on konnte man die Devices sehen und fehm Fand die Gtags aber wenn man scan off gemacht hat, waren die ebenso in FHem alle auf abwesend.

Habe dann so einiges umgestellt, soviel das ich nicht mehr genau weiß was, mittlerweile geht das auch nicht mehr.....

root@raspberrypi:~#  hciconfig hci0 down
Can't open HCI socket.: Address family not supported by protocol

Mein RPI3B
Raspberry Pi 3 Model B Rev 1.2

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch

root@raspberrypi:~# systemctl start bluetooth
root@raspberrypi:~#

root@raspberrypi:~# systemctl status bluetooth
● bluetooth.service - Bluetooth service
  Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
  Active: inactive (dead)
Condition: start condition failed at Fri 2023-08-25 14:38:34 CEST; 21s ago
          └─ ConditionPathIsDirectory=/sys/class/bluetooth was not met
    Docs: man:bluetoothd(8)
root@raspberrypi:~#




sudo nano /boot/config.txt
# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
#force_turbo=1
enable_uart=1
dtoverlay=pi3-miniuart-bt
core_freq=250


sudo nano /lib/systemd/system/hciuart.service
[Unit]
Description=Configure Bluetooth Modems connected by UART
ConditionFileNotEmpty=/proc/device-tree/soc/gpio@7e200000/bt_pins/brcm,pins
Requires=dev-serial1.device
After=dev-serial1.device

[Service]
Type=forking
ExecStart=/usr/bin/btuart

[Install]
WantedBy=multi-user.target


root@raspberrypi:~# ls -lha /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 64 Aug 25 14:39 /dev/ttyAMA0


sudo nano /lib/systemd/system/bthelper@.service
[Unit]
Description=Raspberry Pi bluetooth helper
Requires=bluetooth.service
After=bluetooth.service

[Service]
Type=simple
ExecStart=/usr/bin/bthelper %I



root@raspberrypi:~# ls -l /dev/serial*
lrwxrwxrwx 1 root root 7 Aug 25 15:16 /dev/serial0 -> ttyAMA0



Gibt es eine Möglichkeit das komplett die Bluetooth Einstellungen auf Standard zurückzusetzen,
oder sieht man anhand der Ausgabe oben schon einen Fehler von mir ?

Vielen Dank
Grüße
Micky

Otto123

Du hast ziemlich viel gemacht, ich empfehle diese Schritte:
https://wiki.fhem.de/wiki/Raspberry_Pi (hast Du) aber hier hast DU was anderes gemacht.
https://wiki.fhem.de/wiki/Fhem.service_(systemd_unit_file) und dort
https://forum.fhem.de/index.php/topic,110716.0.html
Zitat von: Micky am 25 August 2023, 14:50:01Gibt es eine Möglichkeit das komplett die Bluetooth Einstellungen auf Standard zurückzusetzen,
Wenn Du das System neu machst (andere Thread) und die Schritte oben ausführst ;)
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Micky

danke Otto, hab jetzt seit gestern Nacht dran rum getestet, glaub bekomme das nicht hin,


verstehe nicht frührer hatte ich das auch so wie im Wiki:
lrwxrwxrwx 1 root root 7 Jun  7 22:55 /dev/serial0 -> ttyAMA0
 lrwxrwxrwx 1 root root 5 Jun  7 22:55 /dev/serial1 -> ttyS0

aber bei mir ist nur noch eins da:

root@raspberrypi:~# ls -l /dev/serial*
lrwxrwxrwx 1 root root 7 Aug 25 23:32 /dev/serial0 -> ttyAMA0
root@raspberrypi:~#


denke die Lösung ist tatsächlich eine neue SD Karte mit neuesten Debian


Edit:

root@raspberrypi:~# sudo apt-get install pi-bluetooth
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  libanyevent-perl libasync-interrupt-perl libcoro-perl libev-perl libevent-perl libguard-perl libio-aio-perl libsbc1
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden NEUEN Pakete werden installiert:
  pi-bluetooth
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 4.580 B an Archiven heruntergeladen werden.
Nach dieser Operation werden 25,6 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://archive.raspberrypi.org/debian stretch/main armhf pi-bluetooth all 0.1.10 [4.580 B]
Es wurden 4.580 B in 0 s geholt (51,6 kB/s).
Vormals nicht ausgewähltes Paket pi-bluetooth wird gewählt.
(Lese Datenbank ... 71318 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../pi-bluetooth_0.1.10_all.deb ...
Entpacken von pi-bluetooth (0.1.10) ...
pi-bluetooth (0.1.10) wird eingerichtet ...
A dependency job for hciuart.service failed. See 'journalctl -xe' for details.
hciuart.service couldn't start.


root@raspberrypi:~# grep -i -E "(bt|blue|\bhci)" /var/log/syslog | tail -100 > btlog.txt
root@raspberrypi:~# cat btlog.txt
Aug 26 02:00:51 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Aug 26 02:00:52 raspberrypi lepresenced[1742]: [tid:2] main::bluetooth_dump_thread: hcidump exited, retrying...
Aug 26 02:00:52 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: Received unknown output: 'Invalid device: Address family not supported by protocol'!
Aug 26 02:00:52 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Aug 26 02:00:53 raspberrypi lepresenced[1742]: [tid:2] main::bluetooth_dump_thread: hcidump exited, retrying...
Aug 26 02:00:53 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: Received unknown output: 'Invalid device: Address family not supported by protocol'!
Aug 26 02:00:53 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Aug 26 02:00:54 raspberrypi lepresenced[1742]: [tid:2] main::bluetooth_dump_thread: hcidump exited, retrying...
Aug 26 02:00:54 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: Received unknown output: 'Invalid device: Address family not supported by protocol'!
Aug 26 02:00:54 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Aug 26 02:00:55 raspberrypi lepresenced[1742]: [tid:2] main::bluetooth_dump_thread: hcidump exited, retrying...
Aug 26 02:00:55 raspberrypi lepresenced[1742]: [tid:1] main::bluetooth_scan_thread: Received unknown output: 'Invalid device: Address family not supported by protocol'!


root@raspberrypi:~# systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

Aug 26 02:03:15 raspberrypi systemd[1]: Dependency failed for Configure Bluetooth Modems connected by UART.
Aug 26 02:03:15 raspberrypi systemd[1]: hciuart.service: Job hciuart.service/start failed with result 'dependency'.

evtl. kann jemand damit was anfangen, ich habe gesehen das in sys/class/ das Verzeichnis Bluetooth fehlt