nrf51822 error in ble.enable

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
amirg
Posts: 3
Joined: Wed Jun 02, 2021 5:02 pm

nrf51822 error in ble.enable

Post by amirg » Wed Jun 02, 2021 5:07 pm

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?

katte82
Posts: 5
Joined: Tue Jun 08, 2021 2:21 pm

Re: nrf51822 error in ble.enable

Post by katte82 » Tue Jun 08, 2021 2:46 pm

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.

amirg
Posts: 3
Joined: Wed Jun 02, 2021 5:02 pm

Re: nrf51822 error in ble.enable

Post by amirg » Tue Jun 08, 2021 4:46 pm

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.

Post Reply