[nRF Connect SDK] Pairing failure

Target nRF52832(nrf52dk_nrf52832)
SDK NCS v2.0.0

original case
(+) [nRF Connect SDK]Force to make pairing(bonding) - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

Here is my test step. (Nordic: peripheral role)

1) Nordic begins advertising (custom UUID like peripheral_uart sample)
2) Android app gets predefined bt mac (example 00:16:7F:11:22:36).
There were no BLE scan. and connect to Nordic.

3) Nordic connected and initiate pairing
bt_set_bondable(true);
bt_conn_set_security(conn, BT_SECURITY_L4);

Result
Much of case my Android (MTK) failed to make pairing. (Especially right after android rebooted) 

MTK have told me Nordic should provide solution to resolve this issue.

RTT Viewer
00> Connected secmode 4
00> HS connected
00> HS Connected 00:16:7F:40:1E:D0 (public)
00> D:
00> D: 00:16:7F:40:1E:D0 (public)
00> D: prnd 7d93ec3b4828ce3b4210d054f903653a
00> D: chan 0x20001f54 cid 0x0006
00> D: status 0x8
00> D: chan 0x20001f54 conn 0x20001c90 handle 0 encrypt 0x00 hci status 0x1f
00> Security failed: 00:16:7F:40:1E:D0 (public) level 1 err 9
(Android public mac 00:16:7F:40:1E:D0)

2772.sf650_error_03Nov2022.7z



BTW, Nordic required sniff log for analyzing pairing error. However, I hardly get sniff log.
I can get CONNECT_IND then drops next packets. Do you have any idea?






nrf_sniffer_for_bluetooth_le_4.1.1
wireshark 4.0.1
nRF52DK dev borad
J-Link 6.88a


Parents
  • 00> HS:Advertising successfully started
    00> D: 55:A6:42:65:6B:D0 (random)
    00> D: No IRK for 55:A6:42:65:6B:D0 (random)
    00> D: conn 0x20001c88 handle 0
    00> D: chan 0x20001f4c cid 0x0006
    00> D: 55:A6:42:65:6B:D0 (random)
    00> Connected secmode 4
    00> HS connected
    00> HS Connected 55:A6:42:65:6B:D0 (random)
    00> D: 
    00> D: 55:A6:42:65:6B:D0 (random)
    00> D: created 0x200029dc for 55:A6:42:65:6B:D0 (random)
    00> D: prnd 23a14c89ca6eb11b5c0c56610146bb35
    00> Connection parameters updated.
    00>  interval: 6, latency: 0, timeout: 500
    00> Conn params updated: interval 7 ms, latency 0, timeout: 5000 ms
    00> W: Ignoring unexpected request
    00> W: Ignoring unexpected request
    00> D: chan 0x20001f4c cid 0x0006
    00> D: status 0x8
    00> D: 55:A6:42:65:6B:D0 (random) (keys 0x0000)
    00> D: Deleting key bt/keys/55a642656bd01
    00> D: chan 0x20001f4c conn 0x20001c88 handle 0 encrypt 0x00 hci status 0x1f
    00> Security failed: 55:A6:42:65:6B:D0 (random) level 1 err 9 
    00> D: 55:A6:42:65:6B:D0 (random)
    00> D: 00:00:00:00:00:00 (public) (keys 0x0000)
    00> D: Deleting key bt/keys/0000000000000
    00> D: 55:A6:42:65:6B:D0 (random)
    00> D: 55:A6:42:65:6B:D0 (random)
    00> Disconnected: 55:A6:42:65:6B:D0 (random) (reason 19) 
    00> HS:Advertising successfully started

    sniff.7z

    sniff log is uploaded as well as rtt log.
    Your message will be forwarded to MTK HQ again.

    I have no idea what made following error. Can you please find in sniff log?
    00> D: chan 0x20001f4c conn 0x20001c88 handle 0 encrypt 0x00 hci status 0x1f

  • Hi Tim,

    Sorry but I feel confused a bit about your situation here.

    I am not sure how that case is related to this current question. Could you please elaborate?

    Much of case my Android (MTK) failed to make pairing. (Especially right after android rebooted) 

    MTK have told me Nordic should provide solution to resolve this issue.

    Does MTK mean MediaTek?

    What reasoning did they give to believe Nordic should provide the solution to resolve this issue?

    On my end, I attempted to pair using bt_conn_set_security() as you did, and both my Android phone and my Windows PC can bond with the device without any problem.
    Pairing at Security Level 4 like you are trying to do also require an out of band verification method. On your RTT log I don't see signs of this happened. What did you do to achieve this?

    Tim Hwang said:
    I have no idea what made following error. Can you please find in sniff log?
    00> D: chan 0x20001f4c conn 0x20001c88 handle 0 encrypt 0x00 hci status 0x1f

    That is not an error. It is most likely just a log from smp.c. See sdk-zephyr/smp.c.

    Finally, I would like to ask for a few pieces of information to understand the situation better:

    What is your current setup?
    What module did you enable logging to acquire the RTT log you shared?
    Is there a specific sample are you experimenting on?
    What SDK version are you on?
    These pieces of information help making sense out of the logs you provided.

    Best regards,

    Hieu

  • 6. CONFIG_BT_SMP_ENFORCE_MITM=n
    -> It seems that there was no difference.

  • Hi Tim,

    My apology for the long wait with no follow up.

    I am having some health issues and will likely be out of office for a few more days.

    I will let you know when I can reply to your question as soon as possible.

    Hieu

  • I hope you get better. 

    I sent Nordic Evaluation board to my partner in China, and they can reproduce this issue.
    Further analysis is delayed due to covid19 in China. I will ask you again when MTK request is arrived.
    I'll hold this case until then.

    Thank you.

  • Hello.

    Now we got solution from MTK HQ.
    We should change firmware in MTK's BT chipset.
    BLE pairing works well with new SW.

    Thanks for your support.

  • Hi Tim,

    Thanks for letting us know. Good luck with your future endeavors.

    Hieu

Reply Children
No Data
Related