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

Pairing without entering the PIN

H,

I have a problem, that I can connect to my BT device without entering the PIN upon first paring.
The device is based on nRF52832 and I followed peripheral_sc_only sample, which I found sets the correct security level for required pairing.
I am using: Zephyr OS build v2.4.0-ncs1

Here is also my prj.conf (there are also other settings, but I believe those are important for mandatory pairing):

# Enable settings                                                               
CONFIG_BT_SETTINGS=y                                                            
CONFIG_FLASH=y                                                                  
CONFIG_FLASH_PAGE_LAYOUT=y                                                      
CONFIG_FLASH_MAP=y                                                              
CONFIG_NVS=y                                                                    
CONFIG_SETTINGS=y                                                               
# Enable explicit pairing                                                       
CONFIG_BT_SMP=y                                                                 
CONFIG_BT_SMP_SC_ONLY=y                                                         
CONFIG_BT_TINYCRYPT_ECC=y                                                       
CONFIG_BT_FIXED_PASSKEY=y                                                       
#CONFIG_BT_SMP_ENFORCE_MITM=y                                                   
CONFIG_BT_BONDING_REQUIRED=y  

When I use nRF Connect on my phone, I can see the device on the Scan tab and if I click connect, the dialog for pairing appears, but also the services discovered.
If I click Cancel and quickly on one of the services discovered, I can then click on all of them and can send data to my device.

Is there any other option I need to turn on, so I can make paring "really" mandatory?

Thanks,
Matej

Parents
  • Hi

    Susheel is currently out of office, so I have been assigned this case until he's back. What he requests in his first reply is a Sniffer trace, either using an Sniffer tool like the Ellisys sniffer or similar, or our nRFSniffer which lets you use an nRF52 DK or Dongle to see what exactly is going on over the air. This way we should be able to see what exactly happens when you're able to "bypass" the pairing and discover services without doing this process.

    Best regards,

    Simon

  • Hi,

    sorry for this late reply, but we needed to order nRF52840 dongles and we needed to wait for them to come to the office.
    Today I have connected everything, erased the whole Flash in my device and programmed the test application.
    Connected the sniffer and captured the traffic. File can be downloaded from here (please note, it will expire in 15 days! Could not find an option to attach the file to this post.)

    I tested the application again and I was able to connect to the device without paring.
    Like I said, when the pairing dialog appears (the services are already listed in the application) and if I quickly click cancel and send some that over UART service, I can stay connected without the pairng.

    If you need anything else, please let us know.

    BR,
    Matej

  • sorry for the late reply. I was away few days and have downloaded the files just now. I will take a look at them today and will comeback to you with my observations. Thanks a lot for your patience.

Reply Children
No Data
Related