Introduction: Configuring Wifi Xbee (S6B)

Picture of Configuring Wifi Xbee (S6B)

This tutorial will help to setup Xbee SB6 or other wifi Xbee to work with the transmitted data using a client.

Considering the lack of documentation and code support for Xbee S6B,
this would be a good template for general usage. Using Xbee wifi modules to communicate to a computer using python, also to gather and use the data in general. The code included with this project is tested on Xbee S6B, but should work on most raw feed wifi hardware, including other wifi Xbee models.

Hardware:
In this test, the Xbee S6B is connected to the (Rx,Tx) serial of a Arduino. The Xbee transmits user defined data printed to the serial, this data is read by a client connecting to the Xbee, using the code included. The Xbee is configured in SoftAp mode.The IP address, socket,ssid and other parameters of the Xbee may be changed by using the XCTU software.

Lets begin

Step 1: Hardware Setup

First, connect the Xbee to the computer to set it for operation. You may do this in different ways. Two of which,are the following :

1>Use Arduino to program the Xbee

2>Use a Adapter Board

1>

Procedure:

Using an Arduino, program it with a default blank sketch. Should be similar to this.

void setup() {

}

void loop() {

}

Note: In some older Arduinos, having the RX and TX port connected while programming the Arduino, may result in errors. In that case, please disconnect the RX and TX pins of the Arduino, program it and then reconnect them after programming.

download the latest version of XCTU software and install.

Connect RX(pin 0) and TX(pin 1) pins on the Arduino to the RX(pin 3) and TX (pin 2)of the Xbee.(Opposite)

Connect the Arduino to USB port on the computer.

Execute XCTU, locate your Arduino COM port and read the Xbee.

2>

Procedure:

Plug Xbee to the adapter.

Connect the adapter to the computer.

Execute XCTU, locate your COM port and read the Xbee.

.

Step 2: Xbee Configuration

Change these values to your specifications:
Mode = SoftAP

Destination IP: IP of your computer.

Module IP: IP of your Xbee.

Destination port (Port for computer) = Source port (Port for Xbee) (both should be same)

Gateway IP: (should be same on both Xbee and computer)

SSID: Name of your Xbee Broadcast.

Save these settings.

Step 3: Computer Network Config

On your computer ,

Go to control panel>Network>Xbeessid>Properties.>TPC/IPv4>Properties

change your IP to Destination IP on Xbee.

change your gateway to Gateway IP on Xbee.

Step 4: Connect to Xbee AP

Search the wifi on your computer , connect to the Xbee ssid .

Once connected ,

go the the following link and download the .py file .

https://github.com/Serpent999/Xbee-S6B-Wifi-Commun...

Download the .py file. If you do not have socket module for python , please download and install that.

Replace the IP with the IP of your Xbee and port with the port of your Xbee. The port is in HEX in XCTU, convert it in decimal , then input that in the code. Program the Arduino to print to the serial.

Connect RX(pin 0) and TX(pin 1) pins on the Arduino to the TX(pin 2) and RX (pin 3)of the Xbee. (Normal)

Run the code. you will find the data printed on the python GUI. The connection will take a while to initialize , please wait for a minute or two. This template is generic and the data can be then operated specifically.

Comments

AdityaA86 (author)2017-05-22

Can u help me sir?

I use S6B and i want to see output character from Hercules Setup Utility, when arduino do Serial.print(); why i can't see the character was i sent from Arduino?

Anyone can help me?

NikhilL7 (author)2017-03-22

Please bear with me, I have been out of town for a while now and will post the video based revision when I get back around May.

DIY Hacks and How Tos (author)2016-12-19

Cool project. One thing that you might consider is embedding the video on the page. You can use the Embed Video tool in the step editor to embed the video on the page. That way people will be able to view it without having to download it.

Thank you sir , will do that and refine this tutorial soon.