# How to setup 2 xbee wifi to send data like Xbee S1 or S2

**URL:** <https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077>\
**Category:** XBee - WiFi\
**Tags:** arduino, xbee\
**Created:** [January 13, 2016, 10:37am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077 "2016-01-13T10:37:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![NGUYEN](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@NGUYEN](https://forums.digi.com/u/NGUYEN)\
**Post date:** [January 13, 2016, 10:37am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/1 "2016-01-13T10:37:17Z")

</div>

Hi,

I need to transfer data (for example 1 byte) from 1 Xbee-wifi to another Xbee-wifi like Xbee S1 (or S2). How can I setup them ? Can anyone give me simple example?

---

<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:** [January 13, 2016, 11:24am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/2 "2016-01-13T11:24:43Z")

</div>

If they are both Associated with an Access point, it should be as simple as setting the DL of one radio to match the MY of the other. Also make sure you are paying attention to the Port numbers as well.

---

<div class="post-metadata">

**Author:** ![Rocker1446](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/rocker1446/32/21_2.png) [@Rocker1446](https://forums.digi.com/u/Rocker1446)\
**Post date:** [January 13, 2016, 1:40pm UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/3 "2016-01-13T13:40:50Z")

</div>

Hello NGuyen,

In the manual on page 38 you will find a description of setting up an Ad-Hoc network. This is a good option if you are only using 2 radios. If you plan on using more than 2, then you will need to use the method described by MVUT.

I have taken the excerpt from the manual describing Ad-Hoc and inserted it below:

Ad hoc networks  
Wireless devices can get on a wireless network without an access point. This is called an Ad Hoc or  
IBSS (Independent Basic Service Set) network.  
Note Ad hoc networks are point to point: there can only be two nodes in the network, a creator  
an a joiner. Set up the creator first, and then the joiner.  
Ad hoc creator  
Set up the following parameters for the creator:  
• AH1 designates the node as an Ad hoc creator.  
• MA1 specifies static IP addresses. (No DHCP is supported in Ad Hoc mode.)  
• EE0 specifies no security. (Security is not available in Ad Hoc mode.)  
• CH may be any channel from 1 to 0xB.  
• ID sets the SSID, which is any string of choice, as long as it isn’t the same as another SSID in the  
vicinity.  
• MY sets IP address of creator node.  
• DL specifies IP address of joiner node.  
• MK sets IP mask for both of the above addresses.  
Ad hoc joiner  
Set up the following parameters for the joiner:  
• AH0 designates the node as an Ad hoc joiner.  
• MA1 specifies static IP addresses. (No DHCP is supported in Ad Hoc mode.)  
• EE0 specifies no security. (Security is not available in Ad Hoc mode.)  
• ID sets the SSID, which must match the ID of the creator. Problems arise if it matches the SSID of  
an access point in the vicinity.  
• MY sets IP address of joiner node.  
• DL specifies IP address of creator node.  
• MK sets IP mask for both of the above addresses.

---

<div class="post-metadata">

**Author:** ![NGUYEN](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@NGUYEN](https://forums.digi.com/u/NGUYEN)\
**Post date:** [January 16, 2016, 1:21am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/4 "2016-01-16T01:21:09Z")

</div>

Thank you for your answer, mvut!

I have tested successfully with this configuration.

But I wonder if I can make a talk between 2 Xbee-Wifi directly or not?

Now I can transmit data between 2 Xbee-Wifi based on Ad HOC configuration thank to Rocker1446 advice.

---

<div class="post-metadata">

**Author:** ![NGUYEN](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@NGUYEN](https://forums.digi.com/u/NGUYEN)\
**Post date:** [January 16, 2016, 1:21am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/5 "2016-01-16T01:21:24Z")

</div>

Thank you for your comment. It’s useful. I have successfully tested with this. But I have realized that this configuration is not stable. They are periodically stop transmitting data after some times. I don’t understand why? It’s OK without stopping when I used normal setup (==\>\> both connect to an access point).

---

<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:** [January 18, 2016, 8:37am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/6 "2016-01-18T08:37:06Z")

</div>

Have you checked your socket timeout values within your PC’s TCPIP protocol or the radios socket timeout values?

---

<div class="post-metadata">

**Author:** ![NGUYEN](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@NGUYEN](https://forums.digi.com/u/NGUYEN)\
**Post date:** [January 20, 2016, 8:10am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/7 "2016-01-20T08:10:07Z")

</div>

Hi mvut,

I’m sorry that I dont understand your question (I’m not familiar with wifi much)!

Do you mean TCPIP protocol are the parameters TM(TCP Client Connection Timeout) and TS(TCP Server Connection Timeout) in XCTU?

And where can I find “the radios socket timeout values”?

---

<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:** [January 20, 2016, 8:12am UTC](https://forums.digi.com/t/how-to-setup-2-xbee-wifi-to-send-data-like-xbee-s1-or-s2/16077/8 "2016-01-20T08:12:49Z")

</div>

Yes, these are the commands I am referring to. You can find out their default values using XCTU’s Firmware explorer.
