WiFi HTTPServer concept

05 May 2010 . Edited: 05 May 2010

I had an idea for a project - a sensor data logger with a wireless network you can connect to with your mobile phone/handheld device internet browser.

Since touchscreens are rather expensive (and I don't have time to write all the interface/display code), and I own an iPhone, I thought this might be a more budget/time friendly option.

In certain cases, it may be more convenient to have a wireless display/control system as opposed to a hardwired one. I'm thinking this would be ideal in car diagnostics, home automation, robot control etc.This way also means that the mbed only sees the post requests from the browser, leaving it to work away in the background.

I think with a few modifications, simplehttpd would work nicely. Thoughts? To display data I would make the page refresh every second or two with a bit of javascript. Or perhaps ajax?

I'm having a little trouble sourcing a budget friendly WiFi chip/board that can act as a server - does anyone know of one? Do you think using a plug in wireless access point would be easier/cheaper (I can get a WAP for $45 AUD)?

05 May 2010

Sounds like a good concept.

The WiFi connection was already mentioned before, has to be SPI/UART connection, since you can't use a PCI bus or a (R)MII bus.
[ link to post ]

Another options would be bluetooth connectivity between the mbed and iPhone, but that will require a custom application. Something I would like to do later on in life.

Alternatively you can use an access point, but this will make the concept a lot bigger, you need more and/or other power sources, and a WAP is slightly cheaper then the WiFi board in the link. Unless you want to hook up more to the network.

Simplehttpd would serve pretty well, quick refreshes do seem to work fine (~1 or 2 secs.). Currently I'm modifying the simplehttpd to fit a bit more into my own project, but the refresh was also something I had in mind. And javascript kinda equals ajax (but that's another story). The benefit here is that most of the actions can be done on the client-side, which makes it easier for the mbed.

Since I've done this trick on other systems to obtain data, here's a piece of code which is useful.

[ link to article ]

06 May 2010

Please tell me if I'm dead wrong, but I believe you could save a lot of money if you somehow use a cheap usb wifi adapter with the usb port on the mbed.  This could prove to be a daunting task, but with some work we all could benefit greatly.  Either way, this does sound like a fine idea and could be used for a number of applications.

06 May 2010 . Edited: 06 May 2010

My initial thought was bluetooth, but apparently it's only avaliable in iPhone SDK 3, and you have to jump through a few hoops. Link

Also it's more cross-device compatible as a web interface.

I've had a look at the WiFly, but I can't see a way to create a network, only join one. SparkFun have done a tutorial on using the WiFly to create a device that connects to their WiFi network and allows you to send/recieve information from the browser.

I've found this device (MultiTech's SocketWireless Wifi) and this (Lantronix's MatchPort b/g), but I'm not sure if they can act as a server or just client. I've shot an email to each company (and Roving Networks) asking for some more information - I'll update this page if/when I recieve replies.

06 May 2010

I am presently working on an improved version of the TCP/IP Stack, including a more robust HTTP server and support for ZG2100 Wifi modules, which are pretty cheap and very complete in terms of functionality (and can be interfaced with lwip or any other stack).

You can get one for a little more than 18£ here in the UK (http://uk.farnell.com/microchip/zg2100mc/module-wi-fi-w-pcb-ant-802-11/dp/1791037?Ntt=ZG2100). I should be able to release a first version of the stack in the next ~ 15 days.

The USB dongle solution seems really nice, but has to be investigated more deeply to assess wether it is really doable or not, especially since there is loads of different chips around... you can have a look at the various wifi dongles linux drivers as a starting point.

07 May 2010

Very interesting concept.  I have a Lantronix Matchport that I bought a while back for another project.

I'm not sure what wireless modes it supports, but if I have time this weekend i'll play around with it and see what network types I can create.

30 May 2010

I've been rather busy with uni, but this is an idea I'm pretty keen to continue with. Most the devices I've heard back about are capable of connecting as an ad-hoc network. I think this should work fine - we only want to connect to just the one portable device (in my case the iPhone). From what I've seen on the net they seem pretty simple to set up - create, configure, then connect.

After exams I'll buy one of the wifi modules and see how it goes.

02 Aug 2010

Donatien,

How is the progress going on updating the htttp stack with support for ZG2100 Wifi modules?

14 Oct 2010

Has there been any more development with this or other wifi modules? Just got my hands on an mbed and would like to get it wifi'ed.

14 Oct 2010 . Edited: 14 Oct 2010

I have managed to get the Wifly GSX Breakout working nicely with my mbed.

It is at the center of my current mbed Competition entry. I am having some issues currently getting it to work with secure networks and I have found that the antenna is pretty poor. It is probably worth getting a U.FL external antenna.

When I get some time I will write a Wiki page for it and post up some sample code.

14 Oct 2010

I'm afraid I went with XBee for the current project. Will look at using this (Sparkfun WiFly Breakout) for my next project (probably early next year). A few comments of success for connecting with Ad-Hoc to iPhone.

14 Oct 2010

Thanks, will have to look into those different options. I was looking into wifi so I could connect to a network and then sending data between the mbed and an iPhone. I've just started with both so I'm just trying to get a feel for what options are available.

 

Looks like a worthy project Daniel, I'll be looking forward to the wiki page and any project updates :)