The Protocol Divide: SPP vs. GATT

When makers and engineers talk about using Bluetooth with Arduino, they are usually conflating two fundamentally different wireless protocols: Bluetooth Classic and Bluetooth Low Energy (BLE). Understanding this distinction is the most critical step in your communication stack design.

Bluetooth Classic relies on the Serial Port Profile (SPP). It emulates a standard UART serial cable over the air. It is robust, handles continuous high-throughput data streams, and connects natively to Android devices and Windows PCs. However, it is entirely unsupported by Apple's iOS ecosystem for general app data transfer without specific MFi certification.

Conversely, BLE utilizes the Generic Attribute Profile (GATT). Instead of a continuous serial stream, BLE organizes data into hierarchical structures: Profiles, Services, and Characteristics. According to the Bluetooth SIG Technology Overview, GATT is optimized for short, bursty data transfers, consuming microamps in sleep states, making it ideal for battery-powered sensor nodes and universally compatible with iOS, Android, and modern web browsers via WebBluetooth.

Hardware Selection in 2026: Beyond the HC-05

For years, the HC-05 and HC-06 modules were the undisputed defaults for Arduino Bluetooth projects. However, the landscape has shifted dramatically. Here is a breakdown of the current hardware ecosystem:

ModuleProtocolLogic LevelEst. Price (2026)Best Use Case
HC-05 / HC-06Classic (SPP)3.3V (5V tolerant TX)$4.50 - $6.00Legacy Android telemetry, RC cars
HM-10 (CC2541)BLE 4.03.3V$5.00 - $8.00iOS sensor nodes, low-power beacons
ESP32-C3 (Standalone)BLE 5.0 + WiFi3.3V$2.00 - $3.50Modern IoT, WebBluetooth, high-density networks

Note: In 2026, sourcing genuine HC-05 modules is becoming difficult, and the market is flooded with clones running CSR8645 chips that exhibit erratic baud-rate behaviors. For new designs, the ESP32-C3 is the recommended standard, offering native BLE 5.0 and Arduino IDE compatibility via the ESP32 core.

Critical Wiring: The 5V to 3.3V Logic Trap

The most common point of failure when integrating Bluetooth with Arduino Uno or Mega boards (which operate at 5V logic) is frying the module's RX pin. While many modules feature onboard 3.3V voltage regulators for power, their data pins are strictly 3.3V tolerant.

⚠️ Hardware Warning: Never connect a 5V Arduino TX pin directly to a 3.3V Bluetooth RX pin. Doing so will degrade the module's silicon over time, leading to corrupted packets and eventual permanent failure.

The Voltage Divider Solution:

  • Connect Arduino TX to a 1kΩ resistor.
  • Connect the other end of the 1kΩ resistor to the Bluetooth RX pin.
  • Connect a 2kΩ resistor from the Bluetooth RX pin to GND.
  • Connect Arduino RX directly to Bluetooth TX (3.3V is safely read as HIGH by the 5V Arduino).

Configuring Classic Bluetooth via AT Commands

If you are using an HC-05, you must configure it using AT commands before deployment. The HC-05 has two modes: Data Mode (default, 9600 baud) and AT Command Mode (38400 baud).

Entering AT Mode

  1. Disconnect power from the HC-05.
  2. Press and hold the micro-tactile switch on the module (or pull the KEY pin to 3.3V).
  3. Apply power while holding the button.
  4. Release the button. The onboard LED should now blink slowly (once every 2 seconds).
  5. Open the Arduino IDE Serial Monitor, set the baud rate to 38400, and select Both NL & CR.

Essential AT Commands

AT+NAME=FluxSensorNode   (Sets the broadcast name)
AT+PSWD=1234           (Sets the pairing PIN)
AT+UART=115200,0,0     (Sets data baud rate to 115200)
AT+ROLE=0              (0 = Slave, 1 = Master)

For software-based serial routing on the Arduino, utilize the Arduino SoftwareSerial Documentation to free up the hardware UART for debugging.

Understanding BLE: Services, Characteristics, and UUIDs

When transitioning to BLE, you abandon the concept of a "serial stream." Instead, you define a GATT server. According to the Espressif ESP-IDF Bluetooth API, a BLE peripheral exposes data via UUIDs (Universally Unique Identifiers).

  • Service UUID: Acts as a folder. For example, a custom environmental sensor might use 4fafc201-1fb5-459e-8fcc-c5c9c331914b.
  • Characteristic UUID: Acts as a file inside that folder. A temperature reading might be beb5483e-36e1-4688-b7f5-ea07361b26a8.

When your Arduino (acting as the BLE peripheral) updates the value of the Characteristic, any connected central device (like a smartphone app) that has "subscribed" to notifications will instantly receive the payload. This event-driven architecture is vastly superior to polling a serial buffer.

Real-World Failure Modes and Debugging

Even with perfect wiring, protocol-level misunderstandings cause project stalls. Here are specific edge cases and their solutions:

1. The iOS "Invisible Module" Problem

Symptom: Your HC-05 is powered, blinking, and visible to Android/Windows, but completely invisible to an iPhone's Bluetooth settings.

Cause: iOS restricts Bluetooth Classic (SPP) visibility in the main OS settings to prevent unauthorized accessory connections. iOS only supports BLE in the native settings menu, or Classic via specific MFi apps.

Fix: Migrate to an HM-10 or ESP32 running BLE. Alternatively, use a specific terminal app that supports background SPP scanning, though native iOS settings will never show the device.

2. SoftwareSerial Packet Corruption at High Speeds

Symptom: AT commands work at 9600 baud, but switching to 115200 baud results in garbage characters and failed pairings.

Cause: The Arduino Uno's ATmega328P cannot reliably handle SoftwareSerial interrupts at 115200 baud while simultaneously executing user code. Timing jitter corrupts the start bits.

Fix: Cap SoftwareSerial at 38400 baud. If 115200 baud is strictly required for high-frequency sensor data, you must use an Arduino Mega (which has 3 hardware UARTs) or migrate to an ESP32.

3. BLE Connection Drops Under Load

Symptom: ESP32 BLE disconnects from the smartphone exactly when the Arduino triggers a relay or motor.

Cause: Electromagnetic interference (EMI) from the relay coil, or a localized voltage brownout on the 3.3V rail. BLE RF transmission requires peak current bursts of up to 130mA.

Fix: Add a 100µF tantalum capacitor directly across the VCC and GND pins of the Bluetooth module. Physically separate the module's antenna trace from DC motor wiring by at least 5cm.