SWRA769 august 2023 CC2564C
The GetLocalAddress command is responsible for querying the Bluetooth Device Address of the local Bluetooth Device. This function returns zero on a successful execution and anegative value on all errors. A Bluetooth Stack ID must exist before attempting to call this function.
Including parameters when using this command is not necessary. A parameter has no effect on the outcome of the query.
GAP_Query_Local_BD_ADDR(BluetoothStackID, &BD_ADDR);
int BTPSAPI GAP_Query_Local_BD_ADDR(unsigned int BluetoothStackID, BD_ADDR_t *BD_ADDR);
This function is responsible for querying (and reporting) the device address of the local Bluetooth device. The second parameter is a pointer to a buffer that is to receive the deviceaddress of the local Bluetooth device. If this function is successful, the buffer that the BD_ADDR parameter points are filled with the device address read from the local Bluetooth device. If this function returns a negative value, then the device address of the local Bluetooth device was NOT able to be queried (error condition).