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

Enable notification on TX characteristics on nRF-UART after pairing without bonding

This is a follow-up question to devzone.nordicsemi.com/.../

I am using SDK_11 s130 on nRF51-dk.

I discovered that on nRF-UART Android app, notifications are not enabled by default if ble-app-uart is paired without bonding. This resulted in ble-app-uart not being able to transmit data to nRF-UART as notifications were disabled.

How can I enable notification on TX characteristics on nRF-UART after pairing with ble-app-uart without bonding? I am not an Android developer. Some hints as a starting point would be useful.

The nordic nRF-UART source code is found here; github.com/.../Android-nRF-UART

It would be even better if there is solution by changing the code on the nRF51 side without touching the Android code.

Parents
  • nRF UART for Android will try to write to the CCCD to enable notifications. If this requires a higher security level it return an error response, Insufficient Authentication. When Android receives this error it will initiate pairing. The app will however not try to write to the CCCD after pairing is completed.

    This is however done in the proximity app in nRF Toolbox, maybe you can find some clues there.

    Another solution may be to trigger pairing before the app tries to write to the CCCD. The peripheral can ask the central to initiate pairing by sending a security request, please see this. This is implemented in ble_app_gls, with the peer manager.

Reply
  • nRF UART for Android will try to write to the CCCD to enable notifications. If this requires a higher security level it return an error response, Insufficient Authentication. When Android receives this error it will initiate pairing. The app will however not try to write to the CCCD after pairing is completed.

    This is however done in the proximity app in nRF Toolbox, maybe you can find some clues there.

    Another solution may be to trigger pairing before the app tries to write to the CCCD. The peripheral can ask the central to initiate pairing by sending a security request, please see this. This is implemented in ble_app_gls, with the peer manager.

Children
No Data
Related