Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. [Aufruf] BLE Adapter testen (v0.6.0)

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [Aufruf] BLE Adapter testen (v0.6.0)

    This topic has been deleted. Only users with topic management privileges can see it.
    • lobomau
      lobomau last edited by

      Hat jemand von euch g-tags damit ausprobiert?

      Hab nach diesem link paar services eingetragen,

      aber es bleibt sehr mau mit den Objekten. Batterie % wäre toll.

      https://www.bluetooth.com/specifications/gatt/services
      1146_adapter.jpg
      1146_objekte.jpg

      1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer last edited by

        Die Geräte sollten eigentlich nur angelegt werden, wenn die Services auch tatsächlich gebroadcasted werden. Eventuell hat das mit nem Bug zu tun, den ich vorhin gefixt habe.

        Lösch den Adapter nochmal und installiere bitte die neueste Version (geht inzwischen auch über die Liste im Admin => Github-Button).

        @Apollon77 Inzwischen kann auch ausgewählt werden, welches Bluetooth-Gerät zum Funken verwendet wird. Unter Linux sollte auch schön benannt sein, welches das ist (UART oder USB).

        1 Reply Last reply Reply Quote 0
        • lobomau
          lobomau last edited by

          @AlCalzone:

          Die Geräte sollten eigentlich nur angelegt werden, wenn die Services auch tatsächlich gebroadcasted werden. Eventuell hat das mit nem Bug zu tun, den ich vorhin gefixt habe.

          Lösch den Adapter nochmal und installiere bitte die neueste Version (geht inzwischen auch über die Liste im Admin => Github-Button). `
          OK. Jetzt wird rssi und services angezeigt. Beim Einrichten konnte ich nur USB im Adapter auswählen, obwohl kein Gerät am USB hängt, aber scheinbar egal.

          Was auffällt ist das es sehr schnell hintereinander aktualisiert die Werte… und dann paar Sekunden Pause ist. Also geschätzt nach 30...40 sec wird kurz hintereinander der Wert etwa 5x aktualisiert. Ich könnte mir vorstellen, dass diese 5x Aktualisierungen unnötig an der Batterie ziehen, oder?

          1 Reply Last reply Reply Quote 0
          • AlCalzone
            AlCalzone Developer last edited by

            @lobomau:

            Jetzt wird rssi und services angezeigt. `
            Die Werte auch?

            @lobomau:

            Beim Einrichten konnte ich nur USB im Adapter auswählen, obwohl kein Gerät am USB hängt, aber scheinbar egal. `
            Interessant. Ich frage nur ab, was Linux für Geräte kennt. Aber die Benennung ist eigentlich egal. Kann das noch jemand nachvollziehen?

            @lobomau:

            Was auffällt ist das es sehr schnell hintereinander aktualisiert die Werte… und dann paar Sekunden Pause ist. Also geschätzt nach 30...40 sec wird kurz hintereinander der Wert etwa 5x aktualisiert. Ich könnte mir vorstellen, dass diese 5x Aktualisierungen unnötig an der Batterie ziehen, oder? `
            Meinst du RSSI? Der wird bei mir ca 2-3x pro Sekunde aktualisiert. Dadurch, dass keine aktive Verbindung hergestellt wird, sondern nur auf sowieso gesendete Pakete gelauscht, dürfte das keinen Einfluss haben. Mein Puck.js, der seit mehreren Wochen alle 375ms ein Paket sendet, hat immernoch 95% Batterie.

            Wenn in einer zukünftigen Version aktiv verbunden wird, gilt es natürlich, hier einen Mittelweg zwischen Aktualität und Batterieverbrauch zu finden.

            1 Reply Last reply Reply Quote 0
            • lobomau
              lobomau last edited by

              Es werden nur rssi Werte angezeigt. Bei services ist leer, aber wahrscheinlich nicht die richtigen services ausgewählt, keine Ahnung welche die g-tags können.

              2-3x/Sekunde ist ja super für eine schnelle Anwesenheitsbestimmung 😄

              1 Reply Last reply Reply Quote 0
              • AlCalzone
                AlCalzone Developer last edited by

                @lobomau:

                keine Ahnung welche die g-tags können. `
                Hast du mal die nRF Connect App ausprobiert um zu schauen was die können? Würde gerne ausschließen dass der Fehler an meinem Code liegt.

                1 Reply Last reply Reply Quote 0
                • lobomau
                  lobomau last edited by

                  @AlCalzone:

                  @lobomau:

                  keine Ahnung welche die g-tags können. Hast du mal die nRF Connect App ausprobiert um zu schauen was die können? Würde gerne ausschließen dass der Fehler an meinem Code liegt.
                  Jetzt ja, coole App! 🙂

                  Nun kenne ich den Batteriestand und den Sendezyklus.

                  Die 94% habe ich noch nicht hinbekommen unter services angezeigt zu bekommen. Im Adapter, Überwachte Dienste, habe ich eingetragen: 0x2A19, 0x180F, 0x2902, 0x2A04
                  1146_screenshot.png

                  1 Reply Last reply Reply Quote 0
                  • AlCalzone
                    AlCalzone Developer last edited by

                    Äh bei mir sah das anders aus, etwa so wie hier:

                    http://forum.iobroker.net/viewtopic.php?p=83065#p83065

                    Nur das was hinter ServiceData steht kann aktuell erfasst werden, weil das freiwillig gesendet wird.

                    1 Reply Last reply Reply Quote 0
                    • lobomau
                      lobomau last edited by

                      @AlCalzone:

                      Äh bei mir sah das anders aus, etwa so wie hier:

                      http://forum.iobroker.net/viewtopic.php?p=83065#p83065

                      Nur das was hinter ServiceData steht kann aktuell erfasst werden, weil das freiwillig gesendet wird. `
                      Ja, hab ich auch. Meine Seite kommt dann, wenn man auf connect klickt.

                      1 Reply Last reply Reply Quote 0
                      • AlCalzone
                        AlCalzone Developer last edited by

                        @lobomau:

                        Meine Seite kommt dann, wenn man auf connect klickt. `
                        Das sind dann aber nur die Services die während einer Verbindung angeboten werden. Das ist aktuell noch nicht unterstützt.

                        1 Reply Last reply Reply Quote 0
                        • BBTown
                          BBTown last edited by

                          ich habe zwar noch keinen Anwendungsfall für den Adapter, aber vielleicht hilft es dir wenn ich mein Installations-Log mit den Meldungen hier reinstelle?!?

                          ! ````
                          host.raspberrypi 2017-09-09 10:29:56.415 info instance system.adapter.ble.0 terminated with code 0 (OK)
                          ble.0 2017-09-09 10:29:56.350 info terminating
                          host.raspberrypi 2017-09-09 10:29:56.308 info stopInstance system.adapter.ble.0 killing pid 19372
                          host.raspberrypi 2017-09-09 10:29:56.307 info stopInstance system.adapter.ble.0
                          host.raspberrypi 2017-09-09 10:29:56.292 info object change system.adapter.ble.0
                          ble.0 2017-09-09 10:28:11.527 info {"index":0,"bus":"UART"}
                          ble.0 2017-09-09 10:28:10.800 info {"index":0,"bus":"UART"}
                          ble.0 2017-09-09 10:28:09.865 info {"index":0,"bus":"UART"}
                          ble.0 2017-09-09 10:28:09.782 info {"index":0,"bus":"UART"}
                          ble.0 2017-09-09 10:28:05.197 info starting. Version 0.1.0 in /opt/iobroker/node_modules/iobroker.ble, node: v6.11.2
                          iobroker 2017-09-09 10:28:03.254 info exit 0
                          iobroker 2017-09-09 10:28:03.222 info host.raspberrypi object system.adapter.ble.0 created
                          host.raspberrypi 2017-09-09 10:28:03.213 info instance system.adapter.ble.0 started with pid 19372
                          host.raspberrypi 2017-09-09 10:28:03.184 info object change system.adapter.ble.0
                          iobroker 2017-09-09 10:28:03.146 info host.raspberrypi object system.adapter.ble.0.alive created
                          iobroker 2017-09-09 10:28:03.103 info host.raspberrypi object system.adapter.ble.0.connected created
                          iobroker 2017-09-09 10:28:03.065 info host.raspberrypi object system.adapter.ble.0.memHeapUsed created
                          iobroker 2017-09-09 10:28:03.025 info host.raspberrypi object system.adapter.ble.0.memHeapTotal created
                          iobroker 2017-09-09 10:28:02.980 info host.raspberrypi object system.adapter.ble.0.memRss created
                          iobroker 2017-09-09 10:28:02.938 info host.raspberrypi object system.adapter.ble.0.uptime created
                          iobroker 2017-09-09 10:28:02.901 info host.raspberrypi object system.adapter.ble.0.inputCount created
                          iobroker 2017-09-09 10:28:02.865 info host.raspberrypi object system.adapter.ble.0.outputCount created
                          iobroker 2017-09-09 10:28:02.826 info host.raspberrypi object ble.0.info created
                          iobroker 2017-09-09 10:28:02.794 info host.raspberrypi object ble.0.info.connection created
                          iobroker 2017-09-09 10:28:02.760 info host.raspberrypi object ble.0.info.driverState created
                          iobroker 2017-09-09 10:28:02.738 info host.raspberrypi create instance ble
                          iobroker 2017-09-09 10:28:02.684 info host.raspberrypi object system.adapter.ble created
                          iobroker 2017-09-09 10:28:02.536 info upload [0] ble.admin /opt/iobroker/node_modules/iobroker.ble/admin/ble.png ble.png image/png
                          iobroker 2017-09-09 10:28:02.448 info upload [1] ble.admin /opt/iobroker/node_modules/iobroker.ble/admin/index.html index.html text/html
                          iobroker 2017-09-09 10:28:02.342 info upload [2] ble.admin /opt/iobroker/node_modules/iobroker.ble/admin/words.js words.js application/javascript
                          iobroker 2017-09-09 10:28:02.315 info got /opt/iobroker/node_modules/iobroker.ble/admin
                          iobroker 2017-09-09 10:28:02.246 info npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
                          iobroker 2017-09-09 10:28:02.246 info npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.2.0 (node_modules/usb):npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.2.0 install: node-pre-gyp install --fallback-to-build
                          iobroker 2017-09-09 10:28:02.244 info SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/noble/node_modules/xpc-connection):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: want
                          iobroker 2017-09-09 10:28:02.240 info WARN optional
                          iobroker 2017-09-09 10:28:02.238 info npm
                          iobroker 2017-09-09 10:27:43.500 info ^
                          iobroker 2017-09-09 10:27:43.500 info Local error = errorConstructor->NewInstance(1, constructorArgs);
                          iobroker 2017-09-09 10:27:43.500 info ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:../src/BluetoothHciSocket.cpp:275:72: warning: ‘v8::Local v8::Function::NewInstance(int, v8::
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! not ok
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! node-pre-gyp -v v0.6.30
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! node -v v6.11.2
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! cwd /opt/iobroker/node_modules/iobroker.ble/node_modules/usb
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! command "/usr/bin/nodejs" "/opt/iobroker/node_modules/iobroker.ble/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! System Linux 4.9.44-v7+
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:891:16)
                          iobroker 2017-09-09 10:27:36.135 info node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
                          iobroker 2017-09-09 10:27:36.135 info at ChildProcess. (/opt/iobroker/node_modules/iobroker.ble/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)node-pre-gyp ERR! stack at emitTwo (events.js:106:13
                          iobroker 2017-09-09 10:27:36.133 info ERR! stack Error: Failed to execute '/usr/bin/nodejs /opt/iobroker/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/iobroker/node_modules/iobroker.ble/n
                          iobroker 2017-09-09 10:27:36.129 info node-pre-gyp
                          iobroker 2017-09-09 10:27:36.117 info node-pre-gyp ERR! build error
                          iobroker 2017-09-09 10:27:36.108 info gyp ERR! not ok
                          iobroker 2017-09-09 10:27:36.106 info ERR! node -v v6.11.2gyp ERR! node-gyp -v v3.6.0
                          iobroker 2017-09-09 10:27:36.102 info gyp
                          iobroker 2017-09-09 10:27:36.102 info gyp ERR! cwd /opt/iobroker/node_modules/iobroker.ble/node_modules/usb
                          iobroker 2017-09-09 10:27:36.102 info gyp ERR! command "/usr/bin/nodejs" "/opt/iobroker/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/iobroker/node_modules/iobroker.ble/node_modules/u
                          iobroker 2017-09-09 10:27:36.102 info gyp ERR! System Linux 4.9.44-v7+
                          iobroker 2017-09-09 10:27:36.102 info ERR! stack at ChildProcess.emit (events.js:191:7)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
                          iobroker 2017-09-09 10:27:36.098 info gyp
                          iobroker 2017-09-09 10:27:36.096 info gyp ERR! stack at emitTwo (events.js:106:13)
                          iobroker 2017-09-09 10:27:36.093 info ERR! stack Error: make failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/opt/iobroker/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
                          iobroker 2017-09-09 10:27:36.092 info gyp
                          iobroker 2017-09-09 10:27:36.081 info ERR! build error
                          iobroker 2017-09-09 10:27:36.079 info
                          iobroker 2017-09-09 10:27:36.073 info gyp
                          iobroker 2017-09-09 10:27:36.058 info make: *** [Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
                          iobroker 2017-09-09 10:27:35.628 info compilation terminated.
                          iobroker 2017-09-09 10:27:35.626 info ^
                          iobroker 2017-09-09 10:27:35.626 info ../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: Datei oder Verzeichnis nicht gefunden #include
                          iobroker 2017-09-09 10:27:18.862 info ERR! Tried to download: https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v48-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for usb@1.2.0 and node
                          iobroker 2017-09-09 10:27:18.806 info node-pre-gyp
                          iobroker 2017-09-09 10:26:39.288 info npm install --production (System call) in "/opt/iobroker/node_modules/iobroker.ble"
                          iobroker 2017-09-09 10:26:39.279 info host.raspberrypi install adapter ble
                          iobroker 2017-09-09 10:26:37.227 info add ble

                          1 Reply Last reply Reply Quote 0
                          • AlCalzone
                            AlCalzone Developer last edited by

                            Dir fehlen ein paar Pakete:

                            sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
                            
                            1 Reply Last reply Reply Quote 0
                            • BBTown
                              BBTown last edited by

                              @AlCalzone:

                              Dir fehlen ein paar Pakete:

                              sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
                              ```` `  Danke dir., ich installiere diese nach … wurde - glaube ich - auch am Anfang dieses Threads schon einmal drauf hingewiesen 8-)
                              

                              Ist im Anschluss eine Deinstalltion/Neuinstalltion empfohlen/notwendig oder reicht ein Neustart des Adapters?

                              1 Reply Last reply Reply Quote 0
                              • AlCalzone
                                AlCalzone Developer last edited by

                                Neuinstallation (bzw. drüberinstallieren) wird wohl notwendig, da ein paar der Abhängigkeiten nicht kompiliert wurden.

                                1 Reply Last reply Reply Quote 0
                                • lobomau
                                  lobomau last edited by

                                  Mir sind zwei BLE Geräte "ins Netz gegangen", Flex 2 und Charge 2. Bei diesen Geräten wird auch ein Wert vom service 180a festgehalten, einmal 1800063703 und einmal 1604335603. Ist klar was diese Zahl bedeutet? Oder hat da jeder Hersteller einen eigenen Code dahinter?

                                  1 Reply Last reply Reply Quote 0
                                  • AlCalzone
                                    AlCalzone Developer last edited by

                                    Vorab: Die Dokumentation ist furchtbar, so richtig schlau werde ich draus nicht, was advertised werden kann und was nur nach Verbindung verfügbar ist.

                                    Die Charakteristik 0x180A steht für "Device Information", hier "spezifiziert" https://www.bluetooth.com/specification … mation.xml

                                    Wie die zugehörigen Daten in advertisement packets aussehen, scheint nirgends angegeben.

                                    0x180F (Battery Service) hat hingegen einfach ein Byte mit dem Batteriestatus in %.

                                    Deine Daten scheinen von Fitbit Armbändern zu kommen. Was da genau drin steht, finde ich nirgends. Könnte irgendeine Geräte-ID sein, die die zugehörige App auswertet.

                                    1 Reply Last reply Reply Quote 0
                                    • AlCalzone
                                      AlCalzone Developer last edited by

                                      Update:

                                      Version 0.2.0 (auf NPM und Github) unterstützt jetzt Plugins, die Advertisements parsen und in lesbares Format umwandeln können. Eine kurze Beschreibung des Systems ist auf Github.

                                      Als erstes Plugin existiert Mi-Flora zum Auslesen der Sensorwerte von https://www.amazon.de/kabelloser-Pflanzen-Sensor-Bluetooth-Moisture-N%C3%A4hrstoff/dp/B01LWYZUSJ

                                      1 Reply Last reply Reply Quote 0
                                      • apollon77
                                        apollon77 last edited by

                                        Hey @AlCazone,

                                        ich hab jetzt mal Zeit gefunden und rum experimentiert immer noch wegen meinem Rasenmäher. Also die iOS App zeigt das hier an:

                                        378_img_4991.png

                                        Der "Mo0085" … Ich hab diese UUID eingegeben aber er findet nix 😞 Oder wie müsste ich das angeben?

                                        1 Reply Last reply Reply Quote 0
                                        • AlCalzone
                                          AlCalzone Developer last edited by

                                          ServiceData ist der Schlüssel. Da steht bei dir nix, er sendet also keine Advertisements. Um spezielle Daten zu lesen/schreiben musst du dich leider noch etwas gedulden.

                                          Gesendet von iPhone mit Tapatalk

                                          1 Reply Last reply Reply Quote 0
                                          • apollon77
                                            apollon77 last edited by

                                            Ok dann warte ich noch geduldig 😉

                                            Am Ende interessiert mich aktuell am ehesten der Rssi wert

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            570
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            59
                                            370
                                            62649
                                            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