Note: This tutorial was originally published on effessdev.github.io. Check out the original article for the most up-to-date version: https://effessdev.github.io/posts/2026-08-27/

This tutorial covers how to use Bluetooth Low Energy (BLE) with your ESP32 (ESP-IDF). It's based on the official documentation by Espressif Systems, which you can view here.

This is a step-by-step tutorial, focusing on the implementation rather than every single detail. So you can follow along from the beginning to the end. Let's start!

Enabling BLE in ESP-IDF

Before you can use BLE, you have to enable it using Menuconfig. There are two ways to do this.