40NBT: bonding with BT device name

Answer

Q: When we try to bond using the Bluetooth Address it works fine, however when we try to bond using the Bluetooth Name (human-friendly display name) it fails. We are using the following APIs: LRD_BT_BondingStartBDADDR () ? to Bond with Bluetooth Address LRD_BT_BondingStartDeviceName ? to Bond with Device Name The error we are getting is LRDBTERR_BT_CONF_DEVICE_NAME_INVALID (410) Is this a known issue or are we doing something wrong? A: For bonding to successfully occur at the lower stack level, there must be a stored BD_ADDR. For ?LRD_BT_BondingStartDeviceName()? to succeed, the user of the application MUST have saved a ?BT_DEVICE? by calling ?LRD_BT_AddDevice(BT_DEVICE)?. The BT_DEVICE fields must have the ?deviceName? and the ?deviceAddress? fields be valid before adding the device. Example: BT_DEVICE device; Strncpy(device.deviceName, ?Test?, strnlen(?Test?)); LRD_BT_StrToBdAddr(?001122334455?, device.deviceAddress); LRD_BT_AddDevice(&device); LRD_BT_BondingStartDeviceName(?Test?, callback, 0);