2 Replies Latest reply on Sep 11, 2019 7:03 AM by StN._1917156

    Bug report: Connection Terminated Due to MIC Failure (0x3d) / WICED 6.2.1

    StN._1917156

      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:

      1. 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, 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?
      2. 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 [1] 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 [1] 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

        • 1. Re: Bug report: Connection Terminated Due to MIC Failure (0x3d) / WICED 6.2.1
          SheetalJ_96

          Hello StN._1917156,

           

          Please confirm if you are using WICED SDK 6.2.1? You can check /20719-B1_Bluetooth/wiced_tools/BTSpy for logs.

          I will test your problem and update as soon as possible.

          • 2. Re: Bug report: Connection Terminated Due to MIC Failure (0x3d) / WICED 6.2.1
            StN._1917156

            Hello,

            Confirmed it is 6.2.1 (as already stated in the title) - 6.4 doesn't work at all with my hardware

             

            The log that I've already posted is from BTSpy, but doesnt give me any clue except that the client (Android) terminated the connection because of MIC.

             

            Now here is the same passage from the same test when it pass Ok:

             

            17:31:40.884 RCVD [1] Event from HCI.  Name: HCI_Encryption_Change   (Hex Code: 0x08  Param Len: 4)

            17:31:40.884                                   Status : Success (0x00)

            17:31:40.884                        Connection Handle : 64 (0x0040)

            17:31:40.884                        Encryption Enable : 1 (0x01)

            17:31:40.889 1 hello_sensor_management_cback: c

            17:31:40.893 1 Encryption Status Event: bd ( 5a 10 0c ef 51 aa  ) res 0

            17:31:40.897 1 encryp change bd ( 5a 10 0c ef 51 aa  ) res: 0