# How to handle when a Xbee radio Joins a network?

**URL:** <https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384>\
**Category:** Edgeport\
**Tags:** xbee-pro-s2b, panid, joining, xbee-java-library\
**Created:** [May 23, 2017, 1:14pm UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384 "2017-05-23T13:14:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Molas89](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Molas89](https://forums.digi.com/u/Molas89)\
**Post date:** [May 23, 2017, 1:14pm UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/1 "2017-05-23T13:14:19Z")

</div>

Hello,

I know that if I start the discovery process (speaking about Java library), a listener class (IDiscoveryListener) bring to me a list of the discovered radios during the process, but there is a “step” that I haven’t couldn’t catch, and is when an en device radio joinst the network (gattering the same PAN ID)…  
I’m using XBEE Pro programmable S2B and working with the java library

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [May 23, 2017, 1:33pm UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/2 "2017-05-23T13:33:54Z")

</div>

I am not sure I understand your question. Can you rephrase it?

---

<div class="post-metadata">

**Author:** ![Molas89](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Molas89](https://forums.digi.com/u/Molas89)\
**Post date:** [May 31, 2017, 10:41am UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/3 "2017-05-31T10:41:32Z")

</div>

OK np.  
I would like to know if with the java lib, there is a kind of ‘‘call back method’’ that is executed when a radio joins the network.

This is the environment:

I have a Coordinator radio, and I wan to know if some radio joins the network, the Coordiantor tellsme that one radio has joined the network.

---

<div class="post-metadata">

**Author:** ![Molas89](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Molas89](https://forums.digi.com/u/Molas89)\
**Post date:** [May 31, 2017, 10:41am UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/4 "2017-05-31T10:41:30Z")

</div>

OK np.  
I would like to know if with the java lib, there is a kind of ‘‘call back method’’ that is executed when a radio joins the network.

This is the environment:

I have a Coordinator radio, and I wan to know if some radio joins the network, the Coordiantor tellsme that one radio has joined the network.

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [May 31, 2017, 11:25am UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/5 "2017-05-31T11:25:06Z")

</div>

I don’t know if the Java Lib can or not but the radio can if you enable API mode and enable the JN command.

---

<div class="post-metadata">

**Author:** ![alvina35](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@alvina35](https://forums.digi.com/u/alvina35)\
**Post date:** [September 14, 2017, 9:09am UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/6 "2017-09-14T09:09:31Z")

</div>

When a module joins the network.it automatically receive the network key from the so called center.in Xbee network,the trust center always runs inside the coordinator.

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [September 14, 2017, 9:14am UTC](https://forums.digi.com/t/how-to-handle-when-a-xbee-radio-joins-a-network/18384/7 "2017-09-14T09:14:50Z")

</div>

This is not a trust center function but a function of the Join Notification command or JN command.
