BLE Connection
Understanding BLE Connections
Connection establishment: the central scans for advertisers, sends CONNECT_IND, and both devices synchronize timing. From then on, the central sends a packet at every connection event; the peripheral responds within 150 μs. If no data is pending, empty packets maintain synchronization. Each event hops to a new channel per the channel map.
Key parameters: connection interval (how often events occur), slave latency (how many events the peripheral can skip), and supervision timeout (how long before a lost connection is declared). These trade off responsiveness, throughput, and power consumption.
Slave latency: 0 to 499 events
Supervision timeout: 100 ms to 32 s
Effective interval with latency:
Teff = CI × (1 + slave_latency)
Connection Lifecycle
| Phase | Duration | Action |
|---|---|---|
| Discovery | 10 ms - 10 s | Central scans, finds advertiser |
| Connect | ~1.25 ms | CONNECT_IND sent |
| Service discovery | 50-500 ms | GATT attribute enumeration |
| Data exchange | Ongoing | Read/Write/Notify via GATT |
| Disconnect | ~1 ms | LL_TERMINATE_IND |
Frequently Asked Questions
Central vs peripheral?
Central initiates/manages connection (phone). Peripheral advertises and accepts (sensor). BLE 4.1+ allows dual role.
What is GATT?
Structures data as Services and Characteristics with read/write/notify. Heart rate monitor: HR Service with HR Measurement Characteristic.
Connection vs advertising?
Advertising: one-way broadcast. Connection: bidirectional, acknowledged, encrypted. Use connections for interactive and reliable data.