# Select particular end-device to send data.

**URL:** <https://forums.digi.com/t/select-particular-end-device-to-send-data/11225>\
**Category:** XBee Programamble (S2C & 900 HP)\
**Created:** [April 24, 2012, 3:23pm UTC](https://forums.digi.com/t/select-particular-end-device-to-send-data/11225 "2012-04-24T15:23:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![souvikroy](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@souvikroy](https://forums.digi.com/u/souvikroy)\
**Post date:** [April 24, 2012, 3:23pm UTC](https://forums.digi.com/t/select-particular-end-device-to-send-data/11225/1 "2012-04-24T15:23:42Z")

</div>

Hi all,  
I’m a newbe in XBee. I have three XB24-B modems. One of them is a coordinator using the function set ZIGBEE COORDINATOR AT. The other two are  
end devices using the function set ZIGBEE ROUTER/END DEVICE AT. The coordinator is connection to a microcontroller (pic18F452). I want to send data to one end device at a time. All the end devices are also connected with PIC18F452. Currently I’m using AT command to enter the command mode and set the DL address of the desired end device in the coordinator with the ATDL command. My question is whether this is the proper way to do it, or is there any other better way.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)\
**Post date:** [April 24, 2012, 3:36pm UTC](https://forums.digi.com/t/select-particular-end-device-to-send-data/11225/2 "2012-04-24T15:36:10Z")

</div>

You will find using API mode on the coordinator (COR) simplifies your task _IF_ your design is only that the COR talks to either of the remotes & the remotes just reply to the COR. You’ll find having to manually ‘break’ into command mode between packets error prone. Plus you get no feedback in At mode - in API mode you’ll get a TX Status response from the COR stating that the packet was handed off or not.

in ZigBee, the DH/DL 0/0 is a short hand for ‘return to COR’, which makes that part of your job easy even in AT mode.

---

<div class="post-metadata">

**Author:** ![souvikroy](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@souvikroy](https://forums.digi.com/u/souvikroy)\
**Post date:** [April 25, 2012, 5:42am UTC](https://forums.digi.com/t/select-particular-end-device-to-send-data/11225/3 "2012-04-25T05:42:23Z")

</div>

Thanks for the reply.  
As i have stated earlier,l i’m a newbie in this field, i haven’t used API mode yet. I have started reading about it after reading your reply. Can you please suggest me a good link about API tutorial.  
Furthermore my end devices won’t reply to the coordinator immediately. They will send notifications to the coordinator every once in a while. Can i track which end device sent the notification using API mode?  
Thanks.

---

<div class="post-metadata">

**Author:** ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)\
**Post date:** [April 25, 2012, 6:43pm UTC](https://forums.digi.com/t/select-particular-end-device-to-send-data/11225/4 "2012-04-25T18:43:36Z")

</div>

Well, there is this stuff, which might be more Python oriented: [http://www.digi.com/wiki/developer/index.php/Category:Digi\_API\_Frames](http://www.digi.com/wiki/developer/index.php/Category:Digi_API_Frames)

If you just do a web search for digi xbee api code you will find a variety of online open-source projects based in C, C++, Java and so on. ‘[code.google.com](http://code.google.com)’ for example has several.

---

<div class="post-metadata">

**Author:** ![souvikroy](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@souvikroy](https://forums.digi.com/u/souvikroy)\
**Post date:** [April 27, 2012, 11:14am UTC](https://forums.digi.com/t/select-particular-end-device-to-send-data/11225/5 "2012-04-27T11:14:43Z")

</div>

Thanks a lot for the help.
