Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. Mal wieder BLE Probleme

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    Mal wieder BLE Probleme

    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tenor 0 @Thomas Braun last edited by

      @thomas-braun

      # /usr/lib/systemd/system/bluetooth.service
      [Unit]
      Description=Bluetooth service
      Documentation=man:bluetoothd(8)
      ConditionPathIsDirectory=/sys/class/bluetooth
      
      [Service]
      Type=dbus
      BusName=org.bluez
      ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=sap
      NotifyAccess=main
      #WatchdogSec=10
      Restart=on-failure
      CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
      LimitNPROC=1
      
      # Filesystem lockdown
      ProtectHome=true
      ProtectSystem=strict
      PrivateTmp=true
      ProtectKernelTunables=true
      ProtectControlGroups=true
      StateDirectory=bluetooth
      StateDirectoryMode=0700
      ConfigurationDirectory=bluetooth
      ConfigurationDirectoryMode=0555
      
      # Execute Mappings
      MemoryDenyWriteExecute=true
      
      # Privilege escalation
      NoNewPrivileges=true
      
      # Real-time
      RestrictRealtime=true
      
      [Install]
      WantedBy=bluetooth.target
      Alias=dbus-org.bluez.service
      
      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @Tenor 0 last edited by

        @tenor-0 sagte in Mal wieder BLE Probleme:

        ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=sap

        Die Zeile dürfte falsch sein. Das dürfte

        ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
        

        heißen müssen.

        T 1 Reply Last reply Reply Quote 0
        • T
          Tenor 0 @Thomas Braun last edited by

          @thomas-braun
          Was meinst du mit CAPs gesetzt?
          Den Fix habe ich erneut ausgeführt, aber kein Unterschied, der Adapter ist gelb.
          Der Scan ging nach einem Neustart wieder.

          Thomas Braun 1 Reply Last reply Reply Quote 0
          • Thomas Braun
            Thomas Braun Most Active @Tenor 0 last edited by

            @tenor-0

            sudo apt update
            sudo apt install libcap2-bin
            sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
            
            1 Reply Last reply Reply Quote 0
            • T
              Tenor 0 @Thomas Braun last edited by

              @thomas-braun
              Das musste ich extra rein machen, da ich sonst beim starten eine Fehlermeldung bekomme.
              Habe die noch als Bild gespeichert:
              b67e5a65-9284-4f30-a4d7-13fc843bac06-grafik.png

              quelle

              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @Tenor 0 last edited by Thomas Braun

                @tenor-0

                Keine Bildchens...

                Der Pfad /usr/libexec/bluetooth/bluetoothd dürfte falsch sein.
                Auf meinem Debian gibt es kein /usr/libexec
                Das sieht mir nach einem Kopierfehler aus.

                €dit: Okay, bei ubuntu und Debian trixie gibt es den Pfad wohl. Also so lassen.

                T 1 Reply Last reply Reply Quote 0
                • T
                  Tenor 0 @Thomas Braun last edited by

                  @thomas-braun said in Mal wieder BLE Probleme:

                  /usr/libexec/bluetooth/bluetoothd

                  matthias@server:~$ cd /usr/libexec/bluetooth/
                  matthias@server:/usr/libexec/bluetooth$ ls
                  bluetoothd  obexd
                  matthias@server:/usr/libexec/bluetooth$
                  
                  

                  Das existiert so und war vorher auch so drin. Ich habe nur den Parameter angehangen wie in der Quelle beschrieben.

                  Ich befürchte das der onboard adapter dazwischen funkt.
                  Der Server hat einen onboard WiFi/BT Adapter, der jedoch kein BLE kann:

                  02:00.0 Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
                  

                  Deswegen hatte ich den deaktiviert wie aus dem ursprünglichem Thread beschrieben, dieser war immer hci0 und der USB Adapter dann HCI1
                  Seit dem ich den deaktiviert hatte, war dann der USB Adapter HCI0.
                  Bei der Fehlersuch habe ich schon 2 mal gesehen das der HCIconfig den USB Adapter als HCI1 bezeichnet hat..
                  Nach einem Reboot ist das Thema dann wieder erledigt.

                  Anleitung

                  Thomas Braun 1 Reply Last reply Reply Quote 0
                  • Thomas Braun
                    Thomas Braun Most Active @Tenor 0 last edited by Thomas Braun

                    @tenor-0

                    libcap2 installiert?
                    Kommando dazu ausgeführt?
                    Siehe oben.

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      Tenor 0 @Thomas Braun last edited by

                      @thomas-braun
                      ging wahrscheinlich wegen doppelpost unter, ja ich hatte das schon gemacht. leider kein Unterschied.
                      lescan geht, unter iobroker, kommen keinen neuen Geräte mehr dazu. (Haken in den Einstellungen ist gesetzt)

                      Thomas Braun 1 Reply Last reply Reply Quote 0
                      • Thomas Braun
                        Thomas Braun Most Active @Tenor 0 last edited by

                        @tenor-0 sagte in Mal wieder BLE Probleme:

                        ja ich hatte das schon gemacht. l

                        Die Ausgaben dazu würde ich gerne sehen.

                        T 1 Reply Last reply Reply Quote 0
                        • T
                          Tenor 0 @Thomas Braun last edited by

                          @thomas-braun

                          matthias@server:/usr/libexec/bluetooth$ sudo apt update
                          OK:1 http://de.archive.ubuntu.com/ubuntu noble InRelease
                          OK:2 http://security.ubuntu.com/ubuntu noble-security InRelease
                          OK:3 http://de.archive.ubuntu.com/ubuntu noble-updates InRelease
                          OK:4 http://de.archive.ubuntu.com/ubuntu noble-backports InRelease
                          Paketlisten werden gelesen… Fertig
                          Abhängigkeitsbaum wird aufgebaut… Fertig
                          Statusinformationen werden eingelesen… Fertig
                          Alle Pakete sind aktuell.
                          matthias@server:/usr/libexec/bluetooth$ sudo apt install libcap2-bin
                          Paketlisten werden gelesen… Fertig
                          Abhängigkeitsbaum wird aufgebaut… Fertig
                          Statusinformationen werden eingelesen… Fertig
                          libcap2-bin ist schon die neueste Version (1:2.66-5ubuntu2).
                          Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
                            mailcap wmdocker
                          Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
                          0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
                          matthias@server:/usr/libexec/bluetooth$ sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
                          matthias@server:/usr/libexec/bluetooth$
                          matthias@server:/usr/libexec/bluetooth$
                          
                          
                          T 1 Reply Last reply Reply Quote 0
                          • T
                            Tenor 0 @Tenor 0 last edited by

                            ich stosse immer wieder auf die Meldung:
                            bluetoothd[3674]: Failed to set privacy: Rejected (0x0b)

                            2024-10-12T20:41:52.551245+02:00 server systemd[1]: bluetooth.service: Deactivated successfully.
                            2024-10-12T20:41:52.551384+02:00 server systemd[1]: Stopped bluetooth.service - Bluetooth service.
                            2024-10-12T20:41:54.589079+02:00 server systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
                            2024-10-12T20:41:54.814941+02:00 server systemd[1]: Configuration file /run/systemd/system/systemd-networkd-wait-online.service.d/10-netplan.conf is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
                            2024-10-12T20:41:55.201508+02:00 server (uetoothd)[3674]: bluetooth.service: ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755 ConfigurationDirectoryMode: 555)
                            2024-10-12T20:41:55.201632+02:00 server systemd[1]: Starting bluetooth.service - Bluetooth service...
                            2024-10-12T20:41:55.250612+02:00 server bluetoothd[3674]: Bluetooth daemon 5.72
                            2024-10-12T20:41:55.251545+02:00 server systemd[1]: Started bluetooth.service - Bluetooth service.
                            2024-10-12T20:41:55.251591+02:00 server bluetoothd[3674]: Starting SDP server
                            2024-10-12T20:41:55.251620+02:00 server bluetoothd[3674]: Excluding (cli) sap
                            2024-10-12T20:41:55.251891+02:00 server bluetoothd[3674]: src/plugin.c:plugin_init() System does not support csip plugin
                            2024-10-12T20:41:55.251945+02:00 server bluetoothd[3674]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
                            2024-10-12T20:41:55.251988+02:00 server bluetoothd[3674]: src/plugin.c:plugin_init() System does not support micp plugin
                            2024-10-12T20:41:55.252020+02:00 server bluetoothd[3674]: src/plugin.c:plugin_init() System does not support vcp plugin
                            2024-10-12T20:41:55.252045+02:00 server bluetoothd[3674]: src/plugin.c:plugin_init() System does not support mcp plugin
                            2024-10-12T20:41:55.252070+02:00 server bluetoothd[3674]: src/plugin.c:plugin_init() System does not support bass plugin
                            2024-10-12T20:41:55.252095+02:00 server bluetoothd[3674]: src/plugin.c:plugin_init() System does not support bap plugin
                            2024-10-12T20:41:55.252554+02:00 server bluealsa: bluez.c:1199: Signal: org.freedesktop.DBus.ObjectManager.InterfacesAdded()
                            2024-10-12T20:41:55.252690+02:00 server dbus-daemon[971]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.45' (uid=0 pid=3674 comm="/usr/libexec/bluetooth/bluetoothd --noplugin=sap" label="unconfined")
                            2024-10-12T20:41:55.252765+02:00 server bluetoothd[3674]: Bluetooth management interface 1.22 initialized
                            2024-10-12T20:41:55.252793+02:00 server bluetoothd[3674]: Battery Provider Manager created
                            2024-10-12T20:41:55.252889+02:00 server bluetoothd[3674]: Failed to set privacy: Rejected (0x0b)
                            2024-10-12T20:41:55.253179+02:00 server bluealsa: bluez.c:1199: Signal: org.freedesktop.DBus.ObjectManager.InterfacesAdded()
                            2024-10-12T20:41:55.271225+02:00 server systemd[1]: Starting systemd-hostnamed.service - Hostname Service...
                            2024-10-12T20:41:55.347612+02:00 server dbus-daemon[971]: [system] Successfully activated service 'org.freedesktop.hostname1'
                            2024-10-12T20:41:55.347704+02:00 server systemd[1]: Started systemd-hostnamed.service - Hostname Service.
                            2024-10-12T20:41:55.356604+02:00 server bluealsa: bluez.c:783: Registering battery provider: /org/bluez/hci0/battery
                            2024-10-12T20:41:55.357266+02:00 server bluealsa: bluez.c:598: Creating media endpoint object: /org/bluez/hci0/A2DP/SBC/source/1
                            2024-10-12T20:41:55.357317+02:00 server bluealsa: bluez.c:509: Registering media endpoint: /org/bluez/hci0/A2DP/SBC/source/1
                            2024-10-12T20:41:55.357504+02:00 server bluetoothd[3674]: Endpoint registered: sender=:1.11 path=/org/bluez/hci0/A2DP/SBC/source/1
                            2024-10-12T20:41:55.357618+02:00 server bluealsa: bluez.c:598: Creating media endpoint object: /org/bluez/hci0/A2DP/SBC/source/2
                            2024-10-12T20:41:55.357670+02:00 server bluealsa: bluez.c:509: Registering media endpoint: /org/bluez/hci0/A2DP/SBC/source/2
                            2024-10-12T20:41:55.357785+02:00 server bluetoothd[3674]: Endpoint registered: sender=:1.11 path=/org/bluez/hci0/A2DP/SBC/source/2
                            2024-10-12T20:41:55.357890+02:00 server bluealsa: bluez.c:598: Creating media endpoint object: /org/bluez/hci0/A2DP/SBC/sink/1
                            2024-10-12T20:41:55.357930+02:00 server bluealsa: bluez.c:509: Registering media endpoint: /org/bluez/hci0/A2DP/SBC/sink/1
                            2024-10-12T20:41:55.358065+02:00 server bluetoothd[3674]: Endpoint registered: sender=:1.11 path=/org/bluez/hci0/A2DP/SBC/sink/1
                            2024-10-12T20:41:55.358135+02:00 server bluealsa: bluez.c:598: Creating media endpoint object: /org/bluez/hci0/A2DP/SBC/sink/2
                            2024-10-12T20:41:55.358155+02:00 server bluealsa: bluez.c:509: Registering media endpoint: /org/bluez/hci0/A2DP/SBC/sink/2
                            2024-10-12T20:41:55.358215+02:00 server bluetoothd[3674]: Endpoint registered: sender=:1.11 path=/org/bluez/hci0/A2DP/SBC/sink/2
                            2024-10-12T20:41:55.358275+02:00 server bluealsa: bluez.c:1199: Signal: org.freedesktop.DBus.ObjectManager.InterfacesAdded()
                            2024-10-12T20:42:25.372785+02:00 server systemd[1]: systemd-hostnamed.service: Deactivated successfully.
                            
                            

                            meistens verschwindet sie nach dem Neustart des Adapters, weiß aber nicht wie relevant sie ist.

                            Thomas Braun 1 Reply Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @Tenor 0 last edited by

                              @tenor-0

                              rfkill
                              

                              sagt?

                              T 1 Reply Last reply Reply Quote 0
                              • T
                                Tenor 0 @Thomas Braun last edited by

                                @thomas-braun said in Mal wieder BLE Probleme:

                                rfkill

                                alles tuti

                                matthias@server:~$ rfkill
                                ID TYPE      DEVICE      SOFT      HARD
                                 0 bluetooth hci0   unblocked unblocked
                                 1 wlan      phy0   unblocked unblocked
                                matthias@server:~$ rfkill list
                                0: hci0: Bluetooth
                                        Soft blocked: no
                                        Hard blocked: no
                                1: phy0: Wireless LAN
                                        Soft blocked: no
                                        Hard blocked: no
                                
                                
                                Thomas Braun 1 Reply Last reply Reply Quote 0
                                • Thomas Braun
                                  Thomas Braun Most Active @Tenor 0 last edited by

                                  @tenor-0

                                  Den Haken bei 'Neue Gerät akzeptieren' im Adapter hattest du schon mal gesetzt?

                                  T 1 Reply Last reply Reply Quote 0
                                  • T
                                    Tenor 0 @Thomas Braun last edited by

                                    @thomas-braun
                                    ja diverse male

                                    Thomas Braun 1 Reply Last reply Reply Quote 0
                                    • Thomas Braun
                                      Thomas Braun Most Active @Tenor 0 last edited by

                                      @tenor-0

                                      Dann weiß ich nix mehr dazu.

                                      T 1 Reply Last reply Reply Quote 0
                                      • T
                                        Tenor 0 @Thomas Braun last edited by

                                        @thomas-braun
                                        Schade, aber Danke für deine Hilfe!

                                        1 Reply Last reply Reply Quote 0
                                        • haselchen
                                          haselchen Most Active last edited by

                                          @tenor-0

                                          Was sagt

                                          hciconfig --all

                                          T 1 Reply Last reply Reply Quote 0
                                          • T
                                            Tenor 0 @haselchen last edited by

                                            matthias@server:~$ sudo hciconfig --all
                                            [sudo] password for matthias:
                                            hci0:   Type: Primary  Bus: USB
                                                    BD Address: 8C:88:4B:05:62:63  ACL MTU: 1021:6  SCO MTU: 255:12
                                                    UP RUNNING
                                                    RX bytes:4613 acl:0 sco:0 events:349 errors:0
                                                    TX bytes:38399 acl:0 sco:0 commands:353 errors:0
                                                    Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
                                                    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
                                                    Link policy: RSWITCH HOLD SNIFF PARK
                                                    Link mode: PERIPHERAL ACCEPT
                                                    Name: 'RTK_BT_5.0'
                                                    Class: 0x000000
                                                    Service Classes: Unspecified
                                                    Device Class: Miscellaneous,
                                                    HCI Version: 5.1 (0xa)  Revision: 0xdfc6
                                                    LMP Version: 5.1 (0xa)  Subversion: 0xd922
                                                    Manufacturer: Realtek Semiconductor Corporation (93)
                                            
                                            matthias@server:~$
                                            matthias@server:~$
                                            matthias@server:~$ sudo hciconfig hci0 down
                                            matthias@server:~$ sudo hciconfig --all
                                            hci0:   Type: Primary  Bus: USB
                                                    BD Address: 8C:88:4B:05:62:63  ACL MTU: 1021:6  SCO MTU: 255:12
                                                    DOWN
                                                    RX bytes:4896 acl:0 sco:0 events:353 errors:0
                                                    TX bytes:38411 acl:0 sco:0 commands:357 errors:0
                                                    Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
                                                    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
                                                    Link policy: RSWITCH HOLD SNIFF PARK
                                                    Link mode: PERIPHERAL ACCEPT
                                            
                                            matthias@server:~$ sudo hciconfig hci0 up
                                            Can't init device hci0: Connection timed out (110)
                                            matthias@server:~$
                                            matthias@server:~$ sudo hciconfig --all
                                            hci0:   Type: Primary  Bus: USB
                                                    BD Address: 8C:88:4B:05:62:63  ACL MTU: 1021:6  SCO MTU: 255:12
                                                    DOWN
                                                    RX bytes:4896 acl:0 sco:0 events:353 errors:0
                                                    TX bytes:38414 acl:0 sco:0 commands:358 errors:0
                                                    Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
                                                    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
                                                    Link policy: RSWITCH HOLD SNIFF PARK
                                                    Link mode: PERIPHERAL ACCEPT
                                            

                                            Nach einem Reboot und anschließendem Neustart des BT Dienstes (das musste wohl wegen dem intern deaktivierten BT Adapter immer gemacht werden) ist auf Linux ebene scheinbar alles ok.
                                            Sobald ich den hci0 down nehme kommt er nicht mehr hoch. Das deutet wohl darauf hin, das es doch noch treiber Probleme o.ä, gibt.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            723
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            58
                                            2264
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo