Receiving Data Out of Order Crashes ConnectPort X2D

15 views
Skip to first unread message

Kingsley Hill

unread,
Mar 19, 2015, 5:35:53 PM3/19/15
to xbee-inter...@googlegroups.com
Yet more on the issue of the ConnectPortX2D going into an infinite loop on bad data...if the data is received out of order XIG will read it as nonsense and crash the session:

xig.xmit - SEND: to ('[00:13:A2:00:40:C6:64:9F]!', 232, 49413, 17) (id = 109)
xig.xmit - X-API ZigBee TX Status (id = 109)
xig.xmit - GOOD: tx_status (id = 109)
xig.io_kernel - RECV: 73 bytes from ('[00:13:A2:00:40:C6:64:9F]!', 232, 49413, 17, 0, 0) ('.07&fn3=batteryCurrent&vl3=0.00&fn4=solarVoltage&vl4=0.00&fn5=solarCurren')
xig.io_kernel - RECV: 73 bytes from ('[00:13:A2:00:40:C6:64:9F]!', 232, 49413, 17, 0, 0) ('http://www.flingbar.net/abcd.php?fn1=NEW&vl1=152&fn2=batteryVoltage&vl2=0')
xig.io_kernel - RECV: 39 bytes from ('[00:13:A2:00:40:C6:64:9F]!', 232, 49413, 17, 0, 0) ('t&vl5=0.00&fn6=dateTime&vl6=1426791639\r')
xig.xmit - SEND: to ('[00:13:A2:00:40:C6:64:9F]!', 232, 49413, 17) (id = 110)
xig.io_kernel - IO: exception on XBee xmit (<socket.error instance at 0x8f8d4c>)
xig.xmit - SEND: to ('[00:13:A2:00:40:C6:64:9F]!', 232, 49413, 17) (id = 110)
xig.io_kernel - IO: exception on XBee xmit (<socket.error instance at 0x8f848c>)
....


Note that the packets are received out of order.  The entire line is sent to the radio module serial port in the right order.  It is most likely sent in the right order from the module, but apparently is received in the wrong order by the CP X2.  XIG apparently reads the data in the order it is received rather than using any kind of sequence number to properly order the transmission.   I'd be perfectly happy if XIG would ignore the data, but NO...it insists on going into an infinite error loop.

The only way to get the CPX2 to stop the loop is to reboot it.  No abort or quit will do it.

Rob Faludi

unread,
Mar 25, 2015, 4:35:40 PM3/25/15
to xbee-inter...@googlegroups.com
I just ran a test on an X2D with DigiMesh. It has taken me some time to get ahold of similar equipment to what you are using. It’s 900MHz for the US rather than 868MHz for Europe, but while we can’t absolutely rule 868 out from being the cause, it seems very unlikely. This test ran correctly and did not reproduce the problem you’re reporting. Properly formed requests are handled as expected, and nonsense text is ignored without any issues. Here’s the specifics:

Model:  ConnectPort X2D
Firmware Version:  2.15.0.8   (Version 82002549_D1 08/23/2012)
Boot Version:  1.1.3   (release_82002547_A)
POST Version: 1.1.3   (release_82002548_B)
XBee Firmware Version: 0x8044
XIG Version: 1.5.1 (for Python 2.4, using the python.zip libraries included with the download)

By the way, if it’s really just the help file causing problems in your setup, that can be disabled easily in xig_config.py just look for the following lines:

    # Should we send the helpfile for all unknown commands or
    # simply ignore them?
    global_always_send_help = True

Please make sure you are using the python.zip library included in the 1.5.1 download as older libraries could cause problems or chew up memory that create unexpected behaviors.



--
You received this message because you are subscribed to the Google Groups "xbee-internet-gateway" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xbee-internet-ga...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages