Hello all,
During testing of my nRF51 based device some Android based phones unable to connect or at least connect from the first time. The same device connects perfectly for others Android phones.
In SD 110 8.0.0 ble_gap.h I found BLE_GAP_OPT_COMPAT_MODE
option to enable
Compatibility mode 1 enables interoperability with devices that do not support
* a value of 0 for the WinOffset parameter in the Link Layer CONNECT_REQ packet.
It seems to be a my case. And I tried to set the Compatibility mode 1. However, firmware stuck at sd_ble_opt_set call. My code:
ble_opt_t opt;
uint32_t err_code;
memset(&opt,0x00,sizeof(ble_opt_t));
opt.gap_opt.compat_mode.mode_1_enable=0x01;
err_code = sd_ble_opt_set(BLE_GAP_OPT_COMPAT_MODE,&opt); //<- stuck here
if(err_code) DBG("sd_ble_opt_set BLE_GAP_OPT_COMPAT_MODE: %d\n",err_code );
Than I tried to read this field:
memset(&opt,0x00,sizeof(ble_opt_t));
err_code = sd_ble_opt_get(BLE_GAP_OPT_COMPAT_MODE,&opt);
DBG("sd_ble_opt_get BLE_GAP_OPT_COMPAT_MODE: %d\n",err_code );
The error occured: NRF_ERROR_INVALID_PARAM
What I did wrong? Please help.
P.S. These all were called after sd_softdevice_enable
and sd_ble_enable
.