6 Replies Latest reply on Jan 14, 2015 6:37 PM by leo_su

    Hello-Sensor re-connection failure when security enabled.

      ===

      SDK: 2.1.

      Tag: 920737.

      app: hello-sensor.

      ===


      Problem:

      When enable hello_sensor_cfg's
      encr_required = SECURITY_ENABLED | SECURITY_REQUEST

      --> when phone button disconnection, device can not get plan_air_connection_down() from lower-layer

      so the re-connection can not be successful.


      but if

      encr_required = 0

      --> The disconnection from phone is ok and we can re-connect with device again.


      it seems to be related with codes below,

          if (bleprofile_p_cfg->encr_required != 0)

          {

          if (emconninfo_deviceBonded())

          {

          ble_trace0("device bonded");

          }

          else

          {

          ble_trace0("device not bonded");

             lesmp_pinfo->pairingParam.AuthReq  |= LESMP_AUTH_FLAG_BONDING;

                  lesmp_sendSecurityRequest();

          }

              return;

          }


      so any other places go wrong??