Hello there.
Is it possible to connect to a client device by it's name rather than mac address?
With the QCLI utility I can:
Enter BLE (3)
Initialsise BLE (4)
Configure Advertising Report as Verbose (44 1 )
Scan for devices ( 17 1 )
Stop scan (17 0 )
From here I can see my devices MAC address.
I have also extended the QCLI Demo source files to parse the client device name inside the "Raw_Report_Data" vai "GAP_LE_Event_Callback" [ spple_demo.c ]
Using QCLI Utility I could connect to my client device using the MAC address:
Connect To Client ( 18 0 XXXXXXXXXXXX 0 )
Does the QCA4020 Support a method to connect to the client directly from the Device Name?
Thanks for your time
Oskar
Hi Oskar,
I think we can investigate Advertising Data if it includes "complete local name" as AD type 0x09.
When you review DisplayAdvertisingData() in quartz/demo/qcli_power_demo/src/ble/ble_demo.c,
we can print out the struct values like AD_Type, AD_Data_Lengh, and AD_Data.
When AD_Type is 0x09 as complete local name, we can print Advertising_Data->Data_Entries[Index].AD_Data_Buffer as string type by %s.
We can match known device name with the found complete local name in Advertising Data.
Thanks
BR,
Jayden
Hi Jayden,
Thank you very much for your support.
Yes, I was hoping to communicate that I have extracted the Device Name from the Advertising Packet and from there can resolve the MAC address and connect using the MAC address. I was wondering if I could connect to the device using the device name rather than the MAC address? In other words " connect to 'myDevice'" or in QCLI terms " 18 0 myDevice 0 ".
[...]
[...]
Program logic would continue in that if the name matched your device then grab the MAC address and connect to it.
Hi Oscar,
Yes, we need to implement that kind of parsing logic for remote device name.
There is exact API to make BLE connectio according to device name.
Thanks
BR,
Jayden
Hi,
We are trying to implement same thing mentioned in above comments.
Can anyone help which API to use to connect BLE device using Device name
Thanks in advance,
sushmita
Hi Sushmita,
We don't have exact a API to connect remote device by name.
As we discussed here, we can investigate Advertising Data if it includes "complete local name" as AD type 0x09.
When you review DisplayAdvertisingData() in quartz/demo/qcli_power_demo/src/ble/ble_demo.c,
we can print out the struct values like AD_Type, AD_Data_Lengh, and AD_Data.
When AD_Type is 0x09 as complete local name, we can print Advertising_Data->Data_Entries[Index].AD_Data_Buffer as string type by %s.
We can match known device name with the found complete local name in Advertising Data.
Thanks
BR,
Jayden