This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Secure connection between nRF51822 and Android Smartphone?

Hello, i'm programming an android app to connect to the nRF51822 (peripheral). Without any security or pairing settings everything works fine. The Problem: Any kind of authentication and encryption is needed, but in the final Product the nRF51822 has no display or keyboard. Is there any way to establish a secure, authenticated connection to the Chip under that conditions?

In addition to the problem, what is the difference between the "Properties" and the "Permissions" of a Characteristic and what are they used for?

Parents
  • Thank you for your helpful answer, Hung Bui.

    Unfortunately I don't get a "Insufficient Authentication" error (Code 5) in the Android app, instead there occurs error code 137 (0x89: GATT_AUTH_FAIL?). Although the solution works anyway it would be interesting to know what's the reason for this!?

    I have one more (off topic) question: Is there any way to abort the connection to an already paired device?

  • Chris: Could you let me know how do you initiate the bonding procedure ? We, actually, randomly had that error for no reason. It's pretty hard to find the root cause, more likely it's a Android stack's bug.

    Regarding your question do you means to delete bonding or to disconnect a connection with a paired device. I don't see any issue to disconnect to a paired device. You can just call mBluetoothGatt.disconnect(); To remove a paired device, you would need to unpair it from Android Bluetooth setting panel

Reply
  • Chris: Could you let me know how do you initiate the bonding procedure ? We, actually, randomly had that error for no reason. It's pretty hard to find the root cause, more likely it's a Android stack's bug.

    Regarding your question do you means to delete bonding or to disconnect a connection with a paired device. I don't see any issue to disconnect to a paired device. You can just call mBluetoothGatt.disconnect(); To remove a paired device, you would need to unpair it from Android Bluetooth setting panel

Children
No Data
Related