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.

Setting name of device

In the Bluetopia stack there are two functions to change the device name:

GAPS_Set_Device_Name
GAP_Set_Local_Device_Name

The Set Local Device Name function sets the name that the remote device sees.  So what is the purpose of the GAPS_Set_Device_Name function?

  • Hi,

    GAPS_Set_Device_Name() sets the Device Name characteristic of the Generic Access GATT Service. Please see: BT Spec - 4.0 , Vol 3, Part C, Section 12 for more information.

    GAP_Set_Local_Device_Name() modify the user friendly name for the BR/EDR Controller. Please see: Vol 2, Part E, Section 6.23 for more information.

    Regards,
    Gigi Joseph.
  • Gigi thanks for getting back to me.

    I'm quite new to the Bluetooth spec so understanding how the layers fit together can be a bit confusing. Vol 2, Part E Section 6.23 refers to the device local name which is accessed via an HCI function. It was my impression that GAP functions were at a higher layer and ultimately many of them did turn into direct calls using the HCI interface. Therefore I can see how the GAP_Set_Local_Device_Name calls into the HCI function which is referenced via Vol 2 Part E Section 6.23. However it seems just by the name that GAP_Set_Local_Device_Name is a GAP function and these are what are described in Vol 3, Part C. Therefore it seems that the GAPS_Set_Device_Name is redundant and unnecessary since there is only one name to set. However this function clearly does not set the same name that GAP_Set_Local_Device_Name sets. I also noticed the following in the spec (Volume 3, Part C, Section 3.2.2.1.1):

    A BR/EDR/LE device type shall have a single Bluetooth device name which
    shall be identical irrespective of the physical channel used to perform the name
    discovery procedure.

    So I just thought that there should only be one name. If the Stonestreet stack implements two names so be it. Is the name set by GAPS_Set_Device_Name externally visible and if not what is its purpose?
  • Hi Ian,

    The GAPS_Set_Device_Name () is externally visible to the remote device. The remote device has to read the "Device Name" characteristic of the GAP BLE Service.

    Regards,
    Gigi Joseph.