Bugfix gapc_bond_ind_handler

5 posts / 0 new
Last post
abremen
Offline
Last seen:4 years 2 months ago
加入:2015-02-10 17:44
Bugfix gapc_bond_ind_handler

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:
abremen
Offline
Last seen:4 years 2 months ago
加入:2015-02-10 17:44
It also seems that in case

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);

MT_dialog
Offline
Last seen:一周14小时前
工作人员
加入:2015-06-08 11:34
Hi abremen,

Hi abremen,

The above are indeed bugs, they serve no purpose, thanks for the indication.

MT_dialog

abremen
Offline
Last seen:4 years 2 months ago
加入:2015-02-10 17:44
Many thanks for the swift

Many thanks for the swift response, you are more than welcome. Absolutely great work on the SDK, please extend my compliments to the team.

MT_dialog
Offline
Last seen:一周14小时前
工作人员
加入:2015-06-08 11:34
Hi abremen,

Hi abremen,

Glad you are enjoying the new SDK, i will give your compliments to the team.

Thanks MT_dialog

Topic locked