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

Problem when I send more than 8 packets

Hello,

I'm a few novice in BLE, and I've got a problem.

I'm using a custom project based in UART example. I'm using Nexus 5 and nRF ToolsBox for text it. I'm saving the data in the memory. I can send packets of 20 bytes, but when I need send more than 160 bytes (8 packets), GATT error is obtained in nRF toolbox and one reset in nRF51 is obtained too.

How can I send more than 8 packets? My connections parámeters are:

#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)             /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(75, UNIT_1_25_MS)             /**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */

#define SLAVE_LATENCY                   0                                           /**< Slave latency. */
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(30000, UNIT_10_MS)             /**< Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */
#define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(5000, APP_TIMER_PRESCALER)  /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(30000, APP_TIMER_PRESCALER) /**< Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
#define MAX_CONN_PARAMS_UPDATE_COUNT    3                                           /**< Number of attempts before giving up the connection parameter negotiation. */

Any suggestions? Thanks in advance.

Regards

Parents
  • I have put in my code this:

    err_code = ble_mag_string_send(&m_mag, datos_ble, i);
    if( err_code == BLE_ERROR_NO_TX_BUFFERS){
    	while(tx_complete==false)
    	tx_complete=false;
    	err_code = ble_mag_string_send(&m_mag, datos_ble, i);
    }
    

    and this in on_ble_event():

    case BLE_EVT_TX_COMPLETE:
    					tx_complete=true;
    					break;
    

    But again, when the Nexus 5 have received 8 packets of 20 bytes, the communication is over :S

Reply
  • I have put in my code this:

    err_code = ble_mag_string_send(&m_mag, datos_ble, i);
    if( err_code == BLE_ERROR_NO_TX_BUFFERS){
    	while(tx_complete==false)
    	tx_complete=false;
    	err_code = ble_mag_string_send(&m_mag, datos_ble, i);
    }
    

    and this in on_ble_event():

    case BLE_EVT_TX_COMPLETE:
    					tx_complete=true;
    					break;
    

    But again, when the Nexus 5 have received 8 packets of 20 bytes, the communication is over :S

Children
Related