This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: connect iPhone without any secure connection

Part Number: CC2340R5

Hi,

      I am using CC2340R5 basic_ble peripheral  code with ANCS.

Here the GATT permissions for the characteristics in peripheral and bond settings

 

static gattAttribute_t simpleGattProfile_attrTbl[] =
{
 /*------------------type-----------------*/ /*-----------permissions-----------*/ /*-----------------pValue----------------*/
   // Simple Profile Service
   GATT_BT_ATT( primaryServiceUUID,           GATT_PERMIT_READ,                      (uint8 *) &simpleGattProfile_Service ),

   //**********************************************************************************************************************************

   // Characteristic 1 Declaration
   GATT_BT_ATT( characterUUID,                GATT_PERMIT_READ,                      &simpleGattProfile_Char1Props ),
   // Characteristic Value 1
   GATT_ATT( simpleGattProfile_char1UUID,  /*GATT_PERMIT_READ |*/ GATT_PERMIT_WRITE,  &simpleGattProfile_Char1 ),
   // Characteristic 1 User Description
//   GATT_BT_ATT( charUserDescUUID,             GATT_PERMIT_READ | GATT_PERMIT_WRITE,                      simpleGattProfile_Char1UserDesp ),
   //**********************************************************************************************************************************

   GATT_BT_ATT( characterUUID,                GATT_PERMIT_READ,                      &simpleGattProfile_Char4Props ),
     // Characteristic Value 4
     GATT_ATT( simpleGattProfile_char4UUID,  /*GATT_PERMIT_READ|*/GATT_PERMIT_WRITE,                     &simpleGattProfile_Char4 ),
     // Characteristic 4 configuration
     GATT_BT_ATT( clientCharCfgUUID,            GATT_PERMIT_READ | GATT_PERMIT_WRITE,  (uint8 *) &simpleGattProfile_Char4Config ),


  //**********************************************************************************************************************************

With android without passkey I can connect with peripheral. When am trying to connect an mobile where passkey need to provide in iPhone. But I need to connect  iPhone  with no any secure connection.

Here the link of ANCS source code  from TI GitHub

https://github.com/TexasInstruments/ble_examples/blob/simplelink_cc2640r2_sdk-2.20/examples/rtos/CC2640R2_LAUNCHXL/bleapps/ancs/src/app/ancs.c#L116

Need to know what changes is required to connect an iPhone without any secure connection.

SDK Version : simplelink_lowpower_f3_sdk_7_40_00_64 (peripheral)

CCS version: CCS 12.5.0

Thanks.

Vignesh.

  • Hi Vignesh,

    I am afraid the code you have shared only contains the logic to decipher the ANCS packets, it does not deal with pairing or connection.

    In order to progress on this topic, I would recommend to check if the IPHone or the CC2340 initiate the pairing request. It will then be possible to get a sense of what has to be done to avoid this. Could you please provide such BLE sniffer log?

    Best regards,

  • Hi Clement,

         Here the BLE sniffer log  of iPhone and android. Peripheral device configured has no secure connection.

    Where in the log iPhone has initiate the pairing request.

    Is there is any possible way to connect iPhone without passkey or popup to peripheral.

    6332.log.rar

    Thanks,

    Vignesh.

  • Hi Vignesh,

    Thank you for providing the log.

    Based on our analysis:

    1. The CC2340 tries to send a write request to the IPHONE on handle 0x2c
    2. Then the phone responds with an Insufficient Authentication
    3. So the CC2340 sends a security request to the phone
    4. The Iphone eventually sends the pairing request

    In order to move forward, could you please help locate in the code the GATT write operation mentioned before? You should then ensure this operation is not sent unless the devices are already paired.

    I hope this will help,

    Best regards,