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

nRF52840 start sending data after bonding

Good morning,

We have developed a prototype based on the nRF52840. We have also developed an Android application.

When smartphone has device already bonded the application is perfectly working.

Nevertheless, we have found a problem at the beginning, when smartphone wants to bond the device the first time: when device is bonded the first time, after entering the PIN code, smartphone is connected with the device and smartphone is able to receive data from device. Nevertheless, if smartphone tries to send data to device, this data is not received in the device side. At this moment, if smartphone is disconnected from device and the it connects again, then communications are perfectly working in both directions. So, do you know which can be the reason of this behaviour?? I have tried with different smartphones, and result is the same in all of them.

All the best,

Dani.

Parents Reply
  • Hi Amanda:

    NRF_SDH_BLE_GAP_EVENT_LENGTH 251

    gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
    gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
    gap_conn_params.slave_latency = SLAVE_LATENCY;
    gap_conn_params.conn_sup_timeout = CONN_SUP_TIMEOUT;

    , where:

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.5 seconds). */
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) /**< Maximum acceptable connection interval (1 second). */
    #define SLAVE_LATENCY 0 /**< Slave latency. */
    #define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /**< Connection supervisory timeout (4 seconds). */

    I will try to also have a sniffer trace.

    Dani

Children
Related