SWRA772 august 2023 CC2564C
The GetLocalName command is responsible for querying the name of the local Bluetooth Device. This command returns zero on a successful execution and a negative value on all errors. A Bluetooth Stack ID must exist before attempting to call this command.
Including parameters is not necessary when using this command. A parameter has no effect on the outcome of thequery.
GAP_Query_Local_Device_Name(BluetoothStackID, 257, (char *)LocalName)
int BTPSAPI GAP_Query_Local_Device_Name(unsigned int BluetoothStackID, unsigned int NameBufferLength, char *NameBuffer)
This function is responsible for querying (and reporting) the user friendly name of the local Bluetooth device. The final parameters to this function specify the buffer and the buffer length of the buffer that is to receive the local device name. The NameBufferLength parameter is at least MAX_NAME_LENGTH+1 to hold the maximum allowable device name plus a single character to hold the NULL terminator. If this function is successful, this function returns zero, and the buffer that NameBuffer points to is filled with a NULL terminated ASCII representation of the local device name. If this function returns a negative value, then the local device name was NOT able to be queried (error condition).