简体   繁体   中英

Android automatic Bluetooth connection

When I turn on Bluetooth on my Android device and my Bluetooth speaker is in range, the phone automatically connects to the speaker, without me doing anything other that turning on Bluetooth.

I want to be able to do this with a Bluetooth module I am using in my Arduino Project. I wasn't able to find anything on that topic, but if my Chinese speaker does it, surely there must be a way mimic this behaviour.

My project involves Arduino, HC-05 module, and an android app. For now the connection is initiated with a button click inside the app. Is there a way to auto connect to the module before even starting an app? You connect to it, just by turning on Bluetooth on your device.

Record the physical address of your peripheral and start a connection each time you discover that particual address. Programatically, that's all you can do. Else, you would have to do it manually from your Bluetooth settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM