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.

Read device local name using central example

Other Parts Discussed in Thread: CC2650

Hello Everyone,

I am working on CC2650 launchpad with running central example.

My question is, when we connect the peripheral device using central device we can able to read the connected device ble address but I want to read the connected device name also.

Can any one help me to read the connected ble device local name.

For e.g., Peripheral device (name "XYZ") connect to central device, we can able to read the name of connected peripheral device name ("XYZ").

We can also take the example of multirole.

Thanks in advance.

Regards,

Mahesh

  • Hi Mahesh,

    When connected to the device, you can read the characteristic for the Device Name in the GAP GATT Service. For more information on this, check out section 5.3.2 (GATT Services and Profiles) in the Software Developer's Guide found in the docs folder of the SDK.

    Simple_Central already has a filter that checks for a specific service UUID by looking at the advertisement data. This is done with SimpleBLECentral_findSvcUuid() during the GAP_DEVICE_INFO_EVENT. Check this function out to see how the filter parses through the advertisement data. If you'd like to filter by name on a scan you can extend or replace this functionality to filter based on the name (GAP_ADTYPE_LOCAL_NAME_SHORT or GAP_ADTYPE_LOCAL_NAME_COMPLETE) instead.

    -Sy Su

  • Thanks for the quick response.

    Regards,

    Mahesh