Ok, I'm trying to wrap my hands around communicating over WiFi using a microcontroller. There seem to be various options such as UART, SPI etc.

If I want an Arduino to get or put content on a website, what protocol does the Arduino use to talk with the WiFi module? I see there are cheap UART WiFi modules available, but I don't think they have the TCP/IP stack built in.

2 Questions:

  1. How do I interface between a microprocessor and the WiFi module? Or what connections do I use? I2C, SPI, UART?

  2. What are the minimum requirements for a WiFi module to be able to talk to a website? I want to read data from a website and write data to a website.

I hope this makes some sense, but to me it is still confusing.

  • 2
    \$\begingroup\$ That would entirely depend on the wifi module - pretty much all of these ideas you mention are possible. The TCP/IP stack can be (and for devices intended for simple microcontrollers often is) implemented in the module, giving you essentially a serial-to-TCP bridge with some escaped connection commands, or you can have a SLIP/PPP type solution where packets are sent over the serial link to a TCP stack running on your micro. \$\endgroup\$ Sep 6, 2013 at 15:23
  • \$\begingroup\$ i2s is an audio protocol. Pretty sure you mean i2c. \$\endgroup\$
    – Passerby
    Sep 6, 2013 at 18:53
  • \$\begingroup\$ 1. Yes, I mean I2C! 2. If I want to POST data to an API on a website, or GET data from a website API, what protocol do I need to use? The SLIP/PPP one? The Serial-to-TCP will not work... am I correct? \$\endgroup\$ Sep 7, 2013 at 5:42
  • \$\begingroup\$ I would look into Roving Networks RN-131. It has an easy to use command interface "WiFly" operating over standard UART and an integrated antenna. There are a few breakout boards to make it even easier to get started with. \$\endgroup\$
    – Keegan Jay
    Nov 16, 2013 at 2:05
  • \$\begingroup\$ Also, once you get the Wifi module interfaced with your MCU, if you are still unsure how to use it to get/put content, that deserves a separate question. \$\endgroup\$
    – Keegan Jay
    Nov 16, 2013 at 2:12

2 Answers 2


1.) Whatever you'd like. There are wifi modules out there that can do both UART and SPI even. Example: http://www.rovingnetworks.com/products/Wi_Fi_Modules

2.) I'm not a web developer but I think in terms of minimum requirements you need to be able to open an http or tcp/udp connection with the server and do GETs and POSTs

  • \$\begingroup\$ Which do I use for Internet web traffic? UART or SPI or something else? The module seems easy to use. It only needs 4 connections, but what type of data do I send down the TX/RX? That is the mystery part to me. \$\endgroup\$ Sep 7, 2013 at 5:40
  • \$\begingroup\$ @andrebruton For a better understanding check out the Wifly training presentation pdf on this page: rovingnetworks.com/products/RN171 Looks like you'll be sending the wifi module commands over uart for example (TX) and receiving the wifi module's response (RX). Not sure what you're asking about internet web traffic.. \$\endgroup\$ Sep 7, 2013 at 14:04
  • \$\begingroup\$ Hi, the RN171 looks great, has low power, can talk http and can run a sensor network without a microprocessor. What connections do I use between the microprocessor and the chip? That is the mystery part to me... \$\endgroup\$ Sep 9, 2013 at 4:14
  • \$\begingroup\$ @andrebruton It is UART so you will just need to connect the correct pins of the chip (you might be able to find them on a datasheet somewhere) to (assuming your using an Arduino Uno board) pins 0 and 1 when there is no USB plugged in. Then you can just communicate like talking to a computer using the serial library. I don't know what exactly it will send but I would imagine that you could find out pretty easily. I don't know your skill level, but you might be better off with the support and documentation of this: sparkfun.com/products/10050. Also beware of the large data of sites. \$\endgroup\$ Nov 29, 2013 at 3:13

There are several layers to your problem, and you have got a few of them crossed.

There are all sorts of ways to slice this problem too - a dumb wifi interface with the arduino doing all the work, a smarter one that takes care of a lot of the hard stuff, or a very smart one that contains its own webserver etc. and the ardunio passes it some very small / basic data to paste into a web page.

You probably don't want to run an HTTP stack & web-server on a basic micro, although it's possible it can get quite tight and seriously limit your expansion potential later. On the flipside, throwing one of the smarter wifi modules at the problem gets quite spendy quite quickly.

Are you wedded to using the *dunio? Must you use wifi?

Sticking OpenWRT on a cheap wifi router might be one solution, or ditching the duino for a Pi might also make everything much easier.

  • \$\begingroup\$ Multiple issues, but the main one being that the OP is asking about a html client, not server. \$\endgroup\$
    – Passerby
    Sep 6, 2013 at 18:56
  • \$\begingroup\$ 1. Agreed, I do NOT want to run a TCP stack on the micro 2. The Arduino uses less power than the RPi (I have both) and I do not need all the features of the RPi. 3. Not sticking to WiFi - I'm looking for a solution for connecting a whole lot of micro's to the Internet. The micro's are all in one location (400 x 400m) so I thought a mesh network might work. \$\endgroup\$ Sep 7, 2013 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.