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.

CC2564 BT Pairing with Android Phone (SPPLEDemo)



Hi SSO:

Test platform:

Phone: Samsung Note 3 running Android 4.3

Board: Stellaris LM4F232 EVM running Stellaris Bluetopia Stack V1.0

Test Log: (the red part is the operation of Android phone)

OpenStack().
HCI_VS_InitializeAfterHCIReset
Set Baud Rate
HCI_VS_InitializeAfterHCIReset Success
Bluetooth Stack ID: 1.
Device Chipset: 4.0.
BD_ADDR: 0x0018343b78c6

******************************************************************
* Command Options: Server, Client, Help *
******************************************************************

SPP+LE>client

******************************************************************
* Command Options General: Help, GetLocalAddress, SetBaudRate *
* Quit, *
* Command Options BR/EDR: Inquiry, DisplayInquiryList, Pair, *
* EndPairing, PINCodeResponse, *
* PassKeyResponse, *
* UserConfirmationResponse, *
* SetDiscoverabilityMode, *
* SetConnectabilityMode, *
* SetPairabilityMode, *
* ChangeSimplePairingParameters, *
* GetLocalName, SetLocalName, *
* GetClassOfDevice, SetClassOfDevice, *
* GetRemoteName, SniffMode, *
* ExitSniffMode, Open, Close, Read, *
* Write, GetConfigParams, *
* SetConfigParams, GetQueueParams, *
* DisplayRawModeData, AutomaticReadMode,*
* SetQueueParams, Loopback, *
* CBSend. *
* Command Options GAPLE: SetDiscoverabilityMode, *
* SetConnectabilityMode, *
* SetPairabilityMode, *
* ChangePairingParameters, *
* AdvertiseLE, StartScanning, *
* StopScanning, ConnectLE, *
* DisconnectLE, PairLE, *
* LEPasskeyResponse, *
* QueryEncryptionMode, SetPasskey, *
* DiscoverGAPS, GetLocalName, *
* SetLocalName, GetLERemoteName, *
* SetLocalAppearance, *
* GetLocalAppearance, *
* GetRemoteAppearance, *
* Command Options SPPLE: DiscoverSPPLE, RegisterSPPLE, LESend, *
* ConfigureSPPLE, LERead, Loopback, *
* DisplayRawModeData, AutomaticReadMode *
******************************************************************

SPP+LE>setdis 2
Discoverability: General.

SPP+LE>setpair 2
Pairability Mode Changed to pmPairableMode_EnableSecureSimplePairing.
LE: I/O Capabilities: No Input/Output, MITM: TRUE.
BR/EDR: I/O Capabilities: No Input/Output, MITM: TRUE.

Phone search BT device and see EVM in Android setting page.

Select EVM and start pairing.

SPP+LE>
atIOCapabilityResponse: 0x00e3b2a02f06
Capabilities: Display Yes/No, MITM

SPP+LE>
atIOCapabilityRequest: 0x00e3b2a02f06
Auth success.

SPP+LE>
atUserConfirmationRequest: 0x00e3b2a02f06

Auto Accepting: 969696
GAP_Authentication_Response success.

SPP+LE>Un-handled Auth. Event.

SPP+LE>
atLinkKeyCreation: 0x00e3b2a02f06
Link Key Stored.

SPP+LE>setdis 0
Discoverability: Non.

SPP+LE>setpair 0
Pairability Mode Changed to pmNonPairableMode.

Phone un-pair EVM in setting page.

Still can "see" EVM in setting page. 

Select EVM and start pairing.

SPP+LE>
atIOCapabilityResponse: 0x00e3b2a02f06
Capabilities: Display Yes/No, MITM

SPP+LE>
atIOCapabilityRequest: 0x00e3b2a02f06
Auth success.

SPP+LE>
atUserConfirmationRequest: 0x00e3b2a02f06

Auto Accepting: 740691
GAP_Authentication_Response success.

SPP+LE>Un-handled Auth. Event.

<<<<<<<<<<<<<  No link key event

SPP+LE>

Problem:

My question is why phone can still pair with our EVM even we set pmNonPairableMode.

And the other problem is that there is no atLinkKeyCreation event in the second case. However, phone showed successful pairing in the setting page.

  • Hi,

    Moving it to SSO team for precise answer

  • Hi,

    When you enable Secure Simple Pairing, then tell the stack to go into non-pairable mode what it actually does is it still allows Secure Simple Pairing, but it puts it in No Bonding mode. This means that two devices can still connect and encrypt the link, but the link key is temporary until the devices disconnect. This would explain why the radio never generates a link key creation event, because there is no point in giving out a link key that is supposed to be deleted when the link goes back down. Part of this is the specification states that once you enable Secure Simple Pairing, you cannot disable it, so putting it into non-pairable mode is actually just putting it into the no bonding mode I described above.

    With Secure Simple Pairing turned on, your application has to take care of rejecting connection Requests/IO Capabilities request. In our API, anything that requires a GAP_Authentication_Response (this includes Link Key Requests, IO Capabilities, and any other pairing-related requests), you can set the Authentication_Data_Length equal to 0 in the GAP_Authentication_Info_t and it will cause the request to be rejected.

    Thanks,

    Stonestreet One.

  • Hi SSO:

    Thanks for your reply. I will not set into non-pairable mode after enabling Secure Simple Pairing in our application.

    About second paragraph, can I just set DEFAULT_IO_CAPABILITY to (icNoInputNoOutput) with Secure Simple Pairing turned on?