Become a leader in the IoT community!

New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!

Step 1 of 5

CREATE YOUR PROFILE *Required

Change Email
OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Collaboration & Work 🤝
Learn & Grow 📚
Contribute Experience & Expertise 🔧
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware & Design 💡
Embedded Software 💻
Edge Networking
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. Our community uses Answer Overflow to index content on the web. By posting in this channel your messages will be indexed on the worldwide web to help others find answers.
  7. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Any one has any idea about connecting hc – 06 bluetooth module to esp32 bluethooth

hey guys any one has any idea about connecting hc – 06 bluetooth module to esp32 bluethooth

  1. umeshlokhande#0000

    Just use basic client-server architecture. Let’s say for example hc-06 module to be used as a client and by programming ESP32’s bluetooth to act as a server so as to establish communication

  2. accur4te#0000

    i tried various codes for the same , all of them are not working . i am unable to get any good article/page for it , can you suggest any article for the same

  3. 32bitwidesaviour#0000

    If you are asking about physical connection, H6-06 can be connected via UART.

  4. accur4te#0000

    i am asking about the bluetooth pairing

  5. marveeamasi#0000

    Have u try setting up the ESP32 in Bluetooth Serial mode with `BluetoothSerial`

    HC 06 uses **Bluetooth Classic**, so code it to handle pairing as a Bluetooth Serial device, not BLE. Once you ve gotten the ESP32 set as a server, make sure its discoverable and try pairing with AT commands from HC 06

  6. marveeamasi#0000

    Then check this ESP32’s `BluetoothSerial` library examples cus they re a good starting point for Classic Bluetooth pairing

  7. enthernetcode#0000

    If u want to directly use the `ESP32’s` built-in Bluetooth functionality, you can opt for `Classic Bluetooth` or `Bluetooth Low Energy` (BLE) depending on your project. `Classic Bluetooth` is great for continuous data exchange, while `BLE` is optimized for low-power, intermittent communication.

    #include "BluetoothSerial.h"
    #include 
    #include 
    
    BluetoothSerial ESP_BT;  // Classic Bluetooth object
    
    void setup() {
      Serial.begin(115200);
    
      // Classic Bluetooth setup
      ESP_BT.begin("ESP32_BT_Device");  // Name the device
      Serial.println("Classic Bluetooth Device is Ready to Pair");
    
      // BLE setup
      BLEDevice::init("ESP32_BLE_Server");  // Name the BLE server
      BLEServer *pServer = BLEDevice::createServer();
      Serial.println("BLE Server is Running");
    }
    
    void loop() {
      // Handle Classic Bluetooth data
      if (ESP_BT.available()) {
        char received = ESP_BT.read();
        Serial.write(received);  // Echo received data
      }
    
      // BLE logic can be added here as needed for advanced configurations
    }
    
  8. Umesh Lokhande#0000

    Here’s a discussion where you’ll find it worked with core version 2.0.6. Please follow the entire conversation <https://github.com/espressif/arduino-esp32/issues/6876>. It seems to be an issue with the HC-06 & library version conflict

CONTRIBUTE TO THIS THREAD

Browse other questions tagged