Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
best way to access packet?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul Keyes  
View profile  
 More options Apr 16 2012, 2:00 pm
From: Paul Keyes <pau...@gmail.com>
Date: Mon, 16 Apr 2012 11:00:16 -0700 (PDT)
Local: Mon, Apr 16 2012 2:00 pm
Subject: best way to access packet?
Hi All,

I'm working on a project in which I have multiple remote xbee radios
(attached to arduinos, using the axbee arduino library) all
communicating with a single computer using the java xbee api.  I have
two questions:

1.  When the computer receives a response (response =
xbee.getResponse();), is there a way to easily get the MY address of
the sending radio?

2.  What is the best way to access the payload in the received
packet?  I am currently doing this:
receivedPacket = response.getProcessedPacketBytes();
PayloadByte0 = receivedPacket[receivedPacket.length-3];
...because I have found by reading the logs and by trial and error
that the payload byte 0 ends up at that position in the receivedPacket
array... but it seems like there should be a better way?

Thanks so much,
Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Rapp  
View profile  
 More options Apr 20 2012, 9:52 am
From: Andrew Rapp <andrew.r...@gmail.com>
Date: Fri, 20 Apr 2012 07:52:38 -0600
Local: Fri, Apr 20 2012 9:52 am
Subject: Re: best way to access packet?

It depends on the type of the response.  You didn't mention if you are
using series 1 or 2 -- many of the packets are different. The payload is
accessed by getData, but you need to cast XBeeResponse to the proper
subclass. The remote address is generally getRemoteAddress.  Take a look at
the developer's guide, javadoc and the examples in the download.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »