Hello ,
I am trying to send 1,000 of MPU-9250 data from NRF5832 peripheral(ble_nus_uart) to NRF52832 central(ble_app_uart_c).
And i have been searched this site and set NRF_SDH_BLE_GAP_EVENT_LENGTH as 400 and increased RAM size too.
Also, i add conn_evt_len_ext_set code both Peripheral and Central.
[ Location in Peripheral ]
ble_stack_init();
conn_evt_len_ext_set();
gap_params_init();
[ Location in Central ]
ble_stack_init();
conn_evt_len_ext_set();
gatt_init();
void conn_evt_len_ext_set(void) { ret_code_t err_code; ble_opt_t opt; memset(&opt, 0x00, sizeof(opt)); opt.common_opt.conn_evt_ext.enable = 1; err_code = sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt); APP_ERROR_CHECK(err_code); }
Moreover, i set
#MIN_CONN_INTERVAL 7.5
#MAX_CONN_INTERVAL 7.5
both Peripheral and Central.
And did not change NRF_SDH_BLE_GAP_DATA_LENGTH and NRF_SDH_GTAA_MAX_MTU_SIZE.
Below is the main loop.
u8 g_ucaCpTxBuf[22]; for(;;) { Command_IMU_Process(g_ucaCpTxBuf); u16_P_Length = strlen(g_ucaCpTxBuf); err_code = ble_nus_data_send(&m_nus, g_ucaCpTxBuf, &u16_P_Length , m_conn_handle); )
There is no other processing routine currently, and this code does not establish a connection with Central.
Then i debug Cetral by using RTT viewer.
0> <info> app: Init UART.
0> <info> app: Connecting to target 52D3485611C9
0> <info> app: ATT MTU exchange completed.
0> <info> app: Ble NUS max data length set to 0xF4(244)
0> <info> app: Disconnected.
0> <info> app: Disconnected. conn_handle: 0x0, reason: 0x8
This is the result and it says 0x8.
I don't know why they can not establish a connection.
Furthermore there is something that makes me really hard.
It works if i add nrf_delay_ms(1) code on the last line of the main loop.
However, Transmit speed is bad. It just works. I mean they establish a connection.
Pleas help me to solve this situation.
Thank you for reading this post.