programming for Xbee meshing

60 views Asked by At

i have one query actually i have 3 xbees series2.
i want xbee 1 (sensor+xbee(end device)) and xbee 2 as coordinator,where XBee2 will be attched to MCU. now i have xbee 3 which again ((sensor+xbee(end device)). now i want to make xbee3 also to communicate with coordinator(Xbee2). now i have kept the same pan ID of Xbee1 and xbee3 as like Xbee2. and again i have set xbee1 and xbee3 destination address for the Xbee 2 .

now my question are

  1. how do i program the MCU using eclipse environment for receiving both Xbee1 and Xbee3 data?
  2. and i want to communicate all Xbees with UART communication means i want to read data using pin 2 and 3 of Xbee..is it possible??

can anyone provide me the code for developing this procedure???

thanks

1

There are 1 answers

0
tomlogic On

This is a common scenario. Run the coordinator in API mode and the end devices (you may want to start with those nodes as routers, and figure out the "sleeping end device" details once everything else is working) in AT mode.

The "AT mode" devices with DH and DL set to 0 will just pass serial data to the coordinator, and the MCU can parse the API frames to determine which device sent the data. The MCU can also address requests to the other devices -- either Remote AT Commands or data to send out the serial port.

Write code for the MCU however you normally would. There's a portable ANSI C library available if that's your language of choice. It can parse the API frames for you and simplify communications on the network.