My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 9: Delay in asynchronous request when there is an unreachable request (NO_RESPONSE)
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Feb 2014


Sign in to add a comment
 
Reported by rhesch...@gmail.com, Aug 22, 2011
What steps will reproduce the problem?
1. send multiple asynchronous request to two different xbees (one of them must not be accessible -> NO_RESPONSE)

What is the expected output? What do you see instead?
The messages to the reachable xbee should be sent immediately after the method call, but it has a delay of 2, 3 seconds because of the messages sent to the xbee out of range.

What version of the product are you using? On what operating system?
xbee-api-0.9
Ubuntu 11.04

Please provide any additional information below.
Here is a sample code for this issue:

XBee xbee = new XBee();
xbee.open("COM5", 9600);
String XBEE_OK_ADDR = "00 13 a2 00 40 61 19 11";
String XBEE_OUT_ADDR = "00 13 a2 00 40 61 19 00";
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OK_ADDR), "D4", new int[] {5}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OUT_ADDR), "D4", new int[] {5}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OK_ADDR), "D4", new int[] {4}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OUT_ADDR), "D4", new int[] {4}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OK_ADDR), "D4", new int[] {5}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OUT_ADDR), "D4", new int[] {5}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OK_ADDR), "D4", new int[] {4}));
xbee.sendAsynchronous(new RemoteAtRequest(new XBeeAddress64(XBEE_OUT_ADDR), "D4", new int[] {4}));

When this code runs only with the xbee in range, the IO 4 turns on/of immediately. But when there is a request to an xbee out of range, there is a delay of 2, 3 seconds to send the messages to the xbee in range. This delay appears to increase according to the number of NO_RESPONSE requests.


Feb 2, 2014
Project Member #1 andrew.rapp@gmail.com
sendAsynchronous simply writes the packet to the output stream. If there is some blocking going on it has to do with RXTX and not something I can affect. I recommend you collect the response before sending another command to the radio, something like

sendAsync Radio1
sendAsync Radio2

wait for responses
if Radio 1, sendAsync Radio1
if Radio 2, sendAsync Radio2
etc
Status: Invalid
Sign in to add a comment

Powered by Google Project Hosting