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

Reply
  • 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

Children
Related