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.

CC2564C: [Android] not be able to connect through standard ble api connectGatt

Part Number: CC2564C

Hello,

I've encountered the same issue that described in below thread, is there a workaround for this issue already?

The hardware of our device is CC2564C + STM32F401 and running with SPPLEDemo sample code.

https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/540024?-Android-not-be-able-to-connect-through-standard-ble-api-connectGatt

Here is one of the solutions for this issue, but how to set a different private BD address for BLE?

https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/618364

Thanks and regards,

Kevin

  • Kevin,

    Kevin Lam61 said:
    but how to set a different private BD address for BLE?

    You can use the setrandomaddress command of the SPPLEDemo to get a private BD address for BLE. Then, you can specify this random address before starting the advertisement so that the phone would see the advertisements with random address.

    e.g. Console output of the SPPLEDemo:
    
    ******************************************************************
    * 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,      *
    *                          SetQueueParams, Loopback,             *
    *                          DisplayRawModeData, AutomaticReadMode,*
    *                          CBSend                                *
    * Command Options GAPLE:   SetDiscoverabilityMode,               *
    *                          SetConnectabilityMode,                *
    *                          SetPairabilityMode,                   *
    *                          ChangePairingParameters,              *
    *                          SetRandomAddress,                     *
    *                          ResolveRemoteAddress,                 *
    *                          AdvertiseLE, StartScanning,           *
    *                          StopScanning, ConnectLE,              *
    *                          DisconnectLE, CancelConnectLE,        *
    *                          PairLE, UnPairLE, LEPasskeyResponse,  *
    *                          QueryEncryptionMode, SetPasskey,      *
    *                          DiscoverGAPS, GetLocalName,           *
    *                          SetLocalName, GetLERemoteName,        *
    *                          LEUserConfirmationResponse,           *
    *                          EnableSCOnly,                         *
    *                          RegenerateP256LocalKeys,              *
    *                          SCGenerateOOBLocalParams,             *
    *                          SetLocalAppearance,                   *
    *                          GetLocalAppearance,                   *
    *                          GetRemoteAppearance,                  *
    * Command Options SPPLE:   DiscoverSPPLE, RegisterSPPLE, LESend, *
    *                          ConfigureSPPLE, LERead, Loopback,     *
    *                          DisplayRawModeData, AutomaticReadMode *
    ******************************************************************
    
    SPP+LE>SetRandomAddress 0
    Random Static BD_ADDR: 0xE6E39A2CF8DA
    
    
    SPP+LE>AdvertiseLE 1 1 0xE6E39A2CF8DA
       GAP_LE_Advertising_Enable success.
    
    SPP+LE>

  • After getting the random address, my device connects with Andriod phone without any issues. Thank you very much.