Esb Packet gap issue and packet “mtu”

Hi,

  I developed with ncs 2.1 samples esb ptx and prx using nrf52840 make a low latency application,There are two problems

①On the ptx side, packets are sent twice in a row;At the receiving end, the packet gap is about 8 milliseconds。How much milliseconds the esb minimum packet gap ?How to reduce packet gap?

②Use the maximum 252 packets to send it return “Payload write failed, err -122”,esb_start_tx() it retun -61,It took many days to debug there is no progress,The attachments are code and configuration

esb.zip

Parents
  • Hi,

     

    ①On the ptx side, packets are sent twice in a row;At the receiving end, the packet gap is about 8 milliseconds。How much milliseconds the esb minimum packet gap ?How to reduce packet gap?

     The time for one transaction depends on the packet length. If your overall on-air payload is 250 bytes, the calculation is:

    Tramp-up + Tpayload = 130 us + 250 bytes * 8 bit * 1/2Mbit = 1130 us.

     

    You'll also have to account for the ACK from the PRX.

    ②Use the maximum 252 packets to send it return “Payload write failed, err -122”,esb_start_tx() it retun -61,It took many days to debug there is no progress,The attachments are code and configuration

    ptx/src/main.c::154 sets the payload length to 126. Try setting this to 252.

     

    Also, you should set the .protocol to "ESB_PROTOCOL_ESB_DPL" and consider using 2 byte CRC. This change must be applied to both PRX and PTX.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    ①On the ptx side, packets are sent twice in a row;At the receiving end, the packet gap is about 8 milliseconds。How much milliseconds the esb minimum packet gap ?How to reduce packet gap?

     The time for one transaction depends on the packet length. If your overall on-air payload is 250 bytes, the calculation is:

    Tramp-up + Tpayload = 130 us + 250 bytes * 8 bit * 1/2Mbit = 1130 us.

     

    You'll also have to account for the ACK from the PRX.

    ②Use the maximum 252 packets to send it return “Payload write failed, err -122”,esb_start_tx() it retun -61,It took many days to debug there is no progress,The attachments are code and configuration

    ptx/src/main.c::154 sets the payload length to 126. Try setting this to 252.

     

    Also, you should set the .protocol to "ESB_PROTOCOL_ESB_DPL" and consider using 2 byte CRC. This change must be applied to both PRX and PTX.

     

    Kind regards,

    Håkon

Children
Related