Some hardware such as the Ben Nanonote or Dingoo A320 come with no built-in RF capabilities. However, they both contain microphones and speakers which opens up the possibility of transferring small amounts of data over sound. This type of communication is challenging due to the bandwidth constraints and noisey channel. I am interested in communicating structured data across such environments. XML is a decent way to structure data, providing you can minimise the transmission overhead. Using XML Schema, Packedobjects can support the levels of compression required to make usable applications. Generating and processing sound can also be challenging but we can reuse existing technology such as DTMF. By combining some of these technologies I have created a library which allows you to build simple applications which can communicate XML over DTMF. Currently you can transfer XML data from the headphone socket of one device using an audio cable to the microphone socket of another device. You can see an example of this setup in the first image. Here the software is communicating XML from a Ben Nanonote to my Macbook. The other images show the commands to run on the Nanonote and Macbook and their outputs. Using an audio cable from an embedded device is limited but has some niche applications because it is simple, cheap and has minimal setup. More interesting applications exist if you transfer the sound over longer distances, eg. through phone lines, or if you actually use air as the transmission channel. A noisey channel will require forward error correction (FEC). A fun challenge will be to find a FEC technique that works well on an embedded device across this noisey channel without significantly increasing the size of the data to transmit. Intially I had some FEC code integrated in the library but think it will be better if something like libFEC existed.
The project is called nibble and the source code is available here: http://code.google.com/p/libnibble/
If you have a Ben Nanonote you can get all the required packages here: http://zedstar.org/nibble/. On the Nanonote you will probably need the ALSA config file listed there called asound to fix some playback issues. Just copy it to ~/.soundrc
For a simple test setup just loopback an audio cable from headphone to microphone on a PC running Linux. The spandsp library has a hard limit of 128 DTMF digits set in dtmf.h. This is patched in the Nanonote build.