If you are reading this blog, you probably know that the Serval Project is all about making mesh telephony practical, so that people can communicate anywhere, any time.
For regular Android software development, it is often practical to use the Android emulator to reduce the time between updating source code and seeing the effect of the change.
For Serval, this isn't really an option, because we work below the Android API layer, and much of the software development challenge is related to making the WiFi chipsets do what we want. We also have a fair amount of native code to do the mesh routing and telephony functions. In fact, we currently have an entire distribution of Asterisk in the Serval Mesh software, which must be decompressed and installed when the Serval Mesh APK is installed or updated.
Together, these contribute to an update process that can take several minutes to between modifying a line of code and seeing it on an Android device, especially on the low-cost devices that are our primary targets, and when using the debug option in eclipse.
Those minutes add up over time, and so I decided to minimise the install time as much as possible, and also address another problem with developing our software, that is detecting when you have an actual multi-hop network.
To reduce the install time, I started looking at the Asterisk installation to see what we could safely throw out. I managed to get rid of about half of the loadable modules, several utilities and all of the speech files that Asterisk comes bundled with. This reduced the size of the APK by a little over 1MB, down to just under 5MB, and cut down the install time by about 15%. Further savings came from removing unused audio codecs in our SIPDroid-derived SIP client, saving another 0.4MB, and getting the whole thing down to less than 4.5MB and installing about 25% faster than previously.
The bulk of the remaining time is about evenly split between installing Asterisk and testing that the WiFi control works properly. For development, it probably makes sense to separate out the Asterisk installation from the other files we need to deploy on installation, as we really don't modify the Asterisk files between builds. This shouldn't be too hard to do, but I have run out of time tonight.
Also, for our target handsets, we really don't need to test the WiFi control every time we update, so we should be able to set a flag to tell the software that we are in development mode, and just assume that the WiFi control works. This now works by checking if a file called /sdcard/serval/developer-mode/fast-wifi exists, and if so, bypassing those tests, and thus saving about 15 seconds.
So over all the minimum time from hitting "run" in Eclipse to getting the software ready has been reduced from 85 seconds down to 48 seconds (without debugging).
The over significant development convenience task I have worked on in the last few days is one that is probably of more general interest. The peer list now shows the number of hops to each of the nodes that your phone knows about, as shown in the image below. This was produced by having two phones at opposite ends of my house, and having the phone shown here with me out on the street.
Each row of the peer list now shows the telephone number, e.g., 5550344, the batman link score, e.g., 243, the ping time to the peer, e.g., 19 milli-seconds, and either "direct" for nodes we can reach directly, or the number of hops to reach the node, e.g., 2 hop.
Importantly for debugging, this displays doesn't ask BATMAN how far to the node in question, but actually enquires of the time-to-live (TTL) field in the IP header, and thus returns the true distance from your phone to the phone in question (the return path might be a different length, though).
Actually, because of limitations with the Java UDP programming interface, the TTL field is read by the Serval DNA daemon (which is written in C), and included in the returned UDP packet to the requesting client.
This means that we can just look at the interface on the screen (and so can all of you who have been asking us for this feature) and see what is happening to routes, instead of having to connect to the phone with a USB cable and enter all sorts of commands to ask BATMAN and the operating system what might be happening.
So all in all we now have a slightly faster and easier development process, that I am sure will more than save the couple of person days of effort that they took to develop, and thus enable us to work faster instead of harder.
This year I was not expecting to be
heading to Linux Conference Australia (LCA), as two of the Serval
Project team were expecting to be there, and I am already looking at
the likelihood of somewhere north of six bouts of international
travel this year, on top of a very full itinerary for myself in our
software development program, especially in the first half of the
year.
However, circumstances changed just
before LCA2012 with one of our team unable to travel due to health, and
another being overseas at an IEEE 802.11 meeting as part of our
effort to get the ad-hoc WiFi standard improved. So I found myself
flying in for just over 24 hours to present one of the talks.
The two Serval Project talks this year
were covering Serval Rhizome, our store-and-forward message and file
distribution system, and the Serval Mapping Service, an
infrastructure-free map and crowd-sourced information gathering and
visualisation platform that is something like a cross between GoogleMaps, Ushahidi and Twitter.
Update: Here are the videos of the talks. The authorships are wrong way around, however:
The talks were well attended and many
people asked a wide variety of questions. Several themes that
emerged in the question time were that we should think about how we
might interface our work with that of the ham radio community, and a
general discussion of the Open Street Maps project that we use to
supply the cacheable maps for the Serval Mapping Service. Questions
were also asked about whether we were looking to branch out from
Android to other platforms, including low-cost “feature phones”,
which are common in the developing world. We have been targeting the
Symbian/Belle S60 platform for a long time now. We also explained
how we intend to seek the manufacture of custom feature and smart
phones that contain a pluggable extra radio for mesh communications.
This goal received a substantial boost
when we discovered that Andrew Tridgell (of SAMBA fame) has already
written frequency-hopping firmware for HopeRF radio modules similar to the ones we are intending to use. This will likely save us months of effort,
and also enabled us to learn from Andrew's experience about what the
realistic capabilities of the modules are. The firmware and adapter
boards that Andrew has created will also make it much easier for us
to quantify the transmission range that we can achieve with these
devices in practise, rather than relying on fairly simplistic
link-budget calculations.
Also from talking with Andrew we have
begun to look more seriously about using small model drone aircraft
to loft mesh repeaters (possibly just mesh-enabled Android phones)
and have them loiter over an area to provide significant coverage
where it would otherwise be possible.
The combination of the longer-range
radios and an established ability to loft mesh devices each have the
potential to greatly increase the utility of our technology in a
variety of settings, including disaster response and in both built-up
areas and open country where either obstacles or low population
density make WiFi meshing difficult.
It was also great to hear about David
Rowe's continuing progress on his open-source codec, called Codec2,
which while still alpha, already is able to demonstrate veryacceptable performance at 2500bps and 1400bps, i.e., as low as 175
bytes per second for speech of a quality that is more than acceptable
for a phone call, and is substantially better than the now rather
aged GSM codec that requires almost 10x the bandwidth. The challenge
is how to make effective use of such a low bit-rate coded, since as
David pointed out during his talk, the IP, UDP and RTP headers in a
typical VoIP application would consume probably 5x more bandwidth
than the voice stream itself.
This is a welcome problem we have been
anticipating for some time now, and have some thoughts on how we
might address it. First, once we get our new overlay mesh operating,
we will use packet aggregation to defray some of the headers.
Second, we will setup pseudo virtual circuits between nodes that will
allow the voice to be directed using one-byte channel identifiers
that are local to each node-pair. Third, we can build more efficient
transport structures once we branch out to custom radio interfaces,
such as in the ISM915 band building on the work that Andrew Tridgell
described earlier in this post.
For example, we could use a one-byte
packet type identifier plus the one-byte channel identifier described
to provide an overall header size of just two bytes. Add to this
perhaps 2 more bytes of synchronisation data for the cryptography
layer, and the total overhead is 4 bytes per 40ms, for a total of 100
bytes of overhead, and a total data requirement in each direction of
275 bytes per second, or just under 2400bps. Allowing for guard
bands and the like on the radio interface, we should be able to
easily accommodate a full duplex voice call over a 5kbs – 10kbs
radio channel, and multi-hop voice calls over perhaps 20kbs –
30kbs*. Such a low bit rate, as I have explained previously, offers
the potential of very long range compared with WiFi, probably
hundreds of metres per hop in built-up urban areas, and perhaps a few
kilo-metres in open country, and even better with an elevated
transmitter. We do hope to quantify these range figures in some
realistic situations over coming months.
(* Each channel into and out of each
node requires about 2400bps. In a multi-hop network, we do not want
any two adjacent, two-hop or three-hop neighbours transmitting at the
same, as they will cause interference to each others (the
interference range is typically about double the effective
transmission range, so one node talking can be heard by its immediate
neighbours, and cause interference to it's two-hop neighbours).
Also, we have two voice streams, one each way, so we need to schedule
this in an appropriate manner. Let us explore how this might work if
we have four nodes, A, B, C and D, involved as successive hops in a
multi-hop call.
At time 0 transmits to B (A → B), so
B must be listening, and C cannot talk, else it would interfere with
B's reception of A's transmission. In fact, even D cannot talk, for
fear of interfering with B's reception of A's transmission, as B may
be in the interference range of D. Thus in this entire system of four
nodes to maximise range we need to have only one of the four nodes
talking at any time. As it takes three hops to carry the audio in
each direction, we need six time slices. Some savings can, however,
be gained by having B talk to A and C at the same time with a
double-length frame, and similarly C talk to B and D with a double
length frame, thus saving two guard bands. Thus we need two 2400bps
channels and two 4800bps channels (a total of 14400bps), plus four
guard bands. At 20kps this would leave approximately 25% of air time
available, including for use guard bands, or to allow for the
occasional carriage of additional data.
At 30kps fully half of air time would
be available, which would also allow for some forward error
correction, and a more realistic allowance for additional data,
especially if some creative time slicing and signalling is employed.
For calls with more than four hops, additional bandwidth is not
required, as nodes more than three hops from one another have
reasonable prognosis (though no guarantee) of not interfering with
one another.)
Meanwhile, also at LCA, we have been
demonstrating the ability of the Serval software to share itself via
bluetooth and WiFi to other phones, thus simulating deployment in a
disaster zone or rural/remote context where internet access is not
available. While there have been some issues, it has been tremendous
to see many people install and try our software. It seems that
practically everyone at LCA this year is aware of Serval and what we
are trying to do.
As part of my talking about the Serval
Mapping Service, Jeremy and I setup a “scavenger hunt” using the
Serval Mapping Service to place geotagged pins on the map and Serval
Rhizome to distribute photographs of the location of each small 2.5cm
square cardboard token that we hid around the sprawling Ballarat
University Campus. Similar to geocaching, the tokens were placed so
as to be near impossible to find without knowing their location. LCA
attendees can use the Mapping and Rhizome software to locate the
tokens and return them to Jeremy. Each token is redeemable for two
free coffee vouchers to help encourage participation. Apart from a
bit of fun, we hope that this will provide us with some real-life
experience and feedback on the use of these technologies.
Jeremy also succeeded in setting up an
configuration-free gateway between Serval Mesh phones and a free SIP
to PSTN service that is running at the conference, and left some
voice mail on my cell phone to prove it.
We also had some interesting contact
with several businesses that may be able to make use of our
technology.
Much credit must go to Jeremy for
getting the software together, and engaging in many of the
conversations that have enabled us to have such a successful time at
LCA so far. Also Rob Thomas has been a tireless advocate of Serval
at LCA and elsewhere, and together with Jeremy have helped many
people to install our software on their phones at the conference this
year.
Thus, while I was not expecting to
attend LCA this year, I am very glad that I managed to get there.
We are currently preparing to provide the latest Serval mesh telephony technology for use in a disaster response training exercise with a major relief agency in late February 2012 -- about two months from now. In that time we need to not only get our prototype Field Communications Unit (FCU) kit together, but also finish some software development that is key for making the technology useful for the relief agency. You can watch a demo of one of the features we are working on in the video below, where I send a photo from one phone to another, without infrastructure. This is the same technology we have used to send an SMS more than 10,000km without infrastructure.
On the hardware side, we have ordered 50 Huawei IDEOS X1 phones for AUD$71.10 each -- pretty cheap for a fully featured Android smart phone, complete with digital compass, GPS, accelerometers, a capacitive screen and enough CPU and RAM to meet our needs. These phones are network locked, but that doesn't worry us as we won't ever be putting a SIM card in them, because they will be used solely as mesh communications devices.
It turns out that buying 50 phones at a time is an interesting exercise. People want to know that you are not planning to resell them or export them. Some shops will even try to limit you to buying five or less at a time. Those tactics are legal in some places, but not here in sunny South Australia, where we have an excellent Fair Trading Act that correctly classifies such terms of trade as discriminatory, or in some cases as tantamount to bait-and-switch.
In fact, until quite recently the South Australian consumer protection and gambling laws were so strong that cereal-packet competitions could not require a South Australian resident to purchase a product to participate in a trade promotion lottery, because it would be considered gambling, i.e., pay for chance to win. So when I was growing up it was quite common to see terms and conditions looking quite normal, and then have sections specially for South Australians, that would often say something along the lines of:
"10. To enter, cut the bar code from a packet of XYZ and include it in your entry as proof-of-purchase. Residents of South Australia are permitted to submit a hand drawn facsimile of the proof-of-purchase.
...
17. Only one entry per household per day. Residents of South Australia may enter more than once per day."
There were certainly occasions in my childhood when we would go to the effort of getting the coloured pencils out to draw a barcode by hand to get the chance to win a prize. I think we sometimes did it just because we could. Sadly, with the introduction of poker machines (Australia has fully 21% of the worlds poker or slot machines --- a statistic that is disturbing given that Australia has only about 1% of the developed-world population) and the general liberalisation of gambling in South Australia the situation has changed, and I believe we have lost our little parochialism.
Anyway, I digress.
After the difficulties I encountered initially in sourcing 50 mobile phones, I eventually went to our local post office to see if they would order me 50, since they had the model I wanted in their catalog. Not only were they willing to order them (I promised to pay up-front, since it was a large purchase), they also kindly sliced 10% off the price. So I now have a box of 44 phones in my lounge room, with the remaining 6 on back order:
At this price, the phones don't come with SD cards, which we do need for the Serval Rhizome software to do anything useful, as store-and-forward requires somewhere to store! So I hunted around, and after some luke-warm experiences with suppliers either being unwilling to give me a decent price for what is clearly a wholesale quantity, or failing to stock enough, I tried OfficeWorks. They had enough in stock, but were charging $16 for 4GB cards, which I had quotes from other local stores for $7. So I loaded my basket with 50 memory cards, and proceeded to try their price-matching policy:
However, the large price difference and quantity did trigger concern from their store manager. He was very friendly and amiable, but did point out that to get the price matched, I had to find a local supplier with the quantity I wanted actually in stock. But that wasn't easy to arrange, as most of the cheaper suppliers only had a few on hand. There is of course a silliness in their rule, as I could have bought them in small batches such that each batch was small enough that the cheaper shop held sufficient stock. But in the end I did manage to find a cheap supplier on eBay who had plenty in stock at $5.80 a piece for SANDisk 4GB class 4 microSD memory cards. Now we just have to see if they will arrive.
So that covered the phones and memory cards. The next challenge was to come up with a way to easily charge 50 phones. Not only did it need to work in my home, but it also had to have the potential to work in a real disaster zone, and one which might not be in Australia. Having enough power boards to plug 50 little USB charger bricks was not an attractive option, especially since I need to fit all of this into my 23kg luggage limit when I fly, and 50 phones alone are not that light.
What I have decided to do is to chop up a pile of USB leads and wire them up to some automotive 5v accessory power supplies that are commonly used to power portable DVD players and the like. Apart from being the cheapest 5v high-current power supplies I could find (AUD$40 for 5A), they have the benefit of running on 12v, or in the case of some models, on 12v-24v, so that they can even work in a truck. This means that in-vehicle mass-charging is possible when the power grid is off. It also means that they can all be charged using a single cheap 13.8v power supply, which are also quite cheap; you could even use an old computer power-supply. You can see my prototype here:
So now I just need to get back to writing the software that needs to go on these phones ...
SMS messages on a cellular network get delivered via the cell towers and message centre infrastructure.
On a mesh, it is possible for us to deliver messages to other phones that are reachable on the mesh at the same time. This works great, and we have had this capability in the Serval BatPhone software for a while now.
However, it does have some limitations, in particular, if there is no link all the way from the sender to the receiver on the mesh at the instant the message is sent. This is rather unfortunate, as we usually think of SMS as being the most reliable fall-back on a mobile communications network.
So we set about replicating this resilience by creating a store-and-forward SMS-like service on top of the Serval Rhizome mesh file distribution framework. We call this MeshMS, for Mesh Message Service.
This service uses direct mesh links if they are available by making use of the existing SMS capability in the Serval BatPhone software. However, if there is no direct link, then it uses a store-and-forward scheme, that asks any passing phones to copy the message and distribute it to other phones on the mesh, until it (hopefully) eventually reaches its intended destination. The cartoon below shows how this works.
The man wishes to send the message "Prepare the Zeppelin" to his hench-person, but there is no direct mesh link at that time due to the challenging topology. The message gets picked up (stored) by the compatible phone in the pram, without any action on the part of the woman. The woman then keeps walking along, and eventually the phone in the pram is able to automatically deliver (forward) the message to the ultimate destination, whereupon the minion knows to ready his master's zeppelin, to do the weekly grocery shopping, one trusts. Of course, there could be many intermediate steps, instead of just the one shown here.
The great thing about this approach is that it doesn't require a complete path to the destination at the time of sending, but can propagate progressively across the mesh as it is able, and can make use of nodes that move between otherwise isolated mesh networks, creating an asynchronous link between them where it would not otherwise be possible.
While the delay in such a service is huge, the bandwidth is also great, as potentially gigabytes of data can be transferred between nodes. One side use of this protocol that we intend to exploit is to provide an efficient means of distributing updates to the Serval software suite, so that field updates can occur without dependence on infrastructure, and with much greater aggregate bandwidth than any single-cast cellular or wireless approach. In fact, this will even allow the update of software, maps and other resources during a disaster.
We have even demonstrated it to deliver an SMS message between South Africa and Australia, using nothing but compatible phones to carry the message more than 10,000km:
This feature has profound utility in allowing the exchange of messages, files, and all manner of data in what are otherwise very difficult settings.
It also provides the capabilities required to enable disadvantaged communities, perhaps in remote locations, war zones or informal settlements, to create their own infrastructure, carrier and cost-free SMS networks using compatible handsets, so that they can enjoy the benefits of digital communications that many of us take for granted.
After that, you should be able to compile the software from in Eclipse without difficulty, as all the messy stuff has been taken care of (git sub-modules, JNI/NDK compilation, NaCl preparation, among others).
This easy build process will be pushed up to the master branch fairly soon, but for now, it is only available with the wifi-autodetect branch.
Note that building on Windows remains unsupported, as end of line markers in files get messed up if great care is not taken. If you want to build on Windows, we recommend you install a Linux virtual machine, e.g., using the free VirtualBox software, and run the build process from in there.
It is time to reflect on the past six months of Serval, and where we intend to head in the next six months.
Six months ago we did not have a developer software offering, or even a single Android application that contained all the components for Serval. Today we do.
On-site in South Africa after testing the Serval MeshMS store-and-forward SMS Service, delivering files and SMS messages up to 11,000km without infrastructure, or a continuously connected mesh.
Six months ago we did not have MeshMS (Mesh SMS service), interactive mapping, Rhizome file distribution or store-and-forward SMS working. Today, we do, and have even sent photos and SMS messages more then 10,000km between Australia and South Africa using mobile phones as the only infrastructure (more on this in a blog post and video in the next few days). See this blog entry for an infographic and video showing the sending and receiving of this first inter-continental mesh SMS message.
Demonstration of the Serval Rhizome Mesh-Based Infrastructure-Free File Distribution System, which is also the basis of the store-and-forward MeshMS/SMS service.
Six months ago we had a number of legal issues to work through with regard to giving Flinders University an appropriate holding in the Serval Project's commercial arm, and the Shuttleworth Foundation had not yet come on board. Today, we have just about finalised the details for these arrangements, with the final execution to occur in the coming weeks. It will be fantastic to get this settled.
TEDxAdelaide Presentation November 2011. (Video coming soon) “The democratisation of online music is one example where the internet has eroded the monopoly power of music labels returning some portion of that power to the general public, without bankrupting those enterprises.” Paul will explore what is essentially a Napster equivalent that will compete with the mobile telecommunication giants. He believes that the advent of powerful, programmable, portable digital devices (e.g. smartphones) are a key factor in this eventual democratisation of mobile telecommunications.
Six months ago we were not greatly recognised internationally for our work on mesh communications. Today, we are increasingly recognised as the leaders internationally in this space, which is a tremendous honour and also acts to spur us along to deliver on all the potential that mesh networking offers. Recognition has included support by the Shuttleworth Foundation (South Africa), reaching the finals of the World Embedded Software Competition for University students (South Korea), strong engagement by and with the IEEE 802.11 standards process (USA and international), presenting at the Adelaide Festival of Ideas and TEDx Adelaide (Australia), and also reaching the finals of the Ashoka Foundation World Changer's Citizen Media competition (international) from a field of more than 400 entrants. We are also seeing university and other partnership opportunities in Australia, Europe, the Middle East, Africa, the Americas, and Asia begin to take shape. Now all we need is to be able to clone ourselves a few times over so that we can engage fully with the various opportunities!
Our plans for the next six months are to fill out the feature set that we have generated (voice, SMS, MMS, interactive mapping, file and software distribution), and add in the missing pieces, primarily the security and authenticity components that we have planned from the outset. This will take us to mid-2012 when we hope to focus on maturing all of this into a general public release, as compared to the early-access developer software we have released to date.
Adelaide Festival of Ideas, 2011, JIM BETTISON ORATION: KICKING THE INFRASTRUCTURE HABIT: [listen to MP3] "Modern communications systems use extensive and expensive infrastructure to deliver services we could only dream of a few decades ago. This works for those who enjoy peace and sufficient wealth, but fails to reach the last billion people in poorer countries, as well as those in remote, emergency or disaster situations. Now modern mobile phones have the potential to communicate directly, to form networks without reliance on any infrastructure. The Serval Project based at Flinders University is turning this dream into a reality. It is working to make communications available to everyone, anywhere, any time especially to those who need it most."
We are also looking seriously about getting advanced mesh support built into one or more models of mobile phone to offer energy efficiency and/or range improvements over the basic service.
Simultaneously, we are beginning to explore appropriate trials of the technology that if they go ahead will gain us valuable feedback, and refine the software to maximise it's utility for the general community, including in South Africa (assisting in the distribution of educational material without cost or dependence on cellular or school IT infrastructure), North America and Australia.
So all in all, the next six months should keep us fairly busy.
It seems that this last month has been one of the Serval Project gaining international recognition as leading the mesh communications space. First some thoughts on that, and then some of the exciting things that have been happening.
This is incredibly gratifying and humbling, and I think also says something about the value of the open development and free software model, and also about the value of pragmatism and choosing the right applications and approach. Ultimately it must spur us onto continuing to advance not only the technology, but also its use.
We are quite aware that there are other more experienced players in this space, who have in some cases invested many millions of dollars into mesh networking. However, the closed-handed commercial approach that many such group have taken means that many innovations in the mesh networking space do not get well known, and that people feel isolated from what is happening in this space -- which is quite counterproductive, since mesh is by it's nature a word-of-mouth and peer-to-peer technology, and that character bleeds over into how it is best used, valued, evangelised and adopted.
We are also quite aware that there have been significant efforts put into making robust mesh routing protocols and standards, for example 802.11s, and yet in a short space of time we seem to be accelerating our traction at a much faster rate. I think that there are a few interrelated causes for this. First, we are extremely pragmatic in our approach, and this is partly enabled by us driving a vision forward, rather than seeking consensus to generate a moderated output.
The unfortunate reality for mesh networking is that it is still in such infancy that the various components have to be well matched to perform well, and thus the traditional compromise approach to standards generation, without an working example to inform the standard, is prone to produce a sub-optimal result, and take a very long time to produce.
This is also related to the lack of clear commercial application (or more specifically, of commercial return) of mesh networking in the eyes of many companies. This is because when viewed as a traditional network, mesh networks are very poor cousins; they have poor reliability, poor bandwidth, poor quality of service, limited range and so on. All these make it very difficult to layer existing commercial models over a mesh network. For example, adapting Google's advertising model onto a mesh network has trouble getting the advertisements over the mesh to each device, let alone the search data.
It takes a fresh approach to mesh networking to understand where the substantial commercial opportunities are hiding. This requires gaining an understanding of the strengths of mesh networks, rather than their weaknesses. The natural broadcast nature of wireless networks actually works well for broad dissemination of data. The ability of these networks to operate without supporting infrastructure allows the provision of services when not ordinarily possible.
These services do not need to be data-poor services, either. Serval has already created a prototype mapping application that could easily support navigation, geotagged advertising by businesses, crowd sourcing of points of interest and a variety of other features -- and would continue to be available when infrastructure is not available.
In this kind of setting, the limitations of mesh networking become strengths. The limited range of mesh networks means that locally relevant data is available where it is relevant, and doesn't flood the rest of the world or distant parts of the mesh. The broadcast nature of wireless communications allows multiple receivers to receive these locally relevant data, whether it be advertisements, maps, communications between nearby friends or otherwise. Also, by focussing on hop-by-hop dissemination of data, the traditional bandwidth degradation of mesh networks can be significantly avoided -- at the extreme it is single-hop communications which can be performed at the order of 100mbit between nearby WiFi enabled devices, which is way faster than my home ADSL internet connection.
But back to some of the recent successes we have had in our work and leadership being recognised, including the headline of this post:
The Serval Project is one of 11 finalists from a field of around 500 entries in the Ashoka Foundation's Change Maker Citizen Media competition. This is tremendous recognition of the value of our work in the citizen empowerment space, and we are delighted to engage with this community, and with the other amazing finalists. We'd also love you to vote for us if you think we should be one of the winners. You can see the other finalists and vote using the links below:
Meanwhile, we have begun to engage with the IEEE 802.11 standards process, with Romana in Atlanta at their meeting as I type. It continues to amaze me the generally positive reception and voice that we are granted at events such as this, and we are hopeful that we can effect positive change in the standards to better support mesh networking.
We are also beginning to form partnerships with Universities, companies, not-for-profit and other entities, not just in Australia, but around the world. More on some of those as they mature, but it is exciting for me to see our efforts multiplied as we gain partners. As I have previously mentioned, we are keen to not only create resilient software, but produce it in a resilient manner, and that means with multiple teams in multiple countries around the world. While this process has begun, we would love to expand this even further, so if you are interested, drop me a line.
Closer to home, but from my perspective very satisfying is that two of our students won their sections of the departmental end of term student expo. Congratulations to both Swapna Palaniswamy and Corey Wallis for your great work. Swapna's work has also resulted in an upcoming publication at the International Conference on Wireless Technology for Humanitarian Relief later this year, which is an unusual achievement for a student in her course. Corey has similarly had a presentation based on his work accepted at Linux Conference Australia in January (we also have another talk at LCA on our Rhizome mesh file distribution protocol).
So now it is back to driving the technology side of our activities so that we can deliver on the promise.
We have two primary areas of activity on this front at present. First, we are working to consolidate the existing software to make it generally more usable and stable. Second, we are working on incorporating the Rhizome file and messaging system so that we can provide what we think will be a very powerful mesh messaging service, that will even make possible the delivery of messages when there is no path immediately available through the mesh, and for the sender to receive confirmation when the message has been received. But more on that when we have something concrete to show.
From time to time I get asked to provide a simple explanation of what the Serval Project actually does.
It allows you to make multi-hop phone calls using only phones, with the signal bouncing from phone to phone
What does a multi-hop mobile mesh telephone call look like?
Well, it can look a bit like this:
Of course this photo is a bit staged, and in reality the people in the middle of the call don't have to have their phones out, or do anything -- the mesh routing software automatically works out how to get the call between the parties.
The only limitation is that their be a path between the calling parties.
Also, the phones can be quite a bit further apart than shown here, around 100 - 200m with line of sight at present, and potentially kilometres apart once we get the ISM915 band meshing happening in the future.
In a future post I will explain how we can enable SMS type services, even when there isn't a reliable path.
Early 2011 saw the worst floods in Queensland, Australia in 40 years.
Not surprisingly, this placed significant stresses on response efforts, and for a variety of reasons, the Queensland Government has issued an interim report on the event and what responses should be made.
I have been reading through this from a telecommunications perspective, and found the following items:
2.24 Seqwater should give consideration to posting information about current and future releases on its website during flood events as one method of ensuring accurate and timely information is available to the public.
This may seem like a small matter, but by making the information available somewhere where someone in the community could access it, and possibly disseminate it further, perhaps by word of mouth, or perhaps by feeding it into a crowd-source incident reporting system such as Ushahidi or the Serval Rhizome/Mapping combination, where it could be made available to others who need it. Indeed, this process could be automated, providing a very valuable community service. However, if the information is not shared in the first instance, then such broad and means of distribution will be troublesome to implement, and potentially disadvantage many.
In short, putting information out where the public can get to it, and make further use of it supports resilience.
5.21 The Queensland Fire and Rescue Service should ensure that rescue technicians on deployment are provided with individual radios, rather than sharing a communications pack
Presumably the sharing of communications packs is related to their cost and bulk.
Using off-the-shelf meshing mobile phones would allow all rescue technicians to have a personal means of communications that makes use of the shared communications pack, relaying traffic back through that resource.
5.29 The Queensland Fire and Rescue Service should consider isolating repeaters during a large scale emergency response. If this solution is found to be feasible, it should be implemented as protocol as soon as possible. If it is not, the Queensland Fire and Rescue Service should explore other solutions to the issue of the fire communications network being overloaded and firefighters resorting to localised networks during large scale emergency response situation.
This seems to be responding to the issue of excessive traffic being relayed across the region, congesting the system and preventing it being of effective use. The Serval Mesh system has the potential to localise message delivery to the local teams that need it (whether or not they are locally based), and still retaining the ability to broadcast messages over the whole region when suitably addressed.
This is not a particular mode we had considered greatly in the past, so this is a helpful thing for us to discover.
7.2 Lockyer Valley Regional Council should investigate the feasibility of installing alarm-activating gauges in the creeks at Spring Bluff, Murphys Creek and other communities where communication systems are poor and there is a risk of rapid and unexpected water rise.
This is interesting for us to read, as we are already contemplating creating a very similar system for use in the Mekong River Basin on conjunction with a Lao doctoral student here in the department. The characteristics of the system are having a local mesh broadcast an alarm to all mesh nodes when one or more mesh-equipped sensors indicates a high water level.
It is possible that those sensors could be low-cost mobile telephones connected to a device such as the IOIO, creating a very simple and low-cost solution, provided the device can be powered, perhaps using a solar panel and modest storage battery, such as an old car battery no longer able to supply the peak load required to start a car, but more than sufficient for the couple of watts required to run a phone and sensor.
"SMS alerts are also not a reliable method of providing flood warnings in parts of Queensland which experience problems with telephone coverage. That difficulty is compounded during a flood, when telephone reception can be affected by flood related power outages and congested telecommunications networks."
This is precisely the kind of short coming with cellular networks that Serval has sought to find and create solutions for, that complement the existing infrastructure. In particular, the ability of the Serval Rhizome mesh file/message distribution system to work asynchronously, and automatically share information carried in phones as they more from region to region has particular value in these sorts of situations.
Also, the ability place local calls on the mesh, and where possible, setup connections from the mesh to the outside world offers a significant capability that is otherwise a considerable liability in these situations.
The ability for Serval technology to allow the rapid setup of a local mobile telephone network, and then connect it to the global telecommunications network using the nearest functional mobile phone tower was demonstrated in Brisbane in late January 2011, just a couple of weeks after the flooding had subsided.
We did this by placing a phone running the Serval software at a high vantage point where it could communicate with the nearest functional mobile phone tower (we used a helium balloon, but a roof top, or even a long fishing pole gaffer taped to a car would suffice). This then allowed the phones on the ground that were also running our software to relay calls out to the world. Here is the video we took of us doing exactly this, and watching people use it:
So this week I decided that I would finally do the initial integration of the excellent NaCl crypto library into DNA, but with the view of making it available from Android so that it can be used as part of our forthcoming Rhizome browser (this is for browsing Rhizome offerings, not the web -- more on this thing in a future post).
My main objective was to have only one copy of the NaCl library in our Android application so that the APK stays as small as possible, and so that we don't waste any more memory than we need to.
The first challenge is that we want to access NaCl from Java, as well as the command-line dna utility.
The second challenge is that the crypto code should be inseperable from the dna code, so that it is impossible, for example, to use linker tricks to switch the NaCl library for something insecure.
We can't do this perfectly because it needs to be accessible from Java, which can only load native shared libraries, but it seems that we should do what we can.
So I put all of dna and NaCl into a single shared library, libdnalib.so, using the Android NDK to build it, so that we can load it into Java and use the NaCl (and possibly dna) functions directly from in Java.
This even means that dna's main() function is in there, and so we can run dna queries and actions from in Java as though we were using the command line tool.
Great.
Then I tried a bit of good old fashion linker skullduggery, by making an empty C file, and compiling it linked against libdnalib.so, so that it gets dna's main() from that library, by doing (in effect):
echo >null.c gcc -o dna null.c -ldnalib
However, the linker on Android doesn't look in the host applications lib directory when linking an executable. The Android linker also doesn't support the -Wl,-rpath= option for specifying where to find a library.
This is a real pain, and probably qualifies as a bug. I should probably file the bug, but I wanted an immediate solution, since my past attempts at getting the Android folks to fix things have not met with much success. Besides, I needed a solution that works with existing handsets, not future ones. So in the words of Marvin the Martian, it was back to the old drawing board.
So my solution was to create a wrapper that just dlopen()'s libdnalib.so, and then finds and runs the main() function from in there:
#include <dlfcn.h> #include <stdio.h>
int main(int argc,char **argv) { void *h = dlopen("/data/data/org.servalproject/lib/libdnalib.so",RTLD_LAZY); int (*dnamain)(int,char **) = dlsym(h,"main"); if (!dnamain) return fprintf(stderr,"Could not load libdnalib.so\n"); return (*dnamain)(argc,argv);
}
The downside is that it assumes that /data/data/org.servalproject is where the application will get installed, which the Android people tell us we should not assume.
Thus I will probably be about as popular with them as I am when I tell people to root their phones to get ad-hoc mode WiFi instead of waiting for an API to turn up in some future release of Android.
But, when necessity beckons, one must do what one must do.
And so I now have a solution that works and I can move onto more pressing problems.
So yesterday we went to beautiful Normanville with the goal of testing the maximum range between phones running our mesh telephony software.
We didn't get particularly far on that front, but we did discover some very interesting things about the unique requirements of mesh routing between mobile telephones, which will likely be the subject of a upcoming blog post.
But what we did do was deploy a mobile phone tower of a different kind. Romana has wanted to make her wheel chair into a mobile phone tower for some time, and yesterday was her chance, as the pictures show.
Romana in her chair with Lyn beginning to attach the 7 metre long squid pole we use as the mast.
Further attaching of the mast.
Beginning to raise the mast. The blob on the top is a Huawei IDEOS U8150 mobile phone running our software and acting as the "repeater".
The raising of the mast:
Victory! Romana's wheel chair is now a mobile phone tower.
But it wasn't all hard work. The weather was glorious, and the views most excellent, and others were out and about enjoying the day ...
Or hoping for a chip.
Meanwhile, we moved to the jetty so that we could place our mobile phone tower (including blanket for the cool sea breeze).
The pole really does stand up quite high. It gets the phone about 6m above the deck of the jetty:
... which is a little higher than even the lamp post
Then we started walking along the beach towards Carrickallinga, slowly deploying a 6-hop mesh, and making multiple simultaneous voice calls amongst the nodes.
Corey and Romana did a great job standing on the jetty and talking to us via our impromptu phone network, while locals and visitors enjoyed the day:
This was also the first time that my son Caleb came along on a Serval expedition. Little did he know that his pram was soon to become a phone tower as well.
Here I am with Lyn deploying a node some distance from the jetty:
Then it was Jeremy's turn:
Then the pram:
And all the while we were able to make calls among the various nodes.
We did encounter some serious mesh routing issues, which as I mentioned I will talk about soon, but for now I just wanted to let you all enjoy the pictures.
If you have been reading this blog you will know that we sent Romana over to Okinawa to present our desire to see ad-hoc mode wifi improved, and also to consider how to use the baseband radio in mobile phones to support wifi on very low cost phones, and also to provide much longer range meshing using the ISM915/868 bands that offer very useful link budget advantages over the 2.4GHz band used by regular WiFi.
Well, we have been absolutely gobsmacked by the interest and positive response that Romana experienced at the meeting, and have the opportunity of taking up the baton to champion proposing these enhancements through the formal IEEE 802 standards process.
This is a great privilege, and also an opportunity that cannot be accepted without serious and solemn consideration, because it will basically require someone's effort, full time, for perhaps three years or more.
We are convinced that we want to, and that we should engage with this standards process, but just need to work out whether we have the resources to do it, without drawing all of our available resources away from progressing the development of the Serval mesh telephony software.
Serval is getting involved in the IEEE 802.11ah (WiFi on ISM bands below 1GHz) to try to make sure that it is well suited to infrastructure-independent ad-hoc and mesh networking at the IEEE meeting in Okinawa next week.
1. Improvements to ad-hoc mode (or provision of a new "packet radio" mode) that remove some of the problems currently faced when creating wifi-based ad-hoc mesh networks.
and
2. That the 802.11ah standard consider speeds below 1mbit and using cell phone baseband radios as a supported transport so that even cheap cell phones can form relatively long range mesh networks without any supporting hardware.
This second point is really important, because compared with 2.4GHz WiFi a mesh running in the ISM 915MHz band gains about +9db just from the change in frequency, which alone improves range by almost 3x. If it supports lower bit rates, then further significant gains are possible, e.g., allowing 100kbit communications gives another +10db, for a total of 8x range versus WiFi.
There are some significant protocol challenges to be addressed, but if the standard doesn't support the use-case, then there will be no hardware and no chance.
These measures have the potential to push the indoor range up from WiFi's "about one house wide" to "about a block wide" and clear line-of-sight range up to a few km, which suddenly makes the formation of suburban ad-hoc mesh networks possible, which has profound impact for creating resilient infrastructure-independent communications solutions, for example for sustaining communications during disaster or enabling communications for rural and remote or developing populations.
We admit that we are very green to this process which we frankly find to be daunting.
But we feel compelled to try, regardless of what we perceive to be the odds of success.
I have been up all night making the best of the need of an overnight sleep study for our son, which requires an adult to perform a specific function every 15 minutes throughout the night.
Programming in these little pieces feels a bit like the software development version of watching commercial television; just as you think you are about to witness something really interesting there is an interruption.
Nonetheless, I have made significant progress getting the overlay mesh to send and receive advertisements of a different kind; notices by one node that they can reach another node.
There are plenty of bugs that I know about, without even thinking about the ones that I don't know about, and also some code that is still plain old missing. But even so, I have got the code forming a multi-hop mesh and keeping track of the routes to them.
I ran two nodes connected to two separate dummy networks, so that they couldn't see each other. Then I connected an extra node in the middle that bridged the two networks, and after a short delay, viola, the nodes could all see each other. The image shows the routing table from one of the nodes with only one network interface.
The 0000000* addresses in the neighbour table are clear evidence of some of those bugs I mentioned, as is the crazily large age field for one of those.
The FDB3BA1*, D64CEB4* and B167503* addresses are nodes that I had temporarily added to the mesh, and then removed again fairly recently, so the routes were (correctly) still hanging around with their link scores steadily dropping.
The important part is the route to D6850E3*, the node on the other network, for which the current route is via 30464E5*, which is the node bridging the two networks. 30464E5* was a node that I had previously bridging the networks just a short while earlier, and we can see the lingering route as it decays.
B167503* is the node currently bridging the link, and it's score is still climbing, and is about to overtake the recently removed node and become the route of choice.
So while I have a lot more work to do, the basic function of the mesh to discover multi-hop paths and switch routes based on appropriately calculated scores.
This amazing device provides a full-powered USB port when placed on a fire by using thermo-electric generation.
The interesting innovation is that by incorporating the thermo-couples into a saucepan the water in the pot keeps one side of the junction cool to maximise the power output, while ensuring that the about 98% of heat that the thermo-couple cannot turn into electricity heats your water.
This also means that they can use different types of thermo-couples that work better at different temperatures. The hot-side of the pan uses lower-efficiency thermo-couples that can tolerate the higher temperatures, and the "cold" side of that is joined to the hot side of the lower-temperature thermo-couple which is also a little more efficient, and the water in the pan helps to make sure that this lower-temperature thermo-couple does not over heat. Together, they avoid the complications that would normally be present if using only one of the thermo-couples, either lower yield, or the potential to be damaged by higher-temperature fires.
The saucepan approach is also an elegant way to circumvent the atrocious inefficiency that typically plagues thermo-electric generators, since in a diaster or remote location you probably need hot water, anyway, a realisation that TES NewEnergy had following the mega earthquake that struck Japan recently.
So this saucepan is about enough to charge a phone if you are in the middle of nowhere, and solar isn't an option for whatever reason -- perhaps because the power is out due to storm, volcano, or just during bad weather.
Anyway, we are looking forward to some fun testing Serval mesh phones powered by a high-tech saucepan on a campfire.