Wednesday, March 27, 2013

Interfacing between the Serval Mesh and Cellular Networks (Part 1)

A number of people now have asked whether a Serval Mesh can be connected to the cellular network, e.g., to allow people living just beyond the range of cellular service to be able to make and receive mobile telephone calls.

This would be best done using a cellular modem and a bit of software integration to make use of it, so that the cellular audio can be passed through digitally.  However, most people who have asked about GSM/mesh gateways have indicated strongly that the solution must use only Android phones, and not require any soldering.

This is not unexpected, since it is hard to get new equipment into areas where disaster, rural, remote or poverty are at play. The same goes for areas impacted by war or unrest.

So we started thinking about how we can do this.

Unfortunately, most models of Android phone don't let you access the audio from the cellular call directly, which rules out the easy option of writing some clever software that can run on a phone.

However, all is not lost.  We can use two phones, with one making the cellular end of the call, and the other handling the mesh end of the call.  Then by using headsets to do some good old-fashioned acoustic coupling, we can record the cellular audio through the microphone of the mesh-connected phone, and play the audio out the speaker of the mesh-connected phone and into the microphone of the cellular-connected phone.  A picture should help illustrate how this would be arranged in practice:

Yes, it really is that simple. And that ugly.  

For extra simple and ugly, you could just tape the two phones together with one upside down so that the speaker and microphones are close enough to couple the audio.

Of course it has some drawbacks, notably the need for two phones instead of one, and the degredation in audio quality that is almost certain to occur.  However, initial tests reveal that the audio quality is better than might be expected, and quite likely to be very usable.

Where we are up to now is that we have a student working on prototyping this.  He has got to the point where a call from on the mesh can trigger an outbound call to the cellular network, and has the two ends of the audio playing.  You can see this in the video below:

The next step, and the one that will get us to a complete usable prototype for mesh to cellular calls (the other way around is a bit trickier) is to make the Serval Mesh software know about wired headsets so that it can route the audio through that path.


  1. Great work folks! This is a very useful feature indeed. I hope you manage to get both directions going. How does the phone on the cellular network become aware of the incoming mesh call i wonder. Perhaps if a bluetooth app could be written to link the two phones?

    1. We are using exactly the method you describe to coordinate the phones, i.e., Bluetooth communications. Hopefully we will have a follow-up post once we get things a bit further along, and can describe that part in more detail.