You can control a nearby ESP32 device from an Android app using Bluetooth Low Energy (BLE). The ESP32 advertises a GATT service; the app scans for it, connects, discovers its characteristics, and sends commands or reads status. This works for local control—not internet access—and is easiest to prototype with a development board and an LED before connecting any real appliance.
How the Android-to-ESP32 connection works
Android supports the BLE central role: an app can discover nearby devices, query their services, and exchange data. The ESP32 runs as a BLE peripheral, advertising its presence and exposing a GATT server. The two sides must agree on the service UUID, characteristic UUIDs, permitted operations, and message format. Android Developers’ BLE overview and Espressif’s ESP-IDF BLE API guide describe these platform roles and APIs.
BLE is designed for small control and status messages. A phone connected directly to the ESP32 must be nearby; Bluetooth alone does not provide an internet remote-control path.
Choose the ESP32 Bluetooth stack
ESP-IDF documents two relevant host stacks. The appropriate choice depends on whether the project needs Classic Bluetooth as well as BLE. Espressif notes that NimBLE uses less heap and flash than Bluedroid; check the target chip and ESP-IDF release before settling on either option because Bluetooth capabilities vary across ESP32-family variants.
#1 Best Overall
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Support LWIP protocol, Freertos
- SupportThree Modes: AP, STA, and AP+STA
- Ultra-Low power consumption, Compatible with Arduino IDE
- ESP32 is a safe, reliable, and scalable to a variety of applications
| Stack | Fits when | Documented trade-off |
|---|---|---|
| ESP-NimBLE | The project needs BLE only. | Lower heap and flash requirements than Bluedroid; it does not support Classic Bluetooth. |
| ESP-Bluedroid | The project needs BLE and Classic Bluetooth. | Supports both modes and uses more resources than NimBLE, according to Espressif. |
See Espressif’s Bluetooth overview for stack distinctions and chip-series-specific feature information.
Plan the GATT service and commands
Before writing firmware or app code, define a small data model for the device function. A simple lighting prototype might have a command characteristic that accepts an on/off value and a state characteristic that the app can read or subscribe to for updates. Those are design examples, not a mandated UUID scheme or payload standard: choose UUIDs and encoding for your project and implement the same contract on both sides.
Rank #2
- Dual-Core Performance Up to 240 MHz: Run sensor processing, wireless communication, automation logic and connected-device tasks on a 32-bit dual-core ESP32 platform designed for responsive embedded and IoT projects
- Built-in Wi-Fi and Bluetooth 4.2: Connect to 2.4 GHz Wi-Fi networks or use Bluetooth Classic and BLE for wireless sensors, smart devices, remote controls, home automation and other connected projects
- Flexible Power-Saving Modes: ESP32 power-management features support dynamic clock scaling and low-power operating modes, helping developers reduce energy use in compatible sensing, monitoring and connected-device applications, suitable for battery-powered Internet of Things (IoT) devices.
- USB-C Programming with CP2102: Connect through USB-C for power, sketch uploads and serial monitoring, while GPIO, UART, SPI and I2C interfaces support sensors, displays, motor drivers and other modules (USB-C cable not included)
- Over-the-Air Update Support: Configure OTA functionality through a compatible ESP-32 software framework to update deployed firmware over Wi-Fi without reconnecting the board by USB for every revision
- Assign a service UUID to the device function and characteristic UUIDs to command and state data.
- Specify whether each characteristic is readable, writable, or notifiable.
- Define valid payloads, units where relevant, and how firmware reports invalid commands.
- Decide what state the device should enter after a disconnect or invalid request.
Build and test the first prototype
- Confirm the board and target. Choose an ESP32 development board, identify its exact chip variant, and select the matching ESP-IDF target. Do not assume every product sold as an ESP32 has identical Bluetooth support.
- Select a stack. Use ESP-NimBLE for a BLE-only application, or ESP-Bluedroid if Classic Bluetooth is also required, subject to support on the selected chip and ESP-IDF release.
- Start with a low-risk output. Use a GPIO-controlled LED demonstration rather than an appliance. Espressif’s BLE getting-started tutorial walks through a development-board and phone example, including LED control.
- Implement advertising and the GATT server. Begin with Espressif’s documented examples and confirm that the phone can discover the ESP32 before troubleshooting command payloads.
- Implement the Android client. Check Bluetooth availability and enabled state, request the permissions the app needs, scan, connect, discover services, and exchange data through the agreed characteristics.
- Handle failure paths. Provide clear behavior for denied permissions, disabled or unavailable Bluetooth, a missing service, and a dropped connection. Reconnection and safe state behavior should be deliberate rather than assumed.
Request the right Android permissions
Permission requirements depend on the app’s target SDK and the Android versions it supports. For apps targeting Android 12 (API level 31) or later, Android’s Bluetooth permissions guide specifies runtime permissions for the BLE operations used: BLUETOOTH_SCAN to find nearby devices, BLUETOOTH_CONNECT to communicate with devices, and BLUETOOTH_ADVERTISE if the phone itself must be discoverable. Request only permissions needed for the app’s functions.
Location-related declarations depend on whether scan results are used to derive physical location and on compatibility needs. Android documents the neverForLocation option for apps that do not derive location from scan results, while warning that some BLE beacons may then be filtered out. Apps targeting Android 11 or lower follow the older Bluetooth and location-permission guidance on the same Android page.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #3
- Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
- Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
- Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
- Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
- Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.
Companion Device Manager can provide an alternative pairing flow for supported cases: Android’s system UI can pair on an app’s behalf without location permissions. Its suitability depends on the discovery and connection experience the app needs.
Protect device controls and choose the output carefully
Decide how the device authorizes commands before using BLE controls for anything consequential. Consider pairing or bonding expectations, whether a connected phone is trusted, protection for sensitive data, and the device’s behavior after loss of connection. Android cautions that data communicated over BLE may be accessible to other apps on the phone, so sensitive information needs appropriate application-layer protection.
Rank #4
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
- SupportThree Modes: AP, STA, and AP+STA
- Ultra-Low power consumption, Compatible with Arduino IDE
- 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters
A GPIO LED is a useful initial demonstration, but it does not establish that a relay or appliance connection is safe. For a later output stage, check load voltage and current, switching type, logic-level compatibility, isolation, enclosure, and behavior on power loss or firmware failure. The suitability of a particular relay depends on its specifications and the intended installation; no specific module or load is established here.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Understand the limits of Bluetooth control
This design supports nearby phone-to-device control. If the user needs to operate the device from outside Bluetooth range, the project needs a separate network architecture; do not treat BLE itself as remote access. Range and reliability also depend on the selected hardware and environment, so validate the intended location rather than assuming a universal distance.
Quick Recap
Best Value
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Ultra-Low power consumption, works perfectly with the Arduino IDE
- Support LWIP protocol, Freertos
- SupportThree Modes: AP, STA, and AP+STA
- ESP32 is a safe, reliable, and scalable to a variety of applications
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

