Keep getting those errors when connecting bonded Cysmart to CYW20719:
Status : Connection Terminated Due to MIC Failure (0x3d)
Encryption Status Event: bd ( 5a 10 0c ef 51 aa ) res 8109
The CYW20719 hardware is CYBT_413034_EVAL.
Clients are Samsung TAB E 7” and Tab A 8” tablets with Android 4.4.4, 5.0.1 and 6.0.1
This error happens:
- Always if I pair let say Cysmart client1 on Android device 1 and disconnect, then pair another let say Cysmart client2 on Android device 2 and disconnect, RESET the CYW20719, then when return back to device1 and try to connect to CYW20719 (on Cysmart button on the right side shows ‘Paired’) so just click on the name of the CYW20719 a.k.a ‘Hello’ to reconnect and always (100%) will get ‘Connection Terminated Due to MIC Failure (0x3d)’. So there is some logic to get error in this situation, because ‘hello_sensor’ code stores bonding info only for 1 bonding, but why this error will be MIC – isn’t MIC (message integrity check) something similar to CRC?
- Random – this is the most annoying problem, because it happens when only one Device is bonded and only this device trying to reconnect – sometimes connect, sometimes fail with the same MIC failure error (0x3d). And I tried plenty of different devices and Android OS versions: 4.4.4, 5.0.1, 6.0.1 and happened only with CYW20719.
So I already rise this problem couple months ago, but haven’t receive any solution (neither on any of the bugs I reported so far ☹ ), but at least:
Do you have some sniffer tool that could capture raw packets (incl. MIC) in the communication client <> server so to compare what is the difference when reconnecting go smooth and when fail?
Either there is something wrong on the Cypresses BT stack side or something in the timing parameters/syncs in the connection ☹ The only clue I could guess – slower processors with Android have more MIC failures than faster ones ☹ , but when I try reconnecting bonded CC2540 from TI, don’t have any problems neither with Cysmart, nor nRf Connect or other BLE Android clients on the same Android devices that fails with CYW20719 ☹
17:29:09.988 1 hello_sensor_management_cback: 17
17:29:09.992 1 Advertisement State Change: 0
17:29:09.992 1 ADV stop
17:29:09.994 RCVD  Event from HCI. Name: HCI_Encryption_Change (Hex Code: 0x08 Param Len: 4)
17:29:09.994 Status : Connection Terminated Due to MIC Failure (0x3d)
17:29:09.994 Connection Handle : 64 (0x0040)
17:29:09.994 Encryption Enable : 0 (0x00)
17:29:09.996 1 hello_sensor_management_cback: c
17:29:10.003 1 Encryption Status Event: bd ( 5a 10 0c ef 51 aa ) res 8109
17:29:10.007 1 encryp change bd ( 5a 10 0c ef 51 aa ) res: 8109
17:29:10.010 RCVD  Event from HCI. Name: HCI_Disconnection_Complete (Hex Code: 0x05 Param Len: 4)
17:29:10.010 Status : Success (0x00)
17:29:10.010 Connection Handle : 64 (0x0040)
17:29:10.010 Reason : 61 (0x3d)
17:29:10.010 Connection Terminated Due to MIC Failure
17:29:10.014 1 connection_down 5a 10 0c ef 51 aa conn_id:1 reason:61