Protocol helpers + optional BLE scan/listen for the Omi wearable.
go test ./...Exports UUIDs, StripPacketHeader, STT helpers. Scan / Listen / ListenPayload / ReadCodec return ErrBLEDisabled.
Uses tinygo.org/x/bluetooth (CoreBluetooth on macOS, BlueZ on Linux). Compiles on desktop darwin/arm64.
go test -tags ble ./...
go run -tags ble ./examples/... # if presentdevices, err := omidevice.Scan(ctx, 5*time.Second)
err = omidevice.ListenPayload(ctx, devices[0].ID, func(payload []byte) {
// Opus/PCM frames with 3-byte header stripped
})Mirrors Python print_devices / listen_to_omi in sdks/python/omi/bluetooth.py.
- Needs Bluetooth permission/adapter; CI and headless hosts stay on default build.
- macOS device IDs are CoreBluetooth identifiers (not always classic MACs).
ReadCodecrelies on GATT Read; may fail if characteristic is notify-only on some firmware.