# Build a xbee mesh enviroment

**URL:** <https://forums.digi.com/t/build-a-xbee-mesh-enviroment/18157>\
**Category:** Device Manager\
**Tags:** meshnetwork, xbee-api-mode, xbee\
**Created:** [March 20, 2017, 2:51pm UTC](https://forums.digi.com/t/build-a-xbee-mesh-enviroment/18157 "2017-03-20T14:51:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxsh1301](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fxsh1301](https://forums.digi.com/u/fxsh1301)\
**Post date:** [March 20, 2017, 2:51pm UTC](https://forums.digi.com/t/build-a-xbee-mesh-enviroment/18157/1 "2017-03-20T14:51:20Z")

</div>

Hi everyone!  
I’m using xbee for a few times.  
The topology is star with one coordinator and several routers.  
I connected Arduino nano with Xbee router as a sensor node to collect like humidity end temperature.  
And receive API frames from routers via Xbee coordinator with API mode 2.  
Now I want to use the function like mesh topology which allows A node receive B node’s data and route it to C node.  
The goal is to make distance between coordinator and sensor node as long as possible.  
How should I start it?

---

<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:** [March 20, 2017, 4:14pm UTC](https://forums.digi.com/t/build-a-xbee-mesh-enviroment/18157/2 "2017-03-20T16:14:29Z")

</div>

Just like before. The only difference is where you place your routers and the Coordinator.

As long as any two nodes are in range of each other, they will forward the data on.  
A R1 R2 R3 R4

---

<div class="post-metadata">

**Author:** ![fxsh1301](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fxsh1301](https://forums.digi.com/u/fxsh1301)\
**Post date:** [March 22, 2017, 3:44pm UTC](https://forums.digi.com/t/build-a-xbee-mesh-enviroment/18157/3 "2017-03-22T15:44:56Z")

</div>

Thanks for reply, mvut!  
I want to know if the router can forward API frame automatically to next node?  
EX:  
three router xbee A B C  
what I thought is A send API frame to B, then B read the frame and repackage another new API frame with it’s own data and send to C node…

---

<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:** [March 24, 2017, 4:07pm UTC](https://forums.digi.com/t/build-a-xbee-mesh-enviroment/18157/4 "2017-03-24T16:07:01Z")

</div>

Yes it can. The only difference in how the module functions with API mode over AT is how the data is expected or will be provided via the UART. That is it. All other functions are the same.
