Write string data to RX characteristic (host -> device).
(self, data: str)
| 89 | self._client = None |
| 90 | |
| 91 | async def write(self, data: str) -> None: |
| 92 | """Write string data to RX characteristic (host -> device).""" |
| 93 | if not self._client or not self._client.is_connected: |
| 94 | raise RuntimeError("BLE not connected") |
| 95 | payload = data.encode("utf-8") |
| 96 | await self._client.write_gatt_char(BLE_CHAR_RX_UUID, payload, response=True) |
| 97 | |
| 98 | async def read_lines(self, timeout: float) -> AsyncIterator[str]: |
| 99 | """Async iterator yielding lines received via BLE NOTIFY. |
no outgoing calls