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.