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.
17 lines
1.2 KiB
C
17 lines
1.2 KiB
C
/* 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
|