Sync with http://mbed.org/users/johnb/code/XBeeApi/ 27:6356ef5fe39b