Files
utun2/tools/chatgui-android/jni_bridge/android_ble.h
T
evgeny f84622966e Add BLE ETCP links and GATT invitations for desktop and Android
Attach packet drivers to initially empty ETCP connections. Share BLE neighbor
tracking and group fallback between desktop and Android in cgathui_common.

Deliver join links through a dedicated Write/Indicate characteristic with
independent fragmentation queues, application acknowledgements, deduplication
and bounded retries. Merge LAN/BLE discovery and add a separate Bluetooth
invitation reception setting to both clients.

Validation: 230 core tests, BLE transport/BlueZ/UI tests, ASAN/UBSAN,
Linux GUI and Android builds, and Windows backend cross-compilation.
Physical Android/Linux invitation exchange passed with either GATT initiator.
The Android-initiated run also verified all 32 ETCP packets of 1500 bytes;
the desktop-initiated load run reached 7/32 within its 45-second time limit.
2026-10-29 16:41:04 +01:00

17 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Android BLE lifetime: detach вызывается в worker перед уничтожением instance/uasync.
* Радио живёт за JNI; транспорт и ll_queue принадлежат worker. */
#ifndef ANDROID_BLE_H
#define ANDROID_BLE_H
struct ble_transport;
struct ble_etcp;
/* Заимствованный общий драйвер: таблица соседей и connect через ble_etcp.h. Только worker, до detach. */
struct ble_etcp* android_ble_driver(void);
/* Заимствованный радио handle либо NULL. Только worker, до detach.
* В штатном режиме TX/RX принадлежат драйверу ETCP; сырые пакеты доступны только instrumentation echo. */
struct ble_transport* android_ble_transport(void);
/* Worker: уничтожить transport и mailbox до instance/uasync; повторный вызов безопасен.
* Android SDK stop асинхронно передаётся HandlerThread: поздние события отбрасываются по generation,
* неудачные SDK releases остаются у Kotlin cleanup owner до успешного повтора. */
void android_ble_detach(void);
#endif