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

Maximizing Gazelle Data Throughput

I'm looking to maximize the throughput using Gazelle on the nRF51.

Assuming zero retransmissions, I believe the theoretical max should be (1/TimeslotPeriod)*PayloadSize which would be 35.5kBps (284kbps) for my current settings.

Setup:

  • One nRF51 Dongle as Device
  • One nRF51 Dongle as Host
  • SDK 8.1
  • Very Close Range (RSSI ~ -51dBm)

Radio Parameters:

  • Data Rate = 1Mbps
  • Timeslot period = 900uS
  • Sync Lifetime = 40 timeslots
  • Packet Size = 32 bytes
  • Timeslots per Channel (see below)
  • 15 channels randomly generated per FCC 15.427 requirements
  • Ch Selection Policy = USE_CURRENT

Transmit Code:

while(nrf_gzll_ok_to_add_packet_to_tx_fifo(PipeNum) && buf->getCount() > 0){
   TxCount = buf->getCount();
   PayloadLen_Tx = ( TxCount > NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH )?NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH:TxCount;
   buf->pop( NRF_TxBuf, PayloadLen_Tx); // Move the Tx bytes to byte array

   result = nrf_gzll_add_packet_to_tx_fifo( this->PipeNum, NRF_TxBuf, PayloadLen_Tx);	
   if(result == false){
       TxErrCnt++;
    }
       Tx_ErrCode = nrf_gzll_get_error_code();
       nrf_gzll_reset_error_code();
 }

Results:

My throughput seems to be dependent on number of timeslots per channel. Here are my results:

  • 5 slots/ch -> 7.2 kBps (57.6 kbps)
  • 4 slots/ch -> 9.0 kBps (72.0 kbps)
  • 3 slots/ch -> 11.2 kBps (89.6 kbps) *bounces between 10.5 and 11.7 kBps
  • 2 slots/ch -> 11.7 kBps (93.6 kbps) *Looses Sync periodically
  • 1 slots/ch -> Not Stable

Is there anything I can do to improve throughput?

Thanks!

  • Hi

    The max data rate in Gazell is actually (1/(2*TimeslotPeriod))*PayloadSize, which should be 142kbps for the settings you use. This means you are quite close when using 2 slots per channel, and the reason you are not getting closer is probably that you lose sync on occasion.

    For a higher data rate than this you would probably have to use 2Mbps data rate instead, allowing you to get away with a shorter timeslot.

    One thing you can try to reduce the chance of losing sync is to make the timeslot on the device side slightly shorter than on the host side. In general it is better for the device to drift to the left of the timeslot than to the right, and this might improve performance. You can try to reduce the device timeslot with values in the 5-50 range for a start.

    Best regards Torbjørn

  • Hey guys, I have a similar setup (code below on device side), with the Gzll parameters printed out below: However, I'm only able to get a throughput of 41kpbs. What might I be missing here? Thanks!

        while(ImageTxIdx < ImageDataSize){
    
          if(nrf_gzll_ok_to_add_packet_to_tx_fifo(PIPE_NUMBER)) {
    
              for(uint8_t i=0;i<32;i++)
                data_payload[i] = ImageData[ImageTxIdx++];
    
              ret = nrf_gzll_add_packet_to_tx_fifo(PIPE_NUMBER, data_payload, 32);
    
              if(ret == false){
                TxErrCnt++;
                SEGGER_RTT_printf(0, "TxErrCnt:%d\n", TxErrCnt);
              }                                                                                                       
          }
        }
    

    //device

    nrf_gzll_get_datarate: 2

    nrf_gzll_get_timeslot_period: 600

    NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH: 32

    nrf_gzll_get_timeslots_per_channel: 2

    nrf_gzll_get_sync_lifetime: 30

    nrf_gzll_get_channel_table_size: 5

    nrf_gzll_get_tx_power: 1

    //host

    nrf_gzll_get_datarate: 2

    nrf_gzll_get_timeslot_period: 600

    NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH: 32

    nrf_gzll_get_timeslots_per_channel: 2

    nrf_gzll_get_sync_lifetime: 30

    nrf_gzll_get_channel_table_size: 5

    nrf_gzll_get_tx_power: 1

  • I gave this a shot. Unfortunately I didn't see any noticeable change in the throughput. Is there anything else I could try or another test to run?

  • @jcondon: Have you tried to change the datarate to 2Mbps and reduce the timeslot to 600us?

  • I haven't done thorough testing on the 2Mbps mode, as I'd prefer to maintain the range of the 1Mbps mode. I'll be doing testing on the 2Mbps mode later this week and can post results.

Related