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.

CC2640R2F: CC2640 BLE MODULE- INCORRECT PASSKEY - ACKNOWLEDGEMENT

Part Number: CC2640R2F

Dear Team,

Urgent !!!!!!!!!!

While connecting our cluster with IOS,

If wrong passkey entered, then no error msg will be triggered in Iphone.

But check with another cluster(Other supplier ),Error Domain=CBATTErrorDomain Code=128 "Unknown ATT error."  this error will be triggered.

Please let us know why the error msg not triggered while entering wrong passkey.

  • Hi,

    Thank you for reaching the support. Could provide us with the SDK version you're using?

    Could you also ensure that an "Unknown ATT error" is expected when entering a wrong passkey while pairing a device to an IOS?

    Finally, could you share a Bluetooth sniffer trace when entering the wrong passkey while pairing the CC2640R2F and of the other supplier?

    Please do not expect answer before May 21st as May 17th and May 20th are public holiday here.

    Regards,

    Tanguy

  • Dear Team,

    Please find the details in below,

    1. Could provide us with the SDK version you're using?

    SDK 4.30.0.08 and BLE 5 stack

    1. "Unknown ATT error" is expected when entering a wrong passkey while pairing a device to an IOS

    App developer asking the error to display “incorrect passkey entered” popup in mobile application.

    1. Finally, could you share a Bluetooth sniffer trace when entering the wrong passkey while pairing the CC2640R2F and of the other supplier

    Kindly find the attached log details in below,

    1.Log-IOS-IncorrectPin-Other supplier

    2.Log-IOS-IncorrectPin-Pricol – Pricol

  • Hi,

    Could you reupload the Bluetooth logs please, they do not appear in your reply.

    Regards,

    Tanguy

  • Please find the logs below,Log-IOS-IncorrectPin-Other supplier.docx

    15:12:01,Scanner,normal,Scanner On.
    15:12:01,Scanner,normal,Device Scanned.
    15:12:01,Scanner,debug,[Callback] centralManager(central, didDiscover: peripheral, advertisementData: ["kCBAdvDataLocalName": KFU00_0012341234, "kCBAdvDataRxSecondaryPHY": 0, "kCBAdvDataRxPrimaryPHY": 0, "kCBAdvDataIsConnectable": 1, "kCBAdvDataTimestamp": 737458921.60189, "kCBAdvDataServiceUUIDs": <__NSArrayM 0x280ebca80>(
    E837D9A2-9C49-4493-9547-8E6918A59CA8
    )
    ], rssi: -43)
    15:12:10,Connected Device,verbose,Attempting to connect...
    15:12:10,Connected Device,debug,cbCentralManager.connect()
    15:12:11,Connected Device,debug,[Callback] centralManager(central, didConnect: peripheral)
    15:12:11,Connected Device,normal,Connected.
    15:12:11,Connected Device,verbose,Discovering Services...
    15:12:11,Connected Device,debug,peripheral.discoverServices(nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverServices: nil)
    15:12:11,Connected Device,normal,Discovered Device Information and E837D9A2-9C49-4493-9547-8E6918A59CA8 Services.
    15:12:11,Connected Device,verbose,Discovering Characteristics for Device Information...
    15:12:11,Connected Device,debug,peripheral.discoverCharacteristics(nil, for: 180A)
    15:12:11,Connected Device,verbose,Discovering Characteristics for E837D9A2-9C49-4493-9547-8E6918A59CA8...
    15:12:11,Connected Device,debug,peripheral.discoverCharacteristics(nil, for: E837D9A2-9C49-4493-9547-8E6918A59CA8)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverCharacteristicsFor: 180A, error: nil)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic System ID...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A23)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic Model Number String...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A24)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic Serial Number String...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A25)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic Firmware Revision String...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A26)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic Hardware Revision String...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A27)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic Software Revision String...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A28)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic Manufacturer Name String...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A29)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic IEEE 11073-20601 Regulatory Certification Data List...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A2A)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic PnP ID...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 2A50)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverCharacteristicsFor: E837D9A2-9C49-4493-9547-8E6918A59CA8, error: nil)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic 64AECB40-849A-44F1-934F-ADDC4B316423...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 64AECB40-849A-44F1-934F-ADDC4B316423)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic B792A4BB-DB87-436A-9066-DB63C5FB3F00...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: B792A4BB-DB87-436A-9066-DB63C5FB3F00)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic F535DD6E-7975-4ABD-9719-491E38A81179...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: F535DD6E-7975-4ABD-9719-491E38A81179)
    15:12:11,Connected Device,verbose,Discovering Descriptors for Characteristic 36E8614B-2DED-45C1-9AD3-C9F59A01F21E...
    15:12:11,Connected Device,debug,peripheral.discoverDescriptors(for: 36E8614B-2DED-45C1-9AD3-C9F59A01F21E)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A23, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A24, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A25, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A26, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A27, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A28, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A29, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A2A, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 2A50, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 64AECB40-849A-44F1-934F-ADDC4B316423, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: B792A4BB-DB87-436A-9066-DB63C5FB3F00, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: F535DD6E-7975-4ABD-9719-491E38A81179, error: nil)
    15:12:11,Connected Device,debug,[Callback] peripheral(peripheral, didDiscoverDescriptorsFor: 36E8614B-2DED-45C1-9AD3-C9F59A01F21E, error: nil)
    15:12:11,Connected Device,normal,Discovered Characteristics System ID, Model Number String, Serial Number String, Firmware Revision String, Hardware Revision String, Software Revision String, Manufacturer Name String, IEEE 11073-20601 Regulatory Certification Data List, and PnP ID for Service Device Information.
    15:12:11,Connected Device,normal,Discovered Characteristics 64AECB40-849A-44F1-934F-ADDC4B316423, B792A4BB-DB87-436A-9066-DB63C5FB3F00, F535DD6E-7975-4ABD-9719-491E38A81179, and 36E8614B-2DED-45C1-9AD3-C9F59A01F21E for Service E837D9A2-9C49-4493-9547-8E6918A59CA8.
    15:12:11,Connected Device,normal,Characteristic System ID has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic Model Number String has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic Serial Number String has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic Firmware Revision String has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic Hardware Revision String has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic Software Revision String has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic Manufacturer Name String has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic IEEE 11073-20601 Regulatory Certification Data List has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic PnP ID has no Descriptors.
    15:12:11,Connected Device,normal,Characteristic 64AECB40-849A-44F1-934F-ADDC4B316423 has no Descriptors.
    15:12:11,Connected Device,normal,Discovered Client Characteristic Configuration for Characteristic B792A4BB-DB87-436A-9066-DB63C5FB3F00
    15:12:11,Connected Device,normal,Characteristic F535DD6E-7975-4ABD-9719-491E38A81179 has no Descriptors.
    15:12:11,Connected Device,normal,Discovered Client Characteristic Configuration for Characteristic 36E8614B-2DED-45C1-9AD3-C9F59A01F21E
    15:12:15,Connected Device,debug,[Callback] centralManager(central, didDisconnectPeripheral: peripheral, error: The specified device has disconnected from us.)
    15:12:15,Connected Device,normal,Disconnected.

  • Hi,

    Can you comment the log you provided, when is the pairing started and when the passkey is sent?

    Could you also share the following details to speed up the debugging process:

    • Are you using an out of the box example? 
    • How do you start the pairing process? are you writing to a specific characteristic that requires authentications?
    • Could you also share your passcode handler and make sure it's similar to SimplePeripheral_processPasscode from the ble_simple_peripheral project?

    Regards,

    Tanguy

  • Hi Expert,

    Please find the details in below,

    1.Are you using an out of the box example?

        No, In Pricol cluster we are using simple peripheral example for our application.

    2. Are you writing to a specific characteristic that requires authentications?

        No, In Pricol clusters not writing to a specific characteristics for pairing process. 

    3. Please find the Passcode function snip attached with mail details in below,

        Passcode event - Word document

        

     Passcode event.docx 

  • Hi,

    Thank you for sharing more information,

    An "Unknown ATT error" shouldn't occur when entering a wrong passkey, according to the BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 3, Part H Section 3.5.5 Pairing Failed a "Pairing Failed packet" should be sent after entering the wrong passkey and this exactly what happen with TI's Implementation (see logs below)

    Regards,
    Tanguy

  • Dear Tanguy,

    As of my understanding from your last reply is that while entering incorrect passkey an error message should be triggered in the central device.

    Observation from our bench level testing - While entering in correct passkey getting Log in NRF app as below.

    "Connected Device, debug, [Callback] centralManager (central, didDisconnectPeripheral: peripheral, error: The specified device has disconnected from us.)" 

    Query : Is it possible to change the error message other than the above mentioned error message (Ex:Incrorrect passkey entered, Encryption failed) while entering incorrect passkey? (Because the app is common for the peripheral device built with telit and ti module as it is looks like disconnection message)

     

  • Hi,

    You can prevent the device from disconnecting when entering the wrong passkey by changing the bonding fail action. Please add the following snippet to SimplePeripheral_init().

    uint8_t bondFail = GAPBOND_FAIL_NO_ACTION;
    GAPBondMgr_SetParameter(GAPBOND_BOND_FAIL_ACTION, sizeof(uint8_t), &bondFail);

    For additional reference please take a look at GAP Bond Manager Parameters and Bonding Failure Actions in the API documentation.

    Regards,
    Tanguy

  • Dear Expert,

    Even implemented the "bond fail = GAPBOND_FAIL_NO_ACTION" in our code we get "error: The specified device disconnected from us" .No  change in the error message before and after implementation.

    But, When i configured  "GAP_TerminateLinkReq(connHandle_test, HCI_DISCONNECT_AUTH_FAILURE) " instead of "GAP_TerminateLinkReq(connHandle_test, HCI_DISCONNECT_REMOTE_USER_TERM)" i am getting "error: unknown error" which is expected.

    Please let me know, What the above change means whether it cause any impact in other functionalities. 

  • Hi,

    The above change doesn't impact the other functionalities, it just changes the reason of the disconnection sent in the LL_TERMINATE_IND command.

    Regards,
    Tanguy