Preparing search index...

    Interface GATTSubscriptionDescriptor

    Declarative GATT setup. The provider executes the full lifecycle (connect → discover → subscribe → periodic writes) autonomously and re-executes on disconnect.

    interface GATTSubscriptionDescriptor {
        mac: string;
        service: string;
        failover?: {
            enabled: boolean;
            migrationHoldTime?: number;
            migrationThreshold?: number;
        };
        init?: { data: string; uuid: string; withResponse?: boolean }[];
        notify?: string[];
        periodicWrite?: {
            data: string;
            intervalMs: number;
            uuid: string;
            withResponse?: boolean;
        }[];
        poll?: { intervalMs: number; uuid: string; writeBeforeRead?: string }[];
    }
    Index
    mac: string

    Target device MAC

    service: string

    Primary service UUID

    failover?: {
        enabled: boolean;
        migrationHoldTime?: number;
        migrationThreshold?: number;
    }

    Failover configuration

    Type Declaration

    • enabled: boolean

      Enable failover to another provider on disconnect (default: true)

    • OptionalmigrationHoldTime?: number

      Seconds the better signal must hold before migrating (default: 60)

    • OptionalmigrationThreshold?: number

      dBm advantage required for proactive migration

    init?: { data: string; uuid: string; withResponse?: boolean }[]

    One-time writes after connection (hex-encoded data)

    notify?: string[]

    Characteristic UUIDs to subscribe for notifications

    periodicWrite?: {
        data: string;
        intervalMs: number;
        uuid: string;
        withResponse?: boolean;
    }[]

    Periodic writes (hex-encoded data)

    poll?: { intervalMs: number; uuid: string; writeBeforeRead?: string }[]

    Characteristics to poll at intervals