1 Reply Latest reply on Aug 30, 2016 9:57 PM by anpm

    BLE Bootloader authentication error

    user_65759023

      I had taken the BLE_OTA_External_Memory_Bootloader and bootloadable projects and modified it to use an EEPROM device. I had it working, but now when I try and download the firmware via the CySmart tool I get an authentication error message.

         

       

         

      [09:06:43:817] : 'Start Scan' request sent
      [09:06:43:822] : 'Command Status' event received
      [09:06:43:822] :     Status: BLE_STATUS_OK
      [09:06:43:834] : 'Scan Progress Result' event received
      [09:06:43:834] :     Discovered Item 1:
      [09:06:43:834] :     ------------------------
      [09:06:43:834] :     Advertisement Event Type: Connectable undirected
      [09:06:43:834] :     BD Address Type: PUBLIC_ADDRESS
      [09:06:43:834] :     BD Address: 23:46:2C:50:A0:00:00:00
      [09:06:43:834] :     Advertisement Event Data: 02:01:06:0F:09:41:53:53:70:72:61:79:50:61:74:74:65:72:6E:08:16:31:12:00:00:00:00:00
      [09:06:43:834] :     RSSI: -48 dBm
      [09:06:43:836] : 'Scan Progress Result' event received
      [09:06:43:836] :     Discovered Item 1:
      [09:06:43:836] :     ------------------------
      [09:06:43:836] :     Advertisement Event Type: Scan response
      [09:06:43:836] :     BD Address Type: PUBLIC_ADDRESS
      [09:06:43:836] :     BD Address: 23:46:2C:50:A0:00:00:00
      [09:06:43:836] :     Advertisement Event Data: 
      [09:06:43:836] :     RSSI: -49 dBm
      [09:06:44:751] : 'Stop Scan' request sent
      [09:06:44:756] : 'Command Status' event received
      [09:06:44:756] :     Status: BLE_STATUS_OK
      [09:06:44:756] : 'Scan Stopped Notification' event received
      [09:06:44:763] : 'Command Complete' event received
      [09:06:44:763] :     Status: BLE_STATUS_OK
      [09:06:48:707] : 'Set Local Device Security' request sent
      [09:06:48:707] :     Security Level: 0x10
      [09:06:48:707] :     Encryption Key Size: 16
      [09:06:48:707] :     Bonding: 0x00
      [09:06:48:707] :     Pairing properties: NONE
      [09:06:48:707] :     Secure connection only mode: Disable
      [09:06:49:199] : 'Command Status' event received
      [09:06:49:199] :     Status: BLE_STATUS_OK
      [09:06:49:199] : 'Command Complete' event received
      [09:06:49:199] :     Status: BLE_STATUS_OK
      [09:06:49:199] : 'Establish Connection' request sent
      [09:06:49:199] :     BD Address Type: PUBLIC_ADDRESS
      [09:06:49:199] :     BD Address: 23:46:2C:50:A0:00:00:00
      [09:06:49:204] : 'Command Status' event received
      [09:06:49:204] :     Status: BLE_STATUS_OK
      [09:06:49:234] : 'Establish Connection Response' event received
      [09:06:49:235] : 'Current Connection Parameters' event received
      [09:06:49:235] :     HCI Status: 0x00
      [09:06:49:235] :     Connection Interval: 8.75 ms
      [09:06:49:235] :     Slave Latency: 0
      [09:06:49:235] :     Supervision Timeout: 100 ms
      [09:06:49:236] : 'Command Complete' event received
      [09:06:49:236] :     Status: BLE_STATUS_OK
      [09:06:49:236] : 'Get Local Device Security' request sent
      [09:06:49:240] : 'Command Status' event received
      [09:06:49:240] :     Status: BLE_STATUS_OK
      [09:06:49:242] : 'Get Local Device Security Response' event received
      [09:06:49:242] :     Security Level: 0x10
      [09:06:49:242] :     Encryption Key Size: 16
      [09:06:49:242] :     Bonding: 0x00
      [09:06:49:242] :     Pairing properties: NONE
      [09:06:49:243] : 'Command Complete' event received
      [09:06:49:243] :     Status: BLE_STATUS_OK
      [09:06:49:243] : 'Exchange GATT MTU Size' request sent
      [09:06:49:243] :     MTU: 0x0200
      [09:06:49:244] : 'Update Connection Parameters Notification' event received
      [09:06:49:244] :     Connection Interval Minimum: 7.50 ms
      [09:06:49:244] :     Connection Interval Maximum: 7.50 ms
      [09:06:49:244] :     Slave Latency: 0
      [09:06:49:244] :     Supervision Timeout: 1000 ms
      [09:06:49:248] : 'Command Status' event received
      [09:06:49:248] :     Status: BLE_STATUS_OK
      [09:06:49:263] : 'Exchange GATT MTU Size Response' event received
      [09:06:49:263] :     MTU: 0x0017
      [09:06:49:263] : 'Command Complete' event received
      [09:06:49:263] :     Status: BLE_STATUS_OK
      [09:06:49:264] : 'Initiate Pairing' request sent
      [09:06:49:269] : 'Command Status' event received
      [09:06:49:269] :     Status: BLE_STATUS_OK
      [09:06:49:311] : 'Authentication Error Notification' event received
      [09:06:49:311] :     Status: AUTH_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE
      [09:06:49:312] : 'Terminate Connection' request sent
      [09:06:49:312] : 'Misc Event Notification' received
      [09:06:49:312] :     Event Code: 0x0029 (GAP_ENCRYPT_CHANGE)
      [09:06:49:312] :     Event Data: Encryption OFF
      [09:06:49:312] :     Event Data: [00]
      [09:06:49:316] : 'Command Status' event received
      [09:06:49:316] :     Status: BLE_STATUS_OK
      [09:06:49:320] : 'Connection Terminated Notification' event received
      [09:06:49:320] :     Reason: CONNECTION_TERMINATED_BY_LOCAL_HOST
      [09:06:49:321] : 'Connection Terminated Notification' event received
      [09:06:49:321] :     Reason: CONNECTION_TERMINATED_BY_LOCAL_HOST
      [09:06:49:322] : 'Set Local Device Security' request sent
      [09:06:49:322] :     Security Level: 0x10
      [09:06:49:322] :     Encryption Key Size: 16
      [09:06:49:322] :     Bonding: 0x01
      [09:06:49:322] :     Pairing properties: NONE
      [09:06:49:322] :     Secure connection only mode: Disable
      [09:06:49:330] : 'Command Status' event received
      [09:06:49:330] :     Status: BLE_STATUS_OK
      [09:06:49:331] : 'Command Complete' event received
      [09:06:49:331] :     Status: BLE_STATUS_OK
      [09:06:49:331] : 'Get Local Device Security' request sent
      [09:06:49:335] : 'Command Status' event received
      [09:06:49:335] :     Status: BLE_STATUS_OK
      [09:06:49:336] : 'Get Local Device Security Response' event received
      [09:06:49:336] :     Security Level: 0x10
      [09:06:49:336] :     Encryption Key Size: 16
      [09:06:49:336] :     Bonding: 0x01
      [09:06:49:336] :     Pairing properties: NONE
      [09:06:49:341] : 'Command Complete' event received
      [09:06:49:341] :     Status: BLE_STATUS_OK

         

      There are no error messages on the UART console. I've added some additional printouts:

         
          

      Bluetooth On, StartAdvertisement with addr: 00a0502c4623
      Entering bootloader mode
      BootloaderEmulator_Start
      BootloaderEmulator_HostLink
      Waiting for command
      Updating BLE message with scaled values
      Connected
      CyBle_L2capLeConnectionParamUpdateRequest API: 0x00
      EVT_GAP_DEVICE_DISCONNECTED
      Updating BLE message with scaled values
      Connected
      CyBle_L2capLeConnectionParamUpdateRequest API: 0x00
      EVT_GAP_DEVICE_DISCONNECTED

         
         

      I've gone back and compared all of the settings between the bootloadable project and my project and they appear to be identical. Has anyone else seen anything like this. 

         

       

         

      Thanks. 

         

      Nick

        • 1. Re: BLE Bootloader authentication error
          anpm

          Hi Nick,

             

          Did you checked the CySmart Security settings are matching with the security settings in bootloadable project?

             

          Please check in CySmart window : Configure master settings -> security parameters -> security level and bonding.

             

          If still you are facing the issue, please provide your project for testing. We appreciate if you can create a Tech Support case .

             

          Thanks,

             

          Anjana