fixbug:
 In XBEE.cpp, when the system call return -1, the recv_pos will not be
assigned as -1.