This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

large data send central to peripheral nrf52832

Hello everyone,

I need transfer large data 12KB array send central to peripheral using nrf52832. I try this examples in central (ble_app_uart_c) and peripheral (ble_app_uart). I add this few line in central

for(;;){

            uint16_t cnt=0;
           for(cnt=0;cnt<12000;cnt++)

            {
                uint8_t data=array_data[cnt];
            ble_nus_c_string_send(&m_ble_nus_c, &data, sizeof(data));
            
            }      
            
            idle_state_handle();
        }

peripheral doesn't receive any data from central. any example function or code is there to communicate central and peripheral transfer large data....????

Parents Reply
  • Thanks for helping

    Now i send 244byte in single transmission. i split 10000bytes into 244 bytes in every transmission but first transfer data receive peripheral(app_ble_uart) and balance data doesn't receive in peripheral side error code show

     0> <warning> ble_nus_c: Connection handle invalid.

     0> <warning> ble_nus_c: Connection handle invalid.

    for(;;)
    {
    uint8_t Buff[244];
    uint8_t cp_Lnt=0;
    	for(uint16_t cnt=0;cnt<10000;cnt++)
    			{
    				Buff[cp_Lnt]=data[cnt];
    				cp_Lnt++;
    				if(cp_Lnt>=244)
    				{
    				err_code=ble_nus_c_string_send(&m_ble_nus_c,Buff, sizeof(Buff));//send_Data
    				if(err_code != NRF_ERROR_INVALID_STATE && err_code != BLE_ERROR_INVALID_CONN_HANDLE)
    					{
    							APP_ERROR_CHECK(err_code);
    					}
    					cp_Lnt=0;
    				}
    			}
    	}

    in peripheral side connection interval set below

    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)

    what are the parameters to change getting all data receive peripheral side without losing connection and data losses...???

Children
Related