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.

seeking help for connectivity issues in esp32 bluetooth with android

I found this code for connecting the bluetooth
#include “BluetoothSerial.h”

BluetoothSerial SerialBT;
bool isConnected = false;

void setup() {
Serial.begin(115200);
SerialBT.begin(“ESP32_BT”); // Bluetooth device name
Serial.println(“The device started, now you can pair it with Bluetooth!”);
}

void loop() {
if (SerialBT.hasClient()) {
isConnected = true;
Serial.println(“Connected”);
} else {
isConnected = false;
Serial.println(“Disconnected”);
SerialBT.disconnect(); // Ensure any previous connections are closed
delay(5000); // Wait for 5 seconds before attempting to reconnect
SerialBT.begin(“ESP32_BT”); // Restart Bluetooth
}

if (isConnected) {
// Handle your code when connected
}

delay(1000); // Check connection every second
}

but i can connect with this when the “serial bluetooth app “(available in playstore) for only serial communication but i want to make a home automation system with bluetooth so i want that when i am in range of esp then bluetooth will automatically connect with android and i can on off any device with my app

  1. DevHeads bot#9475
  2. DevHeads bot#9475

    This channel has been locked and archived

  3. techielew#0

    @melta101 I am going through these old posts and summoned this from the dead. However, I realize you may have some shared experience here.

    @lucifer2615. it would be great to hear if you were able to resolve this, and either way it’s a good reference for the future, @melta101.

  4. melta101#0

    if you’re serial comm is working, then the working is mainly on the andriod-app side,
    where you would need to read the the bluetooth data from the bluetooth adapter socket(don’t know the exact terminology from andriod, but the context would be the same as linux)

    related to autoconnection,
    is your ESP discoverable?

  5. melta101#0

    oh wow, just realized that the post is ancient

  6. melta101#0

    maybe before i joined

  7. techielew#0

    It’s only ancient if @lucifer2615. doesn’t respond. And even then, it lives on in spirit.

  8. techielew#0

    there was no ‘before you joined’. you are the alpha and the omega.

  9. techielew#0

    Let’s see if lucifer jumps back in and if not i’ll close, lock, and archive this post in a couple days.

  10. melta101#0

    yea.

  11. lucifer2615.#0

    So sorry about that mate!!, Kinda busy in some work but I’ll make sure that you get your reply by today…

  12. melta101#0

    it’s cool

  13. techielew#0

    Hey Luci,
    Any chance you could swing back with an update?

  14. lucifer2615.#0

    @techielew yeah sure, currently figuring out the custom web page for product and after that i will go to some api data extraction stage

  15. lucifer2615.#0

    if we can do a discord call or any other option that would be better

  16. techielew#0

    @lucifer2615. this and the question in your other post may be worth some advisement from @surfskidude

  17. lucifer2615.#0

    i didn’t understand sorry

  18. lucifer2615.#0

    @techielew

  19. techielew#0

    Check out this Xedge32 page on GitHub: https://github.com/RealTimeLogic/Xedge32

  20. techielew#0

    oops i should be in the other post thread

CONTRIBUTE TO THIS THREAD

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @chitour
    600 XP
  • 5.
    Avatar
    @lifegochi
    250 XP
  • 6.
    Avatar
    @Youuce
    180 XP