/** * Retry helper for the "GATT services not visible yet" race that hits every * BLE transport this library supports, not just Tauri/Android: the * underlying platform's `connect()` (Web Bluetooth's `gatt.connect()`, * plugin-blec's `connect()` on Android, ...) can resolve before service * discovery is guaranteed complete. The first `getPrimaryService()` / * subscribe call inside a protocol adapter's `onConnected()` then fails * with "No services matching UUID ..." even though the device genuinely * has that service — it just hasn't been indexed by the platform's GATT * cache yet, most commonly on a first-time pairing. * * Every protocol adapter resets its own state on a failed `onConnected()`, * so retrying it is always safe. */ export interface GattReadyRetryOptions { /** * Grace period after the transport's own `connect()` resolves, before the * first `onConnected()` attempt. Defaults to 300ms. */ gattReadyInitialDelayMs?: number; /** Total budget for retrying after the first attempt fails. Defaults to 3000ms. */ gattReadyTimeoutMs?: number; /** Delay between retry attempts. Defaults to 250ms. */ gattReadyIntervalMs?: number; /** * Substrings (case-insensitive) that identify a transient GATT-not-ready * error, as opposed to a real failure worth surfacing immediately. */ gattReadyErrorPatterns?: string[]; } export declare const DEFAULT_GATT_READY_INITIAL_DELAY_MS = 300; export declare const DEFAULT_GATT_READY_TIMEOUT_MS = 3000; export declare const DEFAULT_GATT_READY_INTERVAL_MS = 250; export declare const DEFAULT_GATT_READY_ERROR_PATTERNS: string[]; export declare function runWithGattReadyRetry(attempt: () => Promise, options: GattReadyRetryOptions): Promise; //# sourceMappingURL=gatt-ready.d.ts.map