Bluetooth Low Energy
Low-power wireless technology in the Bluetooth Core Specification (4.0+), used by most battery-powered IoT devices.
technology
also known as BLE, Bluetooth LE, Bluetooth Smart
Knowledge about Bluetooth Low Energy
- Android 12+ BLE permissions: BLUETOOTH_SCAN, BLUETOOTH_CONNECT and the neverForLocation trapwarning · unverified · Since Android 12, BLE scanning needs BLUETOOTH_SCAN and connecting needs BLUETOOTH_CONNECT. The neverForLocation flag avoids the location permission but filters some beacons from scan results.
- BLE 1M vs 2M vs Coded PHY: choosing for range, throughput and batterycomparison · unverified · Bluetooth 5 offers LE 1M, LE 2M and LE Coded (500 kbps S=2 / 125 kbps S=8). Use 2M for throughput and shorter airtime, Coded for range, 1M for maximum compatibility.
- BLE RSSI distance estimates are rough: use proximity zones, not meterswarning · unverified · Beacon distance is estimated from RSSI relative to a calibrated transmit power at 1 m. Every reading is noisy and environment-dependent, so treat estimates as 'immediate / near / far' and smooth over time, never as precise positions.
- BLE for IoT devices: roles, GATT and the numbers that matterguide · unverified · Orientation for building BLE IoT devices: GAP roles, the GATT data model, advertising vs connections, and the limits you hit first.
- BLE notifications are cut to 20 bytes until you negotiate the MTUwarning · unverified · The default ATT MTU of 23 bytes limits each notification to 20 bytes. Negotiate a larger MTU and enable Data Length Extension to send up to 244 bytes per packet.
- BLE pairing security for IoT: use LE Secure Connections, understand Just Worksguide · unverified · Legacy BLE pairing can be cracked from a sniffed pairing exchange. Use LE Secure Connections (ECDH, Bluetooth 4.2+) and an association model with MITM protection where it matters, and add application-level security.
- Choosing BLE connection parameters for battery life and latencyguide · unverified · How connection interval, peripheral latency and supervision timeout trade battery life against responsiveness, with the constraints the spec enforces.
- Designing BLE advertising: 31 bytes, intervals and privacyguide · unverified · Legacy advertising carries 31 bytes of data (plus 31 in the scan response); extended advertising in Bluetooth 5 carries much more. Pick intervals for discovery time vs battery, and don't rely on a fixed address.
- ESP32 Wi-Fi and BLE share one radio: expect drops unless you configure coexistencewarning · unverified · ESP32 Wi-Fi and Bluetooth share a single 2.4 GHz RF front end and are time-multiplexed, so heavy Wi-Fi traffic reduces BLE scan and connection performance. Enable software coexistence and follow Espressif's recommendations.
- ESP32 as Bluetooth proxy for Home Assistant: setup, connection slots and placementguide · unverified · An ESPHome bluetooth_proxy extends Home Assistant's BLE range. Use ESP-IDF (less memory), prefer Ethernet boards, keep the proxy free of heavy components, and don't raise active connection slots beyond what ESPHome recommends.
- Pico W wireless: shared pins, antenna keep-out, and the commercial licence for CYW43 and BTstackguide · unverified · The CYW43439 radio connects over SPI and shares pins with the VSYS voltage monitor and its IRQ line, keep metal away from the antenna, and the libcyw43/BTstack libraries are free for commercial use only on Pico W boards or RP2040/RP2350 + CYW43439 designs.
- Read and subscribe to BLE sensors from Python with Bleakcode · unverified · Minimal async Python gateway: scan for a device by name, connect, read a characteristic and subscribe to notifications with Bleak on Linux, macOS or Windows.
- Safe firmware updates over BLE with MCUboot and MCUmgr (Zephyr)procedure · unverified · Upload a signed image over BLE with MCUmgr/SMP, boot it in test mode, and confirm it from the new firmware only after a self-test, so MCUboot reverts automatically if the update is broken.
- Which ESP32? S3 vs C3 vs C6 vs H2 at a glanceguide · unverified · ESP32-S3 is dual-core Xtensa with vector instructions, C3 is a single-core RISC-V, C6 adds Wi-Fi 6 and IEEE 802.15.4, and H2 has 802.15.4 and BLE but no Wi-Fi.
- iOS never shows the BLE MAC address: don't use it as device identitywarning · unverified · Core Bluetooth identifies peripherals by a system-generated UUID, not the Bluetooth address, and that UUID differs between phones. Put your own device ID into advertising data or a characteristic.