How can I use "uart_write" and "uart_read" to exchange data between Xbee programmable modules?

I’m trying to implement the Dorbell example from Faluti’s Book. But, in my case, I using 2 xbee programmable boards.

OK, I understood the example using arduino, but it has been hard to understand how the freescale microcontroller interacts with the xbee module.

I have been reading the Programming Guide , but sometimes I fell lost.


Try using the Help file found within the SDK. It has examples on how to use the different Write and Read functions. For example:
int radio_uart_config ( uint32_t baudrate,
uint8_t config
size_t uart_read ( void * buf,
size_t len
size_t uart_write ( const void * buf,
size_t len


Doorbell is a good practical project to get going with! To get started, I’d recommend you to check out how the XBEE Transparent serial interface endpoint works ( ). The following examples in the Codewarrior should help you get started:

The doorbell button

  • WPAN / ZigBee / Transmit basic frames - Although the example is very easy, it shows how to send a frame using the transparent serial interface. Instead of sending the frame every second, tie this to your button press logic.
  • Power Management / ZigBee / Wake up on packet receiving and on gpio press for transmitting. This example illustrates well how your doorbell button can be in sleep mode to save battery (it is probably planned to be a battery operated button, right?).

The receiver/coordinator:

  • WPAN / ZigBee / Basic frame reception - this example shows you how to process incoming frames. Even running this example as is, it should make the received frames show up on the serial interface as printouts. Just make sure you put the coordinator and the end-device to the same network.

Good luck and cheers!