adeelahmedkhanabbasi / xbee-api

Automatically exported from code.google.com/p/xbee-api
GNU General Public License v3.0
0 stars 0 forks source link

profileId incorrectly set in parseZNetRxResponse() #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run ZNetExplicitSenderExample
2. Receive a ZigBee Explicit Rx Indicator (Frame Type:0x91)

What is the expected output? What do you see instead?
Look at the "received response" INFO message and see the profileId(msb) will be 
set to what the lsb should be and the profileId(lsb)=0x00

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

Please provide any additional information below.
Typo in PacketParser.java line 344 profileId.setMsb() is used twice

            DoubleByte profileId = new DoubleByte();
            profileId.setMsb(this.read("Reading Profile Id MSB"));
            profileId.setMsb(this.read("Reading Profile Id LSB"));
            ((ZNetExplicitRxResponse)response).setProfileId(profileId);

Original issue reported on code.google.com by antin...@gmail.com on 7 Jan 2011 at 2:29

GoogleCodeExporter commented 8 years ago
Ha, nevermind. This is already fixed in the svn copy.

Original comment by antin...@gmail.com on 7 Jan 2011 at 3:36

GoogleCodeExporter commented 8 years ago
Wow, must have been getting tired, the problem DOES still exist in the SVN copy 
around line 94 in com.rapplogic.xbee.api.PacketParser profileId.setMsb() is 
used twice

        DoubleByte profileId = new DoubleByte();
        profileId.setMsb(parser.read("Reading Profile Id MSB"));
        profileId.setMsb(parser.read("Reading Profile Id LSB"));
        this.setProfileId(profileId);

Original comment by antin...@gmail.com on 7 Jan 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Fixed.  The code is now in the parse method of ZNetExplicitRxResponse.  Thanks 
for reporting.

Original comment by andrew.rapp@gmail.com on 3 Apr 2011 at 2:05

GoogleCodeExporter commented 8 years ago
Are are you sure its fixed? I still have the same problem,
thanks

Original comment by roberor...@yahoo.com.br on 20 Dec 2011 at 1:57

GoogleCodeExporter commented 8 years ago
It's fixed in subversion.  The last release (0.9) was Nov 2010 so it's not in 
that release.  Please get from subversion.  I can provide assistance if you 
need some help.

Original comment by andrew.rapp@gmail.com on 20 Dec 2011 at 2:16

GoogleCodeExporter commented 8 years ago
Hi Andrew,
I guess am not familiar enough with SVN but what I did was paste the SVM check 
out link to creat a new SVN repository in my workspace(I use Eclipse) and then 
I generated a JAR and exchanged it with the old api, I had to do some changes 
because some methods are different, but the problem I had, which was getting 
the wrong profile Id from a (0x91) frame type was still there,
maybe I did something wrong with the subversion stuff,
in anyway thanks for attention, the api is really very helpful!
thank you,
Roberto

Original comment by roberor...@yahoo.com.br on 21 Dec 2011 at 11:00

GoogleCodeExporter commented 8 years ago
Send me your email address and I'll send you an updated jar.  My email is on 
the main project page

Original comment by andrew.rapp@gmail.com on 21 Dec 2011 at 2:52

GoogleCodeExporter commented 8 years ago
Hi Andrew, I sent you an e-mail but don't worrie about it, it worked perfectly 
over this version,

thanks!

Original comment by roberor...@yahoo.com.br on 22 Dec 2011 at 1:46