Documentation
¶
Overview ¶
BLE sensor collector: scan for BLE devices and register a GATT client.
Demonstrates:
- IBluetoothManager -> RegisterAdapter -> IBluetooth
- GetBluetoothGatt -> IBluetoothGatt: GATT client registration
- GetBluetoothScan -> IBluetoothScan: BLE scanning with callbacks
- IBluetoothGattCallback: OnClientRegistered
- IScannerCallback: OnScannerRegistered, OnScanResult
Build:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o build/ble_sensor_collector ./examples/ble_sensor_collector/ adb push build/ble_sensor_collector /data/local/tmp/ && adb shell /data/local/tmp/ble_sensor_collector
Click to show internal directories.
Click to hide internal directories.