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.

CC2640: Input error pairing passcode, Must to disconnect the phone app(light blue) then the program will entry the passcode callback.

Part Number: CC2640

Hi All

Very thanks for your help.

Sample code:Glucose

Pairing setup:

passkey = 123456

bonding = TRUE

mitm = TRUE

pairMode = GAPBOND_PAIRING_MODE_INITIATE

Phone connect to cc2640 use light blue app.

When the cc2640 will be paired then I keyin error passcode then press "Pairing".

At this time, The light blue must be disconnect first then the program will entry the passcode call back.

Where can I get the immediate error response after I keyin error passcode then press "Pairing" on light ble app?

Because I need to call my function right away after I keyin error passcode and press "Pairing" on light blue.

-------------------------------------------------------------------

Hi Tim
Please let me describe more.
[Step 1]
I hope the flow is:
phone app(lightblue...etc) --> connect to cc2640 --> pairing & input error passcode(still connected) --> get debug message(pairing failed)
But I test result is:
phone app(lightblue...etc) --> connect to cc2640 --> pairing & input error passcode(still connected) --> ""phone disconnect with cc2640"" --> get debug message(pairing failed)

[Step 2]
static void GlucoseSensor_processPairStateEvt(uint8_t state, uint8_t status)
{
     If (state == GAPBOND_PAIRING_STATE_COMPLETE) {  It’s what you said. Pairing complete
          if (status == success) {
                Pairing is success
          }
          else {
                Pairing is failed.
               Debug_message()
                If the user keyin error passcode:
                The user must be disconnected with cc2640 and then I can get the message.
        “””””” I can’t get the debug message before the user disconnects.”””””

               How can I get message right away when the user keyin error pairing passcode and still connected ?
               Or are there other setting that are not enabled?
          }
     }
}