Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years ago.
Has anyone succeeded in making a Wifly HTTP server?
I'm trying to assemble an HTTP server using a Roving Networks Wifly module. I can successfully compile and run the HTTPServerExample in the cookbook, using ethernet, including the RPC protocol. And I can successfully compile and run the WiflyHelloWorld example, join my wifi network, and telnet to the Wifly module via wifi. However, if I import the official mbed Wifly interface into the HTTPServerExample, the compiler reports many "TCPSocket" is undefined and "TCPSocketEvernt" is undefined errors arising from the HTTPRequestHandler and TTPRequestDispatcher. These are deep in the HTTPServer library. If I delete the EthernetNetIF library and the #include "EthernetNetIf.h" statement (still keeping the WiflyInterface library and calling it with #include "WiflyInterface.h") then the compiler gives a different error: "cannot open source input file "core/net.h": No such file or directory. This one is also from the HTTP Server library.
Has anyone succeeded in combining the HTTP Server Library with the Wifly Library? Or is there a different way to implement an HTTP server over the Wifly interface?
Question relating to:
7 years, 8 months ago.
I would say I have succeeded in this - SmartBoard WiFly is where I've documented my work. There is a lot more that could be done, and over time I'll implement some improvements. This page has a schematic for how I interfaced it, pictures of a PCB, and near the bottom is a link to my sample program.
8 years ago.
Thanks for your note. I was surprised not to get an answer back from Samuel Mokrani who wrote the Wifly interface. He seems very responsive to other queries. It’s supposed to be directly compatible with all of the applications that operate with the Ethernet library but I was unable to use the HTTP server library with the Wifly library. I did get a simple web server working based on this program http://mbed.org/users/arhpoon/code/RN-XV_simple_server/ which uses an earlier, less robust, version of Sam’s Wifly interface. My program serves my purposes okay but isn’t very stable and I had to write a lot of spaghetti code to make it respond properly to various browsers and also for various intervals the browser or the server are idle. There are various other problems with it, so I still would like to get the official HTTP Server to work with the official Wifly interface. But I haven’t made any progress on that.
If you come upon any solutions to my original problem, please let me know.
8 years ago.
Sorry for the late answer... The HTTPServer server example uses the old Ethernet library and not the new one (EthernetInterface). The WiflyInterface interface and the EthernetInterface libraries have the same API so a program working with EthernetInterface is directly compatible with the WiflyInterface library. That is why the HTTPServer is not compatible with the WiflyInterface.
At the moment, the protocols implemented using the new EthernetInterface library are: http://mbed.org/handbook/TCP-IP-protocols-and-APIs. As you can see there is no HTTPServer currently.
A good starting point to have the HTTPServer working with the new WiflyInterface is to firstly port it to the new EthernetInterface library.