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

Long pairing time with secure connection

I'm using the nrf52810 with S112 in peripheral mode. Using the example blinky firmware and mobile app works perfectly with my Android and iPhone. However when I add in passkey pairing with LESC it takes over 30 seconds after the passkey entry on my phone to finish connection and able to communicate in the blinky app. What can I do to improve this time? I use micro-ecc because I don't have flash space for the alternative. Thanks

Parents
  • Hi dtran, 

    I would suggest to capture a sniffer trace so we can inspect that caused the 30 seconds delay. 

    The sequence chart for the LESC process is described here

    We need to look into how you calculate the DHKey . Do you use peer manager ? Have you called nrf_ble_lesc_request_handler() in the main loop (usually inside idle_state_handle() ) . The DH key calculation should be done in main context. 

  • ble-lesc.pcapngble-lesc_2.pcapng

    I uploaded two capture files from Wireshark. It seems to be doing a lot of this for more than 30 seconds:

    310 16.364429 Slave_0x649749d3 Master_0x649749d3 SMP 47 Rcvd Pairing Random
    311 16.724143 Master_0x649749d3 Slave_0x649749d3 SMP 47 Sent Pairing Confirm
    312 16.724541 Slave_0x649749d3 Master_0x649749d3 LE LL 26 Empty PDU
    313 17.084151 Master_0x649749d3 Slave_0x649749d3 LE LL 26 Empty PDU
    314 17.084381 Slave_0x649749d3 Master_0x649749d3 SMP 47 Rcvd Pairing Confirm
    315 17.444158 Master_0x649749d3 Slave_0x649749d3 SMP 47 Sent Pairing Random

Reply
  • ble-lesc.pcapngble-lesc_2.pcapng

    I uploaded two capture files from Wireshark. It seems to be doing a lot of this for more than 30 seconds:

    310 16.364429 Slave_0x649749d3 Master_0x649749d3 SMP 47 Rcvd Pairing Random
    311 16.724143 Master_0x649749d3 Slave_0x649749d3 SMP 47 Sent Pairing Confirm
    312 16.724541 Slave_0x649749d3 Master_0x649749d3 LE LL 26 Empty PDU
    313 17.084151 Master_0x649749d3 Slave_0x649749d3 LE LL 26 Empty PDU
    314 17.084381 Slave_0x649749d3 Master_0x649749d3 SMP 47 Rcvd Pairing Confirm
    315 17.444158 Master_0x649749d3 Slave_0x649749d3 SMP 47 Sent Pairing Random

Children
Related