Connect to sleeping android phone
Connect to sleeping android phone
How to connect to a sleeping android phone and receive it's Bluetooth “name” . The phone would be paired with the esp32. I need to be able to find up-to three different phone names and preform a different task depending on how many phones are found (0-3). So is there a way to connect to a sleeping android phone with Bluetooth as a car does?
Re: Connect to sleeping android phone
Have you tried using one of the example clients in the ESP32 BLE folder and connecting to the device? As long as you don’t require any custom services on the Android side then I’d try that.
You could even try an app on your phone or tablet to connect to the android device.
The only unknown for me is I think you’ll need to know either the BLE server’s broadcasting UUID or name to know that you need to connect to it (assuming your ESP32 is not running a LCD or other interface).
You could even try an app on your phone or tablet to connect to the android device.
The only unknown for me is I think you’ll need to know either the BLE server’s broadcasting UUID or name to know that you need to connect to it (assuming your ESP32 is not running a LCD or other interface).
Re: Connect to sleeping android phone
Thanks for the reply czuvich:
I tried the "esp-idf/examples/bluetooth/bt_discovery/" example and it does what I need but only when the android phone is in "visible mode" even after pairing the phone and the esp32. I think I need to connect with some service to be auto connected (like a car establishes a connection with a phone) buit that is where I am lost?
I tried the "esp-idf/examples/bluetooth/bt_discovery/" example and it does what I need but only when the android phone is in "visible mode" even after pairing the phone and the esp32. I think I need to connect with some service to be auto connected (like a car establishes a connection with a phone) buit that is where I am lost?
Re: Connect to sleeping android phone
Administrator:
I think this post might get more replies in the ESP32 IDF forum. Could you move it there?
Thanks
I think this post might get more replies in the ESP32 IDF forum. Could you move it there?
Thanks
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Connect to sleeping android phone
Sure. Moved Arduino -> ESP-IDF
Re: Connect to sleeping android phone
It’s possible while an Android device is in doze mode the BLE server is only available to “certified” clients.
I think this question is better suited on StackOverflow for connecting to Android in Doze. It may depend on the version of Android, hardware certification, etc. If you’ve got some Android dev chops, you could try running a custom app that exposes a foreground service and then try connecting to that. Do you have an example of an app that does what you’re wanting?
I think this question is better suited on StackOverflow for connecting to Android in Doze. It may depend on the version of Android, hardware certification, etc. If you’ve got some Android dev chops, you could try running a custom app that exposes a foreground service and then try connecting to that. Do you have an example of an app that does what you’re wanting?
Who is online
Users browsing this forum: No registered users and 206 guests