简体   繁体   中英

Not able to pair device to Android Bluetooth

I am trying to pair TI CC2564 module with Android (5.0) and Android (6.0).

5.0 : It never connects through the device settings. But I can use it from my app with call to function createRfcommSocket . Issue here is that I need to connect the device manually every time I reopen the app.

6.0 : I am able to pair the device through device settings occasionally and it is hit and miss. Once I pair the device it works flawlessly in the app. But if I remove the pairing and try to pair again it doesn't allow me to pair with the following error in Logcat Device is not allowed because it is either insecure or of unknown security and needs user confirmation

Any suggestion regarding how to get the device pair?

I was able to resolve the issue. The Bluetooth module's broadcast name is null by default, giving it a proper name allows the connection to succeed flawlessly. I am guessing there is some issue with either Android or CC2564 BT stack, which might be causing a crash and hence disconnecting.

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