SWRA769 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.
It is not necessary to include parameters when using this command. A parameter will have 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 ofthe buffer that is to receive the local device name. The NameBufferLength parameter should be at least (MAX_NAME_LENGTH+1) to hold the maximum allowable device name (plus asingle character to hold the NULL terminator). If this function is successful, this function returns zero, and the buffer that NameBuffer points to will be 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).