Skip to content

Create a BleGattCommProvider to connect BLE Gatt to ICommProvider #49

@kalynstricklin

Description

@kalynstricklin

To remove sensorhub-android-meshtastic and use only sensorhub-driver-meshtastic from osh-addons, we need a BLE communication provider for Android.

Create a BleGattCommProvider in sensorhub-android-service that wraps Android BLE GATT into InputStream and OutputStream. This lets us use BLE without a Meshtastic-specific Android driver.

Create a BleGattCommProvider in sensorhub-android-service that:

  • Implements ICommProvider
  • Connects to a BLE device via BleNetwork.connectGatt()
  • Takes configurable service and characteristic UUIDs (for read/write characteristics)
  • Exposes GATT characteristic notifications as an InputStream
  • Exposes GATT characteristic writes as an OutputStream
  • Handles connection lifecycle (connect, disconnect, reconnect)

Once done, we can remove sensorhub-android-meshtastic anad use sensorhub-driver-meshtastic with this comm provider.

this will also benefit

  • Polar
  • Angel
  • Kestrel
  • STE Rad Pager

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions