Android BLE peripheral with pin pairing
问题 I am developing an Android app which behaves as Bluetooth peripheral role with a service. When I start advertising, other Android devices searching for devices offering this service, can see my device (and can pair to it without pin) - ok. But how to enable PIN pairing? 回答1: You can force the device has to be paired, when using specific characteristics by protecting them with PERMISSION_READ_ENCRYPTED_MITM or PERMISSION_WRITE_ENCRYPTED_MITM. The client/central side can force pairing by