Page 1 of 1

nrf51822 error in ble.enable

Posted: Wed Jun 02, 2021 5:07 pm
by amirg
Hi everyone
I've been recently into nrf51822 with micropython
as I tried to enable BLE this error Happened.
"OSError: can't apply GAP parameters"
is there any docs for nrf51822 or any solution to enable ble?

Re: nrf51822 error in ble.enable

Posted: Tue Jun 08, 2021 2:46 pm
by katte82
I've found the same issue.
It seems to hang in this call of the file ble_drv.c

Code: Select all

// set up security mode
    ble_gap_conn_params_t   gap_conn_params;
    ble_gap_conn_sec_mode_t sec_mode;

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);

    const char device_name[] = "micr";

    if ((err_code = sd_ble_gap_device_name_set(&sec_mode,
                                               (const uint8_t *)device_name,
                                                strlen(device_name))) != 0) {
        mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't apply GAP parameters"));
    }
But for the moment, I have no idea why this happens.
I continue to investigate.

Re: nrf51822 error in ble.enable

Posted: Tue Jun 08, 2021 4:46 pm
by amirg
As program nrf51822 with arduino, BLE and peripheral work precisely but after flash S110 and micropython firmware into nrf51822 BLE stop working so in my situation I think there is problem in openOcd and the way I program nrf51822(start and end address of s110 and firmware) and i have no idea how to fix this.