Tuesday, 28 August 2012

Softmodem communication on Android

One of the projects I would like to proceed but I am a little stuck due to limited amount of time...
Being able to communicate between Arduino devices and Android via audio cable.
The idea is simple (and not mine): modulate a carrier wave using frequency changes in correspondence of binary data changes. It is called Frequency Shift Keying.
Obviously, transmission data rates are not suitable for media streaming, but enough for trasmitting small amount of information like commands, data from sensors connected to Arduino board, etc....

There is a similar project, called Androino. Another working example, this time on Apple hardware, is IR-Remote.
I think it was a university project but I think it has been abandoned. Source code is available but I wasn't able to make it work.


On the hardware side, all I bought is:


Talking about the software, the Arduino code is ready and available as serial interface. It has been developed by ARMS22 (authors of the board too). It is available on this website. They focused their attention on iPhone, but I want to make it work on Android.

An Android client existed too, but it has been removed from the website. For receiving data on Android, the main idea is to use the Audio API to record chunks of audio, perform a zero crossing algorithm on it to store the "distance" between crossings. Then perform an RLE to translate it into valid byte values.
This will be packed into a threaded library offering an input and an output queue as interface for reading incoming data.
For sending data, some code in Javascript is available and it should not be too difficult to implement it in Java.

The issue can be the battery consumption, since we are continuously recording&processing Audio, having no interrupt on Android side.
I am sure an ADK board is the best way to communicate with Android, but it wouldn't be cross-platform and cross-device.

ODROID-X ordered... New project!

ODROID-X is a development board based on Samsung Galaxy S III CPU (Exynos 4412) produced by Hardkernel.
It seems a perfect platform for Android Platform Development. Kernel sources for Android 4.0.4 are available and Linaro seems to support it too.
My first attempt will be to be aware of the potential of the board and on the stability/reliability of the system.
Then tackle down the missing features and/or bug fixes that would make it a perfect device for:

  • Mini PC (focusing on support for webcams, enabling video calls, chat apps)
  • Android Gaming Console (it seems to work properly)

Next steps...

ODROID-X is more or less ready for Android 4.0.4 (I'll confirm when I'll receive it). The missing features can be the support for webcams (at least the ones supported by Linux Kernel having UVC interface) and gamepads (USB HID or BT HID ones).
The webcam support has been studied and Aptina published a whitepaper providing an overview on Android ICS Camera HAL.

Game controllers seem to be already supported.
After the break, gaming capabilities of ODROID-X.