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

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?

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.

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.

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.

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).

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

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”?

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