Bluetooth Spielereien

Ursache für diesen Artikel ist ein Sensor bzw. eine Waage für Gasflschen der Firma GOK (Sensor4) den ich in Linux auslesen und setzen will. Analog lässt sich das aber auf fast alle Bluetooth Geräte anwenden. Ich wollte aus Datenschutzgründen und der App-Hygiene auf meinen Handy nicht die Hersteller-App benutzen sondern selbst ergründen was man mit dem Teil alles machen kann.

Aufruf von „bluetoothctl“

Anzeigen der angeschlossenen Bluetooth Controller:

list
Controller 00:1A:7D:DA:71:0A blitz.n17.de [default]

Infos über den Bluetooth Controller anzeigen:

  show 00:1A:7D:DA:71:0A
Controller 00:1A:7D:DA:71:0A (public)
        Manufacturer: 0x000a (10)
        Version: 0x06 (6)
        Name: blitz.n17.de
        Alias: blitz.n17.de
        Class: 0x006c0104 (7078148)
        Powered: yes
        Discoverable: yes
        DiscoverableTimeout: 0x00000000 (0)
        Pairable: yes
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0547
        Discovering: no
        Roles: central
        Roles: peripheral
Advertising Features:
        ActiveInstances: 0x00 (0)
        SupportedInstances: 0x05 (5)
        SupportedIncludes: tx-power
        SupportedIncludes: appearance
        SupportedIncludes: local-name

Auflisten der gefundenen Bluetooth Devices:

scan on
[CHG] Device FB:2D:B8:BB:D1:7E ManufacturerData.Key: 0x09cc (2508)
[CHG] Device FB:2D:B8:BB:D1:7E ManufacturerData.Value:
81 ff ff ff 64 00 fb 2d b8 bb d1 7e              ....d..-...~ 

Die MAC Adresse passt mit der auf dem Rückseiteetikett aufgedruckten Adresse.

connect FB:2D:B8:BB:D1:7E
menu gatt
list-attributes
select attribute 00007086-a20b-4d4d-a4de-7f071dbbc1d8
  read