SWRA770 august 2023 CC2564C
This function is responsible for querying the name of the local Bluetooth Device. This function returns zero on a successful execution and a negative value on all errors. A Bluetooth StackID must exist before attempting to call this function.
Including parameters is not necessary when using this command. A parameter has no effect on the outcome of the query.
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 buffer length of the buffer that is to receive the local device name. The NameBufferLength parameter must be 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 terminatedASCII 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).