MPLAB Harmony Bluetooth Help
|
The function DRV_BM64_SetBDName is called to set a temporary Bluetooth device name from an ASCII string buffer. The function DRV_BM64_GetBDName is called to get the current Bluetooth device name, and DRV_BM64_GetBDAddress is called to get the Bluetooth device address.
Example:
laString tempStr; char buf [DRV_BT_MAXBDNAMESIZE+1]; // note generic version of calls (DRV_BT instead of DRV_BM64) are 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); DRV_BT_GetBDAddress(appData.bt.handle, buf); tempStr = laString_CreateFromCharBuffer(buf, &LiberationSans12); laLabelWidget_SetText(GFX_BTADDRESS_VALUE, tempStr); // display BT address laString_Destroy(&tempStr);
MPLAB Harmony Bluetooth Help
|