nrf52840 capture security level negotiation

I am using a nrf52840 dongle. I have my own device which has BLE and I am connecting to an app in mobile phone our bluetooth. My goal is to check for the security level what my device has and when it's getting connected with app I was trying to find if there is any security negotiation. To check this I am using the nrf52840 dongle for bluetooth sniffing so that I can check for the security negotiation. 

Based on this link I followed all the steps https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/topic/nrf-sniffer-for-bluetooth-le/

I have flashed firmware 4.1.1 version. 

I get the PDU type as 0x08 

In documentation there is nothing referencing to Packet ID 0x08. It says security level error and CRC is bad wanted to understand more on this.

Also how to check for security level negotiation which packet should I look for specifically? Also with the firmware version 4.1.1 can I get to know the security negotiation?

Parents
  • Hi, 
    Please send the whole sniffer trace. 
    I would suggest to follow the exercises in the academy course. Exercise 3 would walk you through inspecting a pairing process. 
    When a packet has CRC failure the content of the packet is not reliable and should be ignored unless you know that it's actually correct. 

  • Could you please share the link to that Exercise 3

  • Hi, 
    Due to company's policy we don't access google drive. Please attach the file  here. What's the issue of attaching the file ? I showed how you can attach via Insert -> Image/video/file


    Please make sure it's the export from Wireshark, similar to the one that you showed with the screenshot. 

  • complete_connection.pcapng

    This logs are from Android phone to my device.

    complete_connection_iphone.pcapng

     The logs when I connect iphone says insufficient authentication what could be the reason

     hope this is what you're expecting

  • Hi, 
    Thanks for the trace. I can read it now. 
    Could you tell which device was used in the test ? Did it run on our chip ? 

    In the Android trace, I don't see any response from the peripheral about Insufficient Authentication. This mean you may want to configure the characteristic to require encryption. This way it will force the phone to pair. 

    In the iPhone trace, it's the peripheral that's trying to do the read and get Insufficient Authentication response from the phone but the peripheral didn't request pairing after that. So you may want to implement the code to request pairing. Or you should wait for the phone to start pairing by doing what I suggested above. 

    Please be aware that if you are not using our chip, we can't really help you here as we don't know your device. 

  • Hi  ,

    The setup is like this nrf52840 dongle is connected to windows machine and to this windows machine my device is connected. I am trying to connect via bluetooth to my device using phone's nrf connect app. I have opened the wireshark in windows machine and filtered it based on my device mac address and sniffing. 

    So, I am trying to understand here when the device is getting paired what is the security level, is there any security level negotiation? The pairing is happening fine and I am able to send and receive data also[all these are done in application level code with my device to phone not with dongle please dont get confused here]. From the logs I dont see anything on LL_enc_start or ll_enc_req since I am using just works pairing. Just by seeing these wireshark logs can we conclude what level of security mode we are in.

    Hope this should be clear. Let me know if you have any more questions.

  • Hi again, 
    Yes I don't see any pairing in the trace you sent. I explained in the last reply. 
    I would suggest you to go through the exercises in lesson 5 and 6, especially at lesson 5. The exercise will show you how to configure the device so that pairing would happen automatically. 

    From that you can implement to your device. 

Reply Children
Related