This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52840 random disconnection

Good morning,

We have a new equipment based on the nRF52840 and s140.

                Just now, a new problem has appeared and it is very strange, as it seems to be a ‘random’ error:

 

                We have already assembled tens of equipment, and most of them are perfectly working with any smartphone (using both your ‘nRF Connect’ application or our own application).

                But, we have a few smartphones that show a strange behavior: they are able to perfectly connect to some of our nRF52840-based equipment, and in a few ones, they are able to connect but they get disconnected after a few seconds. Same equipment is connecting to other smartphones without problems (without disconnecting).

                This is (step by step) what it is happening a few times:

  • Equipment (nRF52840) is advertising.
  • Smartphone stablish connection with equipment using pin number
  • First time, the connection is perfectly working.
  • If smartphone is disconnected and connected back again with same equipment (Already bonded), then connection is stablished but smartphone disconnects after 30”, approximately. Same behavior is happening with both nRF connect application and our own application. Looking at log in nRF application we see: ‘Connection terminated by peer (status 19)’or ‘GATT_CONN_TIMEOUT’

 

Why is it happening?

Which is the reason?

How can we solve this?

 

 Could you help us? (For your information, we have set MIN_CONN_INTERVAL to 7.5m and MAX_CONN_INTERVAL to 100ms)

Thank you

  • Thank you so much.

    I will try to catch that trace with sniffer.

    In what regards legacy bonding: which is the parameter I have to set instead of LESC? (Some messages above, I specified how bonding is setup)

    Kind regards,

    Dani

  • Hi Dani, 

    If you want to disable LESC you can set SEC_PARAM_LESC = 0 in peer_manager_init().

    And to make it easier for the sniffer set : 

    sec_param.io_caps      = BLE_GAP_IO_CAPS_NONE;

    Please keep other settings as-is.

  • Furthermore, in what regards my application: We are doing write and read requests and also indications.

    Most of the services that are implemented have two characteristics: one for transmission and one for reception. All of them are similarly implemented.

    I have just send the implementation of one of this services to Brian: he will sent it to you.

    Let me know your assessment.

    Regards,

    Dani.

  • Hi Dani, 

    I don't see anything suspicious from your service file. It's almost identical to our NUS (UART) service. 
    Please try to capture the sniffer trace (with MITM setting remove, you can use BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM instead). 

  • First of all I have set SEC_PARAM_LESC = 0 with no bonding, I have tried to connect to nRFConnect Application. After discovering services, my device should constantly send information to smartphone, and now, it is not receiving nothing.

    Please, look at attached log output from nRFConnect tool


    I have also saved the sniffer trace following next procedure (Attached):

    - Device advertising

    - Device connected using nRFConnect (with Wireshark all frames appear as empty, and as I have said, looking at nRFConnect, no services information is given)

    - Device is disconnected from nRFConnect and it starts advertising again

    Hope it helps

    Dani

Related