Issue in building the network core hex file for BLE

I am getting issue in building the network core hex file for BLE. I am performing peripheral NUS example with MTU 247 max payload with data length extention. But I am getting error in data length update. Also after erasing nrf5340 in programmer bt enable error is occurred ie. -11.

err = bt_enable(NULL); if (err) { printk("Bluetooth init failed (%d)\n", err); return err; }

Also I tried to flashed the code in nrf but i am getting error in flashing. Error: One or more batch tasks failed:

  • 1050036731: Device error: NVMC erase page failed: Memory access error at 0x01001800. Probably a memory protection issue. Probe access is Secure (Generic)

FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path 'C:\nordic_projects\bap_unicast_server\build\hci_ipc\zephyr\generated_nrfutil_batch.json' --serial-number 1050036731

My final purpose is to enable data length extention to 251 max payload in network core for high speed.

struct bt_conn_le_phy_param phy = { .options = BT_CONN_LE_PHY_OPT_NONE, .pref_rx_phy = BT_GAP_LE_PHY_2M, .pref_tx_phy = BT_GAP_LE_PHY_2M, }; ret = bt_conn_le_phy_update(conn, &phy); printk("PHY update ret=%d\n", ret);

struct bt_conn_le_data_len_param data_len = { .tx_max_len = 251, .tx_max_time = 2120, }; ret = bt_conn_le_data_len_update(conn, &data_len); printk("Data len update ret=%d\n", ret);

But I am getting error in Data len update ret=-5.

  • Hello, 

    Also I tried to flashed the code in nrf but i am getting error in flashing. Error: One or more batch tasks failed:

    • 1050036731: Device error: NVMC erase page failed: Memory access error at 0x01001800. Probably a memory protection issue. Probe access is Secure (Generic)

    FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path 'C:\nordic_projects\bap_unicast_server\build\hci_ipc\zephyr\generated_nrfutil_batch.json' --serial-number 1050036731

    What is logged before this error? Have you tried to recover your device? "Probe access is Secure" usually means that APPROTECT is enabled for the device. 

    I am getting issue in building the network core hex file for BLE. I am performing peripheral NUS example with MTU 247 max payload with data length extention. But I am getting error in data length update. Also after erasing nrf5340 in programmer bt enable error is occurred ie. -11.

    err = bt_enable(NULL); if (err) { printk("Bluetooth init failed (%d)\n", err); return err; }

    You are mentioning peripheral NUS example, but in the project path above you are using bap_unicast_server. Could you share how you added NUS to the bap_unicast_server sample? 

    As a possible starting point you could check if you are calling any of the Bluetooth APIs before Bluetooth is ready. -EAGAIN is a common return value for APIs to use to signal that Bluetooth is not ready. 

    My final purpose is to enable data length extention to 251 max payload in network core for high speed.

    struct bt_conn_le_phy_param phy = { .options = BT_CONN_LE_PHY_OPT_NONE, .pref_rx_phy = BT_GAP_LE_PHY_2M, .pref_tx_phy = BT_GAP_LE_PHY_2M, }; ret = bt_conn_le_phy_update(conn, &phy); printk("PHY update ret=%d\n", ret);

    struct bt_conn_le_data_len_param data_len = { .tx_max_len = 251, .tx_max_time = 2120, }; ret = bt_conn_le_data_len_update(conn, &data_len); printk("Data len update ret=%d\n", ret);

    But I am getting error in Data len update ret=-5.

    Here I am not quite sure where to start. But you could maybe try to select the CONFIG_BT_USER_DATA_LEN_UPDATE symbol for your application (and the network image). 

    Best regards,

    Maria

Related