# Change ID dinamically via AT commands (zigbee th reg)

**URL:** <https://forums.digi.com/t/change-id-dinamically-via-at-commands-zigbee-th-reg/21114>\
**Category:** Other RF Products\
**Tags:** at-commands, xbee-s2c, xbee\
**Created:** [February 11, 2020, 10:27am UTC](https://forums.digi.com/t/change-id-dinamically-via-at-commands-zigbee-th-reg/21114 "2020-02-11T10:27:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scrogy](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Scrogy](https://forums.digi.com/u/Scrogy)\
**Post date:** [February 11, 2020, 10:27am UTC](https://forums.digi.com/t/change-id-dinamically-via-at-commands-zigbee-th-reg/21114/1 "2020-02-11T10:27:27Z")

</div>

Hi,

I’m working with arduino and xbee s2c(zigbee th reg).

Now I’m trying to make my particular system to pair the devices.

First, I want to change one xbee to a “default” network(ID),then search for not registered xbees, regirter them, and then make them to change to the “communication” network(ID). When the search is complete, that xbee also goes to the communication network.

Things go right the first attempt, the xbee changes ID, make contact with the other xbee with that ID, make them change it, and then it changes its ID itself and make contact another time with them with the new ID.

The commands I’ve used are the next ones:

+++  
ATID3232(for example)  
ATWR  
ATCN

The problem is that it’s not stable, if I want to make the process again with other ID for the “default” and “communication” channel, maybe they never start talking, even being in the same ID (make sure using ATID and reading the response)

---

<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:** [February 12, 2020, 1:45pm UTC](https://forums.digi.com/t/change-id-dinamically-via-at-commands-zigbee-th-reg/21114/2 "2020-02-12T13:45:07Z")

</div>

Scrogy,

If you are wanting to change the ID field on a remote module to a given value, you will have to use API mode. So in your application, the coordinator would have to do the following:

Set ID to default value  
Allow Joining to occur  
Send a remote AT command to change the ID value on the remote module (end devices first with farthest node first). Then work to the routers and the closest node to the coordinator last.

Change the ID value on the coordinator to the new value and allow Joining to re-occur.

Eric  
Digi Support
