rawFrameFlow

Flow emitting every raw BLE characteristic notification received from the connected device as a defensive snapshot of the original byte array. This is an RX-only view of trafficFlow, sharing its payloads and bounded buffer. Treat bytes as read-only. Notification chunks are not necessarily complete protocol frames. The public type is now Flow rather than SharedFlow; ordinary collect usage is unchanged.

This flow can be collected to implement raw frame logging, packet inspection, or custom decoding pipelines independent from the built-in protocol decoder.

Threading notes:

  • Emissions originate from BLE callback handling and therefore must be treated as background events.

  • Collectors are responsible for choosing the appropriate collection context.

Example:

bleManager.rawFrameFlow.collect { bytes ->
outputStream.write(bytes)
}