Dear team,
I believe I have found a small bug in function gapc_bond_ind_handler in file app_task.c of project host_proxr_sdk from the DA1458x SDK 5.0.3, case GAPC_IRK_EXCH.
When porting over the project I noticed that KEY_LEN (0x10) is used as num argument to the memcpy of app_env.proxr_device.irk.addr.addr.addr, however the field itself is defined as uint8_t addr[BD_ADDR_LEN] (0x06). Can you confirm or was this done on purpose to copy additional bytes following this data?
Kind regards,
Arjan
Device:
Furthermore in case GAPC_LTK_EXCH of the beforementioned function the ltk.ediv and ltk.randnb.nb fields are copied twice.
app_env.proxr_device.ltk.ediv = param->data.ltk.ediv;
memcpy (app_env.proxr_device.ltk.randnb.nb, param->data.ltk.randnb.nb, RAND_NB_LEN);
app_env.proxr_device.ltk.key_size = param->data.ltk.key_size;
memcpy (app_env.proxr_device.ltk.ltk.key, param->data.ltk.ltk.key, param->data.ltk.key_size);
app_env.proxr_device.ltk.ediv = param->data.ltk.ediv;
memcpy (app_env.proxr_device.ltk.randnb.nb, param->data.ltk.randnb.nb, RAND_NB_LEN);
Hi abremen,
The above are indeed bugs, they serve no purpose, thanks for the indication.
MT_dialog
Many thanks for the swift response, you are more than welcome. Absolutely great work on the SDK, please extend my compliments to the team.
Hi abremen,
Glad you are enjoying the new SDK, i will give your compliments to the team.
Thanks MT_dialog