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

Return Bluetooth device name.

Description

Function DRV_BM64_GetBDName: 

void DRV_BM64_GetBDName(const DRV_HANDLE handle, char* buffer, const uint8_t buflen); 

Return the Bluetooth device name 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 buflen bytes long 
buflen 
length of buffer (including terminating 0 byte) 
Returns

None.

Example
laString tempStr;                                      
char buf [DRV_BT_MAXBDNAMESIZE+1];

// note generic version of call (DRV_BT instead of DRV_BM64) is used
DRV_BT_GetBDName(appData.bt.handle, buf, DRV_BT_MAXBDNAMESIZE+1);
tempStr = laString_CreateFromCharBuffer(buf, &LiberationSans12);
laLabelWidget_SetText(GFX_BTNAME_VALUE, tempStr);   // display BT name
laString_Destroy(&tempStr);
C
void DRV_BM64_GetBDName(
    const DRV_HANDLE handle, 
    char* buffer, 
    const uint8_t buflen
);