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

BLE 4.2 reading Characteristic

Hello,

Recently I was using nRF Connect app to test BLE 4.2 Communication between my Android Device and nrf51422 board. updated the hardware device so the LE Secure Connections are established every time. when I try to connect to Android Nexus 5x (Nougat 7.1.1), the first time, the device displays a pop-up stating that a pairing should be established so that I can continue the communication. once I tap on pair, the device connects and I will be able to read the characteristic found. Apparently, the second attempt will fail with nRF Connect and will only succeed once I forget the device I paired with from the device Bluetooth Settings. The problem is that I was not able to read the Characteristics from the App I'm using (Even if I accept the pair request from the device). This works on and IOS device that supports Bluetooth 4.2 after a successful pair between the phone and the BLE Device. Any Suggestions or samples on how to establish a successful BLE Communication (read and write on a Characteristic) with LE Secure Connections on Android Devices ?

  • FormerMember
    0 FormerMember

    Does your nRF51422 device store the bonding information, or is the bonding information deleted upon a disconnect?

    Do you have an extra nRF51-DK or a nRF51-Dongle? If so, could you use the sniffer to track what is being transferred over the air the second time the Android phone connects to the nRF51422? And upload the sniffer trace here?

    The sniffer should be used with Wireshark, and it works best with version 1.10, not one of the newer versions. Wireshark can be downloaded here:

  • Hi Kristin,

    Finally found an nRF51-DK and installed the recommended sniffer along with its wireshark extension. This is the trace to what was transferred over the air trace.pcapng.

    The nRF51422 address is: "ff:dc:75:a2:db:ac" and its public name is "Pay". I used these filters on wireshark:

    • btle.adv_addr==ff:dc:75:a2:db:ac
    • btle.128b_uuid==a6:5e:bb:2d:3d:30:49:81:9d:b2:19:96:d8:81:18:a0

    Could not really observe what you suggested or the packets that correspond to whats happening the second time the Android phone connects to the nRF51422. Maybe you can better interpret and observe what's happening.

    Regarding "bonding information", it seems that nRF51422 stores these info. But my question here is that what exactly these info correspond to? Is it a good practice that we delete the bonding information from the central (Available on Android not on IOS). Also if these info should be deleted from the peripheral side, should that be before connecting to the device?

    Your answer is highly appreciated, Thank you.

  • FormerMember
    0 FormerMember in reply to Moussa Aw

    The sniffer trace does only show the advertising packets. In wireshark, could you do the sniffing without using any filters?

    The stored bonding information is encryption information. When re-connecting to a bonded device, it is not necessary to share encryption keys to obtain a secure link, because the two devices in the link already have the necessary encryption information.

  • Actually, the attached trace is in fact without any filtering. This can be observed by the different devices present in the trace. What I meant was the above 2 filters mentioned can be applied to the trace so that you can detect the packets that correspond to the device the phone is connecting to.

  • FormerMember
    0 FormerMember in reply to Moussa Aw

    Could you do the sniffing again? I can only see advertising packets in the sniffer log..

Related