NordicBleInterface

class NordicBleInterface @AssistedInject constructor(serviceScope: CoroutineScope, centralManager: CentralManager, service: RadioInterfaceService, @Assisted val address: String) : IRadioInterface(source)

A IRadioInterface implementation for BLE devices using Nordic Kotlin BLE Library. https://github.com/NordicSemiconductor/Kotlin-BLE-Library.

This class is responsible for connecting to and communicating with a Meshtastic device over BLE.

Parameters

serviceScope

The coroutine scope to use for launching coroutines.

centralManager

The central manager provided by Nordic BLE Library.

service

The RadioInterfaceService to use for handling radio events.

address

The BLE address of the device to connect to.

Constructors

Link copied to clipboard
@AssistedInject
constructor(serviceScope: CoroutineScope, centralManager: CentralManager, service: RadioInterfaceService, @Assisted address: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Closes the connection to the device.

Link copied to clipboard
open override fun handleSendToRadio(p: ByteArray)

Sends a packet to the radio.