utdrobotchess / xbee-api

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

Packet length greater than 255 #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Package: xbee-api-0.9

Problem: 
Bytes are lost when packet length > 255;

Cause:
Although the whole framework is prepared to receive packets with a length 
greater than 255, the line that prints the length to the debug log is not!

PacketParser.java #105 (#167 on trunk) :
log.debug("packet length is " + ByteUtils.formatByte(length.getLength()));

ByteUtils.formatByte() throws  IllegalArgumentException when length > 0xff.

Suggested Solution:
log.debug("packet length is " + length.getLength() + 
String.format("[0x%04X]",length.getLength()));

Attached a log showing a 268 length packet.

Original issue reported on code.google.com by gri...@cpqd.com.br on 21 Jan 2013 at 3:28

Attachments:

GoogleCodeExporter commented 9 years ago
What radio/firmware are you using that supports a 268 byte packet?

Original comment by andrew.rapp@gmail.com on 22 Jan 2013 at 3:18

GoogleCodeExporter commented 9 years ago
Modem type = XBP09-DM (Digimesh 900)
Modem FW: 8044

Original comment by gri...@cpqd.com.br on 22 Jan 2013 at 3:54

GoogleCodeExporter commented 9 years ago
Ok, fixed master 34412bd90818a32e90e5b0a2247a30548977912b=

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 4:10