Forums - BLE Pairing Using Phone

3 posts / 0 new
Last post
BLE Pairing Using Phone
sfabianlyl
Join Date: 31 Dec 18
Posts: 5
Posted: Wed, 2019-01-23 06:20

My name is Fabian, and I am currently working on a project to establish a communication between a user smartphone and the QCA4020, and send data back and forth. Using the ble_util.c from Onboard_demo, in my main thread (initialize thread) currently i wrote:

InitializeBluetooth();
Register_Services();
Start_onboard_via_ble();
//these functions can be found in ble_util.c

I managed to discover the board's Bluetooth name on my phone, however, when i attempt to pair, it states that the pairing key is wrong (although it is not giving me any key), or that the device is configured wrongly.

How do I set the pairing key? And is there an option to remove security and allow pairing without key? What variable/config files do i go to?

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Mon, 2019-01-28 00:39

Hi Mr.Fabian,

The passkey feature is enabled by default in the OnBoard Demo found
in the module "OpenStack - qapi_BLE_HCI_DriverInformation_t *HCI_DriverInformation".

API used to enable the feature is "qapi_BLE_GAP_LE_Set_Fixed_Passkey", where the passkey is

defined using a variable "passkey". 
 
If passkey to be modified, change the value in the variable.
To disable, avoid calling "qapi_BLE_GAP_LE_Set_Fixed_Passkey" API in the OpenStack module. 
  • Up0
  • Down0
sfabianlyl
Join Date: 31 Dec 18
Posts: 5
Posted: Mon, 2019-01-28 03:13

Hi gesqdn,

It seems that the pairing key was not the problem in the first place. However, I am yet to figure out what am I configuring wrongly on the QCA4020 side. I will try to get a proper error report. but as of now, my initialize thread is still as follows:

Initialize_Bluetooth();
Register_services();
Start_onboard_via_ble();

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.