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.

CC256XM4BTBLESW: Lost Pairing on Reset Device

Part Number: CC256XM4BTBLESW

I work with the SPPDemo.

I send to SPPDemo:



pair 1 1

open 1 1

Then the port open needs 100 ms to connect.

When I reset the device, and send


open 1 1

the Open needs 3000 ms

The System have Lost the pairing.

What can I do to hold the pairing after reset?

I write back the KeyLink from

I write back the LinkKeyInfo with LinkKey Values what I get from atLinkKeyCreation after pairing bevore reset.

But  SPP_Open_Remote_Port does not use LinkKeyInfo.

And I get no Authentication callback from remote device after SPP_Open_Remote_Port.

This is the reason I can not send GAP_Authentication_Response with the LinkKeyInfo to the Device.

What we need is, the same speed for SPP_Open_Remote_Port then bevore Reset.

I dont want send an pairing after reset because it is too slow.

  • With other words we need an fast reconnect without pairing after every reset.

    But the client forget the LinkKey after reset. Where I can set it back without an new pairing process.
  • Ronald,

    Please refer to this previous post regarding storing a link key through reset, particularly the first response by Vihang regarding placing the variables in memory.

  • Dale,
    Yes I do this, what described in the post.
    I store back the LinkKey in Ram.

    But the SPP_Open_Remote_Port function, dont use the LinkKey.
    This Function I can only give the BD-Adress from the device.

    What shall I do with the LinkKey? It Well be never ask for it.

    After reset I call the funktion:
    SPP_Open_Remote_Port(BluetoothStackID, BtAdress, BtPort, SPP_Event_Callback, (unsigned long)0);
    I can not give this function the restored LinkKey.
  • After the device is rebooted, you will need to take the link key from the location in RAM, and pass the information back to the LinkKeyInfo struct. This way, the previously stored LinkKeyInfo is restored after the power cycle and when the remote device tries to reconnect, the application will be able to use the previously stored link key. This occurs in the atLinkKeyRequest event of the GAP_Event_Callback.
  • But the atLinkKeyRequest does not trigger, when I set SPP_Open_Remote_Port.

    But I solved it:
    I have to send a new pair. Then a atLinkKeyRequest request is triggered.
    And if the LinkKey fits, no more PinCode will be requested.