don't do xig://help

31 views
Skip to first unread message

Kingsley Hill

unread,
Feb 23, 2015, 8:45:31 AM2/23/15
to xbee-inter...@googlegroups.com
I have xig on a ConnectPort X2D using DigiMesh.  When I write messages to the Xig such as xig://time and standard URL's I get exactly what I expect (the time and however the URL responds).  BUT...if I send xig:help the ConnectPortX2 stops responding.  Starting xig.py in a telnet session on the ConnectPort tells me that when I send xig:help the ConnectPort goes into a loop of errors.  The ConnectPort X2's CPU maxes out at 100% and xig:abort and xig:quit don't seem to do anything helpful. 

Kingsley Hill

unread,
Mar 22, 2015, 12:21:52 AM3/22/15
to xbee-inter...@googlegroups.com
This is related to this line in xbee_xmit_stack:

self.__xbee_sd.sendto(xmit_req.buf, xmit_req.flags, xmit_req.addr)

 
if the xmit_req.buf is larger than 199 bytes (the help text is far more) this line crashes and enters a continuous attempt to send the same buffer resulting in a looping failure that can only be stopped by rebooting the CP X2. 
Since the normal behavior if an unrecognized command arrives (ie not preceeded by xig:// or http:// ) xig displays the help text.  SO...if you send xig://help or an improperly formed request the CP X2 crashes.

Now...how is the best way to solve it.  I have done this, but it seems a but klugy:

if (len(xmit_req.buf) > 195):

     logger.info("Excess Buffer Error")

     self.__xmit_table.expunge(xmit_req.addr.transmission_id)

Reply all
Reply to author
Forward
0 new messages