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.