node-nrf icon indicating copy to clipboard operation
node-nrf copied to clipboard

timeout

Open flagadajones opened this issue 12 years ago • 2 comments

Hi, When i communicate between a BeagleBoneBlack and an arduino with Serial Debug i received many "[Error: Packet timeout, transmit queue flushed.]"

how can i increase timeout value and how can i not stop receive on error?

flagadajones avatar Apr 07 '14 23:04 flagadajones

Hi, sorry for the slow response.

This error indicates that the packet was not acknowledged by the other radio — perhaps it is not active, or too far away, etc. It is emitted on the stream for your open pipe, and there are a few options for dealing with it:

  • the hardware-level timeout behavior can be configured via radio.autoRetransmit. (You can refer to the datasheet around page 33 for details on how exactly the count/delay values are used.)
  • in general though, even while increasing the number of retries may reduce unrecoverable packet loss, if you need reliable transmission you will want to handle error events for the opened stream — what you do .on('error', …) is up to you, but in a sense it's a similar situation to a broken TCP/IP connection.
  • if you actually don't want reliable transmission, you can open the TX pipe with an autoAck:false option [I plan to document the pipe options soon]. This makes the opened pipe behave more like a UDP socket.

Hope this helps?

natevw avatar Apr 18 '14 05:04 natevw

Hi, thanks for your answer. My boths radios are active and at 10cm distance :-). the problem appear only when my arduino has serial debug active....

I'll tried your solution

flagadajones avatar Apr 29 '14 23:04 flagadajones