bkatko / python-xbee

Automatically exported from code.google.com/p/python-xbee
MIT License
0 stars 0 forks source link

Response packet was longer than expected; expected: 32, got: 36 bytes - Join Notification #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Zigbee Router API firmware version 23A7, product family: XB24-ZB (Router)
2. Zigbee Coordinator API firmware version 21A7, product family: XBP24BZ7
3. Zigbee coordinator is connected to serial port on windows COM3
4. Both Devices are on API mode 2, and python xbee.Zigbee with escape option 
set to True
5. When Router is set to transmit join notification, following error occures:

Response packet was longer than expected; expected: 32, got: 36 bytes.

Output from a terminal Software shows all data captured trhrough serial port:

0x7E 0x00 0x24 0x95 0x00 0x13 0xA2 0x00 0x40 0xAA 0x19 0x62 0xBD 0xE7 0x02 0xBD 
0xE7 0x00 0x13 0xA2 0x00 0x40 0xAA 0x19 0x62 0x20 0x00 0xFF 0xFE 0x01 0x03 0xC1 
0x05 0x10 0x1E 0x00 0x03 0x00 0x00 0xD4

XCTU Terminal works without any issue, output from there:

Node Identification Indicator

7E 00 20 95 00 13 A2 00 40 AA 19 62 BD E7 02 BD E7 00 13 A2 00 40 AA 19 62 20 
00 FF FE 01 03 C1 05 10 1E D7

WRONG output from Python (logged at where exception occures):

95 00 13 a2 00 40 aa 19 62 bd e7 02 bd e7 00 13 a2 00 40 aa 19 62 20 00 ff fe 
01 03 c1 05 10 1e 00 03 00 00

If i remove the lines: 

# If there are more bytes than expected, raise an exception
        if index < len(data):
            raise ValueError(
                "Response packet was longer than expected; expected: %d, got: %d bytes" % (index,                                                                          
len(data))) 

Then i receive : 

{'source_addr_long': '\x00\x13\xa2\x00@\xaa\x19b', 'source_addr': '\xbd\xe7', 
'parent_source_addr': '\xff\xfe', 'digi_profile_id': '\xc1\x05', 'options': 
'\x02', 'sender_addr': '\xbd\xe7', 'source_event': '\x03', 'node_id': ' ', 
'device_type': '\x01', 'manufacturer_id': '\x10\x1e', 'sender_addr_long': 
'\x00\x13\xa2\x00@\xaa\x19b', 'id': 'node_id_indicator'}

Thank you,
 Szilard

Original issue reported on code.google.com by szili...@gmail.com on 15 Aug 2014 at 12:52

GoogleCodeExporter commented 9 years ago
Can somebody help me out with this issue?

Original comment by szili...@gmail.com on 20 Aug 2014 at 2:37

GoogleCodeExporter commented 9 years ago
UPDATE:

Found out that it was set 0x01 in NO Node Discovery Options im the coordinator, 
setting it back to 0, send expected data!

Original comment by szili...@gmail.com on 20 Aug 2014 at 3:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello,
did you disable Join Notification from XBee in router mode? I need to use Join 
Notifications for my small network. All help would be appreciated.

Original comment by markusfo...@gmail.com on 27 Aug 2014 at 2:21

GoogleCodeExporter commented 9 years ago
Problem solved.. thanks!

Original comment by markusfo...@gmail.com on 2 Sep 2014 at 2:15

GoogleCodeExporter commented 9 years ago
I am experiencing this problem as well.  From the comment trail I'm not quite 
sure how this was resolved?

Original comment by p...@paulhill.pro on 9 Sep 2014 at 5:24

GoogleCodeExporter commented 9 years ago
I could only solve temporary this by setting "NO Node Discovery Options" to 0 
in the coordinator settings. No permanent fix yet, but hope somebody helps us 
with a permanent fix for the issue.

Original comment by szili...@gmail.com on 9 Sep 2014 at 9:29

GoogleCodeExporter commented 9 years ago
Dear Friends,
Even After I set-"Node Discovery Options =0. I can get this error sometime. Any 
other suggestion. I am using Co-ordinator API mode and End device AT mode. 
End device (Arduino+Xbee) will send data to Co-ordinator.2 Routers in AT mode. 
(Firmware XBP24BZ7).  Any suggestions ?

I think, it happenes when new new Router joins or send wrong frame ?
Thanks.

Cheers!
Chandra

Original comment by vc.s...@gmail.com on 15 Oct 2014 at 7:28

GoogleCodeExporter commented 9 years ago
If I can recall, it worked for me when I turned explicit mode off.

Hope it helps!
Pablo.

Original comment by pablo.ba...@caimanics.com on 15 Oct 2014 at 7:42

GoogleCodeExporter commented 9 years ago
Change the NO (Node Discovery) Options im the coordinator,solves the problem. 

With regards,
chandra

Original comment by vc.s...@gmail.com on 28 Jan 2015 at 11:07

GoogleCodeExporter commented 9 years ago
Hi,
I am bhushan M. (bnmahajan78@gmail.com)

index is 40 and len(data) is 44 . From where this difference came ?
Refer attached pdf .

But Temporary fix is -  
       index = len(data)

Code - 
# If there are more bytes than expected, raise an exception
        if index < len(data):
            raise ValueError(
                "Response packet was longer than expected; expected: %d, got: %d bytes" % (index,                                                                          
len(data))) 

Original comment by bnmahaja...@gmail.com on 8 Mar 2015 at 7:47

Attachments: