5340, Zephyr failure to connect to Polar Heart rate strap; ble wireshark trace

Hi ,

I have compiled in Heart rat relay into my app; can scan and connect to simulator and garmin HR straps; but fail to connect to polar.
My debug log shows...



So security is encryption, no auth and I get an "unspecified" error.

I have done a BLE wireshark trace; but cannot see anything in the trace to indicate the issue.

Would be grateful if someon could look and give me a clue to whats going wrong.

Here is wireshark trace....

polarHrmActiveScanConnectFail.pcapng

Regards,

Owain

  • Hi Owain, 


    Could you please re-upload the sniffer trace ? 

  • Hi Owain, 

    Yes I can see the new trace now. 
    The new trace shows the exact same situation compared to the last one you sent back in May last year. The nRF5 didn't send the pairing confirm and then the slave disconnected. 
    I don't know why the central worked that way. 

    As I suggested earlier, have you tried to use the central_hr example we have in the SDK to see if it work ? 

    Your central code, does it work with other HR strap ? Did it do bonding with other strap ? 

    I would need to see how you configure the central , to see if there is any issue with security configuration. 

  • I just took another trace to be sure. Yes that is the trace.
    Here the debug log ones sees for such a sequence.....

    033[1;32mnovaPro>\033[mbt central heart connect 0
    \033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:24.080,566] \033[0m<inf> app: Updated MTU: TX: 23 RX: 23 bytes
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:24.080,932] \033[0m<inf> app: Central connected to F0:C9:75:7D:CB:FF (random)
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:24.080,993] \033[0m<inf> app: security is currently 1
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:24.082,550] \033[0m<inf> app: security set to BT_SECURITY_L2
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:24.086,486] \033[0m<inf> app: System got EVENT_BLE_PERIPHERAL_CONNECTED\033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:40.088,104] \033[0m<inf> app: Pairing failed: F0:C9:75:7D:CB:FF (random) reason: 9
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:40.088,348] \033[0m<inf> app: Security failed: F0:C9:75:7D:CB:FF (random) level 1 err 9
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:40.088,409] \033[1;31m<err> bt_gatt_dm: Discover failed, error: -128.\033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:40.088,470] \033[0m<inf> app: Could not start the discovery procedure, error code: -128
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:40.094,299] \033[0m<inf> app: Peripheral disconnected (reason 0x08)
    \033[0m
    \033[1;32mnovaPro>\033[m\033[8D\033[J\033[1;32mnovaPro>\033[m\033[8D\033[J[00:03:40.105,041] \033[0m<inf> app: System got EVENT_BLE_PERIPHERAL_DISCONNECTED\033[0m
    \0

    What we see here is in the connected() callback; where I check the security level before sayng I wish to set the L2.

    Then 16 seconds later we see the securityChanged() callback with the level 1 error 9; followed by we drop into try and do the gatt_disover().

    Looking into the bluetooth trace (I am not that familiar with these low level BLE protocols); packet 2568 at time 23.20s the slave sends the master a "SMP receved pairing random"; after which we just see empty PDU's tll approx 41s when the connection is dropped and the heartstrap starts advertising again.


    So what is Noridic BT stack doing in those 16 seconds where the connencton is up; but t has not reported the success or failure; till the end of the 16 seconds where the error is reported?

    I will try and get a better trace.




Related