Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Pairing neccesary in order to read/write characteristics

Hello

Recentlly, our application with android device and nrf52, we need to do pairing process with android device in order to read characteristic from nrf52. The pairing process exits with error on phone but then, is possible to read characteristic.

Other phones do not need to do pairing process in order to work.

From nrf52 firmware perspective, there is something I am missing?

Thanks in advance.

Parents
  • Hi,

    In order for a mobile phone to read characteristics from a BLE device they first need to establish a connection. It is only possible to get data without establishing a connection if you put the data in the advertisement payload.

    Could you please provide a bit more detail about what you mean by pairing? Also, is this problem only present on a specific Android phone? In that case which one?

    Ketil

  • Hi,

    I mean by pairing when enter on Android adjust -> Bluetooth -> Available Devices and our blutooth device appear on screen. Pressing on our device, pairing process begin.

    The phones which are causing troubles are Huawei.

    We are handling this issue, doing pairing process programatically on Android. Our bluetooth device reject pairing process on BLE_GAP_EVT_SEC_PARAMS_REQUEST event:

    sd_ble_gap_sec_params_reply(p_ble_evt->evt.gatts_evt.conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);

    After doing this, read/write characteristics is possible.

    Andres

  • Hi,

    Thank you for the explanation. With BLE it should not be necessary (and is not recommended) to pair the device as you do with Bluetooth Classic. Your programmatic approach seems correct.

    We have seen issues reported with certain low-end Huawei phones such as P8-Lite and P9-Lite. Are you using any of these? Have you tried with a high-end Huawei phone?

    Have you seen our source code examples for Android? Please take a look and let me know if you find a solution. If not I can ask one of our Android developers for assistance.

    Ketil

Reply
  • Hi,

    Thank you for the explanation. With BLE it should not be necessary (and is not recommended) to pair the device as you do with Bluetooth Classic. Your programmatic approach seems correct.

    We have seen issues reported with certain low-end Huawei phones such as P8-Lite and P9-Lite. Are you using any of these? Have you tried with a high-end Huawei phone?

    Have you seen our source code examples for Android? Please take a look and let me know if you find a solution. If not I can ask one of our Android developers for assistance.

    Ketil

Children
Related