Home/Support/Support Forum/How can I send the HTTP GET request from the Xbee Wifi S6B module connected to the microcontroller ?

How can I send the HTTP GET request from the Xbee Wifi S6B module connected to the microcontroller ?

0 votes
asked Sep 4, 2014 in IEEE 802.11 (Wi-Fi) by Suresh91439 New to the Community (3 points)
Suresh,
I'm trying to send an HTTP GET request to my Xbee Wifi S6B module and have having issues.  I see that you were able to do this successfully.  Could you please post your code and setup of the radio to help guide me.  I'm using firmware version 2023.

Please log in or register to answer this question.

2 Answers

+1 vote
 
Best answer
This can be done in a couple different ways. The most obvious way is to keep the module in transparent mode (factory settings) and set up the module using AT command.

It involves the following steps:
1) set up your module so it connects to a router, such as SSID, security, passkey
2) set up your module so it will connect to the web server address and port, and indicate TCP connection
3) simply send out an HTTP GET header to the xbee's serial port and wait for response.

Now, before I type something in detail, do you know how to use AT commands on xbee modules?
answered Sep 7, 2014 by liudr New to the Community (41 points)
selected Sep 8, 2014 by Suresh91439
Thank you for your reply, I know how to use AT commands and i followed the steps you mentioned now I'm able to send the request and get the response :) :) .
You are welcome! Just want to share with you something I've found out about this module on the forum, before you spend too much time tinkering with the module: the module is intended as a serial port line replacement. It's not specifically designed to do any wifi stuff. As an example, you can't control sockets even in API mode. They open and close automatically by the firmware. This frustrates me as I have to wait some long time (say 15 seconds) after I receive everything from my server before breaking out of the wait loop. If I had a way to detect the socket is closed by server (I request connection-type: close), I can jump out of the wait loop as soon as server disconnects, so much sooner. Also the server function seems broken. I read posts here saying that internal web server in the firmware will intercept HTTP GET or POST from a client so the module never receives the requests.

So before you plan on your project with this module, consider the above. This could break your project.
Thank you for your suggestion. In my project role of this wifi module is just logging the data and getting the request from the server for controlling the devices connected to this module based board.
0 votes
I need the same code, Please send me how to send AT commands on Xbee module and get and post on S6B module.
raman291992@gmail.com
answered May 14, 2018 by raman291992 New to the Community (1 point)
...