clone from http://code.google.com/p/python-xbee