Drivers Libraries Help > BM64 Bluetooth Driver Library > Library Interface > g) Device Name and Address Functions > DRV_BM64_GetBDAddress Function
MPLAB Harmony Bluetooth Help
DRV_BM64_GetBDAddress Function

Return the Bluetooth address.

Description

Function DRV_BM64_GetBDAddress: 

void DRV_BM64_GetBDAddress(const DRV_HANDLE handle, char* buffer); 

Return the Bluetooth address of the device as an ASCII string.

Preconditions

DRV_BM64_Open must have been called to obtain a valid opened device handle.

Parameters
Parameters 
Description 
handle 
valid handle to an opened BM64 device driver unique to client 
buffer 
pointer to a char buffer at least 18 bytes long 
Returns

None.

Example
laString tempStr;                                      
char buf [18];

// note generic version of call (DRV_BT instead of DRV_BM64) is used
DRV_BT_GetBDAddress(appData.bt.handle, buf);
tempStr = laString_CreateFromCharBuffer(buf, &LiberationSans12);
laLabelWidget_SetText(GFX_BTADDRESS_VALUE, tempStr);    // display BT address
laString_Destroy(&tempStr);
C
void DRV_BM64_GetBDAddress(
    const DRV_HANDLE handle, 
    char* buffer
);