pairing

Programmatically pairing with a BLE device on Android 4.4+

China☆狼群 提交于 2019-11-27 18:09:01
Does anyone have a complete working example of how to programmatically pair with a BLE ( not Bluetooth Classic) device that uses passkey entry (i.e. a 6-digit PIN) or Numeric Comparison on Android 4.4 or later? By 'programmatically' I mean I tell Android the PIN - the user isn't prompted. There are many similar questions about this on SO but they are either a) about Bluetooth Classic, b) old (before setPin() and createBond() were public), or c) unanswered. My understanding is as follows. You connect to the device and discover its services. You try to read a 'protected' characteristic. The

Android Bluetooth Pairing without User Enter Pin and Confirmation Using Android API

五迷三道 提交于 2019-11-27 00:31:53
问题 I'm a beginner in Android programming since I only started 3 months ago. I'm doing a project which connects the android app to arduino using bluetooth. I already have a code for the android app (bluetooth.adapter,sockets,.etc.). The code for connection is already working. One of the goal is for the android app to automatically input the password when pairing with the bluetooth device without asking user to input the PIN. The old posts on this forum do not help much. (many suggested using

Auto-accept bluetooth pairing possible?

跟風遠走 提交于 2019-11-26 23:11:12
问题 In the Android 2.3.3 BluetoothChat example with with createInsecureRfcommSocketToServiceRecord() API, users are still prompted to accept the pairing request, even though no PIN code is presented. Is there a way to automate Bluetooth pairing request without user intervention? Or is this never possible due to security concerns? I have been looking online for 2 days now and haven't really found much, so if anybody knows, please post. Thanks! 回答1: Not with the standard API, no: if the MAC address