Cerbuino bee and webserver using Xbee Roving Networks wifi

Can anyone give me example code , even a site with a simple hello string would work.
thanks in advance.

Welcome to the community.
if you search the codeshare site you will find plenty of demo on webserver…

or you can try this one:


also you will have to decide which frame work you will be using your Cerbuino with, regular NetMF or gadgeteer…
codeshare has both examples : for netmf see above link and for gadgeteer look for webserver on spider.

Thanks for the welcome,
What i wanted to know was that can I use WiFi module and Host a website. its not about how to host a site but rather hosting a site using the WiFi module
because the sample on the site

// Declares the WiFly module, configures the IP address and joins a wireless network
WiFlyGSX WifiModule = new WiFlyGSX();

// Showing some interesting output
Debug.Print("Local IP: " + WifiModule.LocalIP);
Debug.Print("MAC address: " + WifiModule.MacAddress);

// Creates a socket
SimpleSocket Socket = new WiFlySocket("www.netmftoolbox.com", 80, WifiModule);

// Connects to the socket

// Does a plain HTTP request
Socket.Send("GET /helloworld/ HTTP/1.1\r\n");
Socket.Send("Host: " + Socket.Hostname + "\r\n");
Socket.Send("Connection: Close\r\n");

// Prints all received data to the debug window, until the connection is terminated
while (Socket.IsConnected)

// Closes down the socket

is using sockets. but running a webserver is a bit different.

I don’t think that module can host a webserver - I’ve had a look through their programming manual [here] and it looked like the command set supports creating an HTTP client to either GET or POST to a remote server, but I couldn’t spot anything supporting listening for incoming connections. The code you post is from [here], which I think is wrapping the underlying serial command set into a more object friendly sockets implementation. The list of classes supported in that wrapper is [here], there’s nothing I can see for setting up a port listener with an event delegate. Still, there are ways round, for instance if what you’re wanting to achieve was originally to poll the cerbuino for some sensor status or similar, you could instead run an intermediary computer somewhere running a REST service, or even a public one like CoSM, then your Cerbuino can POST out to that, and you can interrogate your data across the internet by polling that REST service instead of your Cerbuino - probably uses less resources on the memory-constrained wee beastie too.


The device I am making does not allows me to have a computer in the project.
The gadgeteer wifi module is also not working.
When I add it to my circuit in the designer it says
The module cannot be added
A required library was not found.
same happens when I add the camera module and the Ethernet module.
I am using the latest SDK available at the support link.
if I am doing something wrong , kindly correct me , or if the library isnt really there , then kindly give me a rough estimate on when will it be available.
I need to be able to connect the Bee wirelessly to internet and also host a site on it.
I also wanted to confirm if I can use the SD card reader onboard to put resources for the webpage , like my company logo and small graphics objects.

You’re not doing anything wrong, the Cerbuino Bee doesn’t support every type of module. Not all main boards are created equal. Each module has a letter on it to say which type of socket it can go in, the camera requires H, the ethernet module requires E - the Cerbuino doesn’t have these. The Wi-fi module requires S, but also says it requires the premium libraries, not available on the open-source Cerbuino.

Even if you found a way to host a web page on the Cerbuino, its extreme memory constraints would make it hard to make it pretty with logos etc. - you need the Fez Spider instead, with more memory, more socket types supported, premium libraries, camera and ethernet support, ability to run a web server. The Cerbuino is the wrong main board for the project you want to do. The nearest you could get, with the equipment you have, is to have the Cerbuino post data to https://cosm.com/ using the Roving Networks WiFly where you could pick it up over the internet.


will cerberus work , if I only use a wifi module to host a webserver and sd card module for the resources ? (but I think that both have the same firmware , right ?)
Cost is a issue here , because i want to mas produce this later on. Spider is way too expensive.

No - Wi-fi module only works on Spider, not Cerberus, Cerbuino, Cerb40 or Hydra, all of which are open-source and do not have access to GHI’s premium software libraries. Also, Wi-fi module is $100, so you probably wouldn’t want to use it anyway.

Perhaps if you say what you are trying to achieve, instead of naming the tools you hope to get working to achieve it, people might have suggestions?

Is this http://www.sparkfun.com/products/9333 the WiFlyGSX you are using? From the datasheet:

[quote]In the simplest configuration the hardware only requires four connections (PWR, TX, RX, GND) to create a wireless data connection. Additionally, the sensor interface provides temperature, audio, motion, acceleration and other analog data without requiring additional hardware. The WiFly GSX module is programmed and controlled with
a simple ASCII command language.[/quote]

IF this just uses serial TTL at 3.3V to communicate with a uC, it should be straightforward to implement, but is something nobody here has done (or at least provided on our codeshare) to the best of my knowledge.

@ Ransomhall, I already linked to drivers for the WiFly above in reply #3, they’re part of the .NET Micro Framework Toolbox project on Codeplex, geared towards Netduino but should still work. The problem shehrozeee faces is that the WiFly doesn’t support hosting a webserver, whether via its native ASCII serial command set or via the SimpleSocket wrapper in the netmftoolbox project, it can only initiate outgoing connections itself and can’t listen for incoming connections.

@ RorschachUK thats the problem, even if I could use not use images or use external links to my server and get pictures from there , the module wont give me a listener to check the connections on port 80.
You suggested FEZ spider , I cant even add a wifi module in it on FW 4.2 , I can add it in 4.1 though , can you guide me here ? have the premium libraries been removed , or are they under work.

If you’re using Fez Spider, best (for now) use stable 4.1 from the links [here]. 4.2 are in beta and coming soon, but right now this minute aren’t as well supported as 4.1.

Another possible option to consider - [ENC28 Module] wired ethernet port plus external wi-fi- bridge?

Please take a look at release notes in 4.2. Networking on spider is not supported yet.

Here it is http://www.tinyclr.com/forum/topic?id=7457

About when can I expect the wifi support.
as I want to use a ph & temp sensor module from love electronics and they said its for MF 4.2
If I use 4.1 to use wifi to host a webserver on spider , I wont be able to use the sensor modules.
I cant find any useable solution up till now,
I switched from cerbuino bee motherboard to spider board and I still cant get what i want.
I want

Wifi support (with webserver running through wifi).
Ph and Temp sensor from love electronics working.(it uses y slot).
A load module.
A sd card read/write module for local data resource.
A USB Dual mode power supply for power.(your DP module)
OPTIONAL a camera module.
A gadgeteer main board to run all this.

I am really good with C#. But I want to try gadgeteer for my project.
I normally use an Intel Atom Motherboard as the mainboard and USB interfaced Pic 18f for electrical control
I just make a windows application and run it on atom , every thing is controlled by it later on. webservers , lan connections , wifi , cameras and what not.

Kindly suggest me a solution to this.

FEZ Spider should have wifi ready in about a month if all goes well. We are still testing/finishing everything except networking.

another thing I notice is that some modules dont show up in the toolbox like the relay module and the ENC28 module. am i missing some installations ?

next sdk will have them all. should be in few days

@ Shehrozeee, I bet you could get that temp & Ph sensor working in 4.1 with a bit of code tinkering, it’s I2C on an I socket (not Y) and Love Electronics are likely to release the source for it tomorrow. Or, on 4.2 you could carry on with the Cerbuino / Roving Networks WiFly original plan and upload to CoSM instead of running a webserver as I suggested earlier - no camera, but otherwise sounds ideal to me, for instance one of the forum posters here (Duke Nukem) set up sensors measuring temperature, humidity, light etc in his office, you can check the feeds [here], that’d be the sort of end result you want, isn’t it? Why run a webserver when someone else is willing to do it for you for free? His blog post about it is [here].

Or, there are other options outside Gadgeteer too (Don’t hate me Gus!). For instance, Arduino plus pH & temp sensors plus wi-fi shield would probably work, there’s a similar sounding project [here] - or, even cheaper, I’ve got a Raspberry Pi [link], it’s a lovely little $35 Linux board which can easily support Wi-fi (via a USB stick), can easily host a web server, can plug in a USB webcam, and has some GPIO pins available which support I2C so you can probably even find a way to talk to your Ph and temp sensor. It needs 5V USB-spec power input via a micro-USB connector, and so will work off e.g. a Kindle or Blackberry charger, or you could get a powered USB hub and use one input to power the Pi and the others as a hub for webcam, Wi-fi stick etc. You’d have some software to write of course, but it’s Linux and so supports any programming language that works on Linux. To me this sounds much, much cheaper albeit at a cost of some development time - and probably more similar to what you’ve been doing with an Atom-based board.


thanks for the quick replies