A New Connected World Of Mobile-Enabled Sensors (Winter 2014-2015)

Hello, and greetings from the Central Office! Since I wrote last, I have been around the world clockwise once again. It was good to catch up with friends and fellow hackers in Europe and China, and to visit the amazing technology markets in Beijing. Technology changes very rapidly in China and despite being only 6 months from my previous visit, I was really surprised to see how much has changed.

basic GSM handset image

This low cost Arcci GSM phone sells for under $8

One of the most exciting recent developments in telecommunications is the astonishing price drop in mobile phone chipsets, particularly for basic GSM technology. This is combined with massive improvements in both battery technology (which has gotten much greater), charging technology (which can reliably operate off of inexpensive solar cells), and power consumption (which has dropped). In Beijing, you can now buy a brand new, quad band, unlocked GSM world phone for less than $8. These phones can remain powered on, able to make and receive calls, with a standby time of up to two weeks in between charges. Talk time is also truly astonishing. I remember when I barely got an hour of talk time on my enormous Motorola brick analog cellular phone, but basic GSM phones now boast talk time of up to 8 hours of continuous usage—if your voice can hold up for that long!

Just stop for a minute and think about that. For under $15, you can buy a phone that works anywhere in the world for voice, text, and data, and a solar charger to go with it, and even if you don’t charge the phone for 2 weeks, it’ll still be able to make and receive text messages and can even log onto the Internet. It’s completely mind-blowing when you think about it. I think the only reason that most people in Western countries haven’t noticed is that because handsets like these aren’t widely available in wealthier places. When your mobile phone carrier’s lineup is populated with the latest smartphones, it’s hard to notice the availability of no-name Chinese brands at astonishingly low prices.

Now, let me be clear: these inexpensive phones aren’t smart phones, and they don’t support even 3G, let alone 4G technologies. However, they do work just fine for voice, low-speed GPRS data and SMS messaging. And this is the retail price, and even includes value added tax! The wholesale price is about half of this, and it’s for a fully assembled phone. So, you can infer that the component parts are even less expensive than this. Want to support the latest networks and fastest data speeds? The price is about 5 times as much, but we’re still talking about $30 for the components. Making things even more interesting, you don’t necessarily need all of the component parts involved in building a phone when you consider GSM scenarios that aren’t phone calls.

“Wait, a minute,” you may ask. “GSM scenarios that use mobile phone components but don’t involve making phone calls, you say? What might those be?” Well, actually, that’s where things have gotten really interesting. Given the confluence of low cost, low power requirements, and creative charging solutions, some new and really exciting scenarios have been unlocked. Sensors are quietly but steadily being deployed to help automate everything from water and electric meter reading to weather monitoring.

Sure, sensors have existed in various forms and in various places for many years, and there have even been previous efforts at “smart meters.” However, there have been a number of key issues. First of all, most sensors had very limited computing power, because the availability of low-cost microcontrollers with low power consumption was limited. So, the technology was there to gather data, but interpreting it had to be done in a centralized location somewhere; you couldn’t fit enough computing power on a sensor to do much meaningful interpretation. Today, with the availability of Arduino and similar microcontrollers, it’s possible to build sensors with substantial onboard computing resources, without needing a whole lot of energy to do it. This means that sensors don’t necessarily have to upload as much data to centralized locations for real-time processing anymore, because software can be more capable at making real-time decisions. Even if you didn’t need to continuously gather data, or needed to centralize processing, the capability didn’t exist to process data over a wireless WAN at high speed. Nowadays, GSM coverage is available almost everywhere, and 4G allows data transfer at speeds similar to WiFi. This combined with the plummeting cost of sensor technology has unlocked some really incredible new scenarios. Some of the most interesting innovations are in utilities and—oddly enough—agriculture.

Arduino picture

Arduino is an ideal platform for many embedded systems.

Many utilities around the country are starting to deploy smart meters, to which the tinfoil hat crowd has responded with predictable fury (they’re mainly concerned about RF emissions). The Salt River Project in Phoenix has already deployed them in most areas, and the Los Angeles Department of Water and Power is beginning to deploy these as well. While the key reason to (and most important application for) implementing the technology is eliminating the need for meter readers, smart meter technology also allows more data to be collected about energy usage, and more creative billing to take place. You might recall that long distance charges used to vary by time of day and day of week. Calls were billed based on a day rate (the highest price), evening rate (around 20% less), and nights or weekends (around 50% less). This was done to provide an incentive to shift usage to off-peak times, so the phone company didn’t have to build a lot of peak capacity that was otherwise underutilized. Your electric utility could offer similar incentives to use power during off-peak times. For example, Sunday evening is the period of lowest power usage in most cities. So, you might choose to do your laundry on Sunday evening if the rate were half as much as doing it on Monday morning.

crop moisture sensor

This sensor monitors crops for moisture

Agriculture is also seeing a lot of really interesting new scenarios in wireless sensors, which are helping to reduce waste and improve efficiency. For example, farmers waste hundreds of millions of dollars a year replacing spoiled livestock feed. Farmers buy feed and put it in storage. The feed gets wet for one reason or another, and then it spoils. Typically, farmers will find out that this happened when they go to use the feed and find that it has spoiled. So, a company called Kongskilde has developed several types of moisture, temperature and humidity sensors that can be stored with the feed. So, if a leak in the roof develops, the sensors will detect this and notify the farmer before his feed becomes spoiled.

Both of the above smart devices typically rely on a local mesh network, typically WiFi, which then uplinks data to a centralized location via mobile Internet. However, there has been a lot of recent research (with some development) on sensors that communicate directly via mobile Internet. Given the water crisis in California, one of the most interesting pieces of research I have seen involves irrigation systems that are sensor-controlled. Most irrigation systems today operate on timers, and the amount of water used isn’t an exact match for what is actually needed. So, most farmers over-water or under-water their crops (typically the former), which isn’t good for either the crops or the water supply. However, given the vast distances, mesh networks don’t make a lot of sense. These devices, along with other smart devices such as pH monitoring, can literally be “planted” along with crops. The power source? Often solar. In the case of irrigation, the amount of water sprayed can be precisely correct for the exact soil moisture level, leading to both higher crop yields and lower water usage. How can we continue to feed a rapidly expanding human population? Technologies like these will go a long way toward doing so, and they’re all enabled by telecommunications.

And with that, it’s time for me to finish eating this turkey sandwich. Hope you had a happy Thanksgiving, and best wishes for the new year! The world only gets more exciting every day.


https://www.youtube.com/watch?feature=player_detailpage&v=qTqi9xnMf3U – A Smart Meter video from BC Hydro, which provides a good overview of the features and services brought by smart meters.

http://www.bchydro.com/energy-in-bc/projects/smart_metering_infrastructure_program.html?WT.mc_id=rd_smartmeters – Excellent FAQ and information from BC Hydro which in particular describes the science of smart meters. Designed for the tinfoil hat crowd.

http://www.cityofgreensburg.com/MiNet.pdf – Excellent technical whitepaper on Mueller Systems smart meters.

http://www.kongskilde.com/Agriculture/Grain/SensSeed/SensSeed/Wireless%20sensor%20system# -Many technical whitepapers, along with sales brochures, for the Kongskilde agricultural sensor system.

http://ijarcsms.com/docs/paper/volume2/issue1/V2I1-0007.pdf – Detailed academic paper describing a prototype GPRS-based sensor network for irrigation.


Unlocking The Secrets Of SMS (Summer, 2008)

Hello, and greetings from the Central Office! After an unusually cold and rainy winter here in the Pacific Northwest, summer is in full swing. With so little good weather in this part of the world, people head outdoors and make the most of it—even with gasoline hovering near $5 per gallon.

For many young people, this means it’s time for noisy outdoor concerts, which I’m told are even louder than our diesel backup generator here at the Central Office. At a huge music festival with sound systems approaching the decibel level of a 737 taking off, how do you find your friends? Increasingly, text messages are the solution.

You may not think about it much when you’re sending “HEY CRACK DAWG WHERE U @” to your friend, but sending and receiving small text messages is incredibly complex—in fact, much more complicated than e-mail. Making matters worse, there are multiple versions of SMS, and multiple technologies involved in mobile phone systems (for example, CDMA IS-95, CDMA2000, GSM CSD, and GSM GPRS). For this article, I’ll focus on GSM networks, which are operated by AT&T and T-Mobile (along with some smaller regional carriers such as Edge Wireless) in the US.

Text messages are governed by the Short Message Service (SMS) standard. This is currently defined as part of the European Telecommunications Standards Institute (ETSI) GSM 03.38 standard. It incorporates, by reference, the MAP part of the Signaling System 7 (SS7) protocol. The specification allows for 140 byte messages. In North America, this translates to 160 characters because the character set used is limited to 7-bit ASCII characters. In Unicode alphabets (such as Arabic, Chinese or Cyrillic), where characters are 2 bytes apiece, SMS messages can only be 70 characters in length. Whichever alphabet you use, larger messages are generally split apart to be delivered (and billed) as multiple text messages. However, because additional metadata is required to accomplish this, the size of each message is reduced by 6 bytes (7 ASCII characters).

To understand how a SMS message is delivered, it’s important to first understand a little about how GSM switching works. So, here’s a crash course.


When you sign up for service, your phone number, the IMSI from your SIM card, and information about the capabilities of your account are input into the Home Location Register (HLR). This is a database operated by your wireless carrier, and it largely controls what your handset is both allowed and configured to do on the network (e.g. place and receive calls, send and receive text messages, forward calls to voicemail, use data services, and so forth). The HLR also keeps (approximate) track of your location on the network, in order to deliver calls and messages appropriately. In general, each wireless carrier operates one HLR topology, and large carriers split up subscribers between HLR nodes. The HLR is the nerve center of a wireless carrier, and if it fails, a very bad day is guaranteed for the person who administers it. At a minimum, nobody will be able to receive incoming phone calls, text messages will be delayed, calls will not forward to voicemail, and self-important people in SUVs everywhere will be unable to use their BlackBerrys while running over old ladies in crosswalks. So, as you might imagine, an HLR outage means the carrier may lose thousands of dollars per minute. Fortunately, redundancy and failover capability are fairly sophisticated. For example, Nortel’s NSS19 platform allows for both local and geographical redundancy. HLR databases themselves are also designed with a high degree of redundancy and fault tolerance, allowing rapid recovery in the event of failure.


An MSC is a Mobile Switching Center. In effect, this is a Central Office for mobile phones. However, unlike traditional wireline Central Offices, which generally cover only one city (or in large cities, as little as one neighborhood), MSCs generally cover an entire region. These incorporate all of the functionality you would expect from a modern Central Office, along with a lot of whiz-bang features specific to mobile phone applications (such as the VLR described below).

MSCs can be either local or gateway MSCs. A gateway MSC is analogous to a tandem switch, and can communicate fully with other wireless and wireline networks. A local MSC is analogous to a local switch, although these switches can often route directly to the PSTN (and increasingly, VoIP networks) for voice calls. 


Your mobile phone will generally be registered in the Visitor Location Register (VLR) of the Mobile Switching Center (MSC) serving the area in which it is located (although the HLR does not necessarily have to be decoupled, so in smaller GSM systems the VLR may be the same as the HLR). The VLR retrieves a local copy of your subscriber profile from the HLR, so most routine queries can be processed against the VLR rather than the HLR. This minimizes load on slow and expensive inter-carrier SS7 (and sometimes even X.25) links and the HLR servers. These systems are also designed with a high degree of fault tolerance, because it’s also bad if they fail. However, the failure of a VLR will cause only a localized outage. Failed calls will generally be forwarded to voicemail in the interim, and SMS messages will be held for delivery until the VLR is again operational.


The MXC (also referred to as MC) handles messaging. On GSM systems, this includes voicemail, SMS, and fax features (yes, the GSM standard includes sending and receiving faxes for some reason).


Hey, we finally got to the piece that really matters. The SMSC is the component of the MXE which handles SMS origination and termination. SMS messages sent or received generally pass from your handset to the MSC to the MXE to the SMSC, and then either in the reverse direction (for on-network SMS) or to the gateway MSC for inter-carrier delivery.

Message flow

I’m a visual person, so here’s a visual depiction of how an SMS is sent. Read it from left to right:


Diagram showing how SMS originates

Figure 1: Mobile SMS Origination (Diagram drawn by Carre)

Note that the SMS protocol accounts for the unreliability of wireless networks by using an acknowledgement sequence.

Next, here’s a visual depiction of how your phone receives SMS messages from the network. Read it from right to left:

Diagram of how GSM phones receive SMS

Figure 2: Mobile SMS Termination (Diagram drawn by Carre)

Note that the acknowledgement sequence is also end-to-end, as in Figure 1.


While the GSM standard defines how the SMS protocol works and the data structures associated with it, billing is left up to the carriers. This is a contentious issue, particularly overseas where carriers do not charge for receiving SMS messages. Unlike e-mail, SMS is billed per message, and carriers will generally not deliver messages unless they have a billing arrangement with the originating carrier. This has given rise to inter-carrier SMS providers, such as VeriSign, who negotiate wholesale billing arrangements on behalf of carriers. Generally, in the absence of a billing arrangement, carriers will refuse delivery of SMS messages. This is a particularly glaring issue when using SMS short codes. For example, the popular 8762 (UPOC) short code is not available to Sprint subscribers, because Sprint lacks a billing arrangement with Dada (the owner of Upoc).

Well, it’s the end of my shift here in the Central Office, so enjoy the rest of your summer and please wear ear plugs if you dance near the big speakers. Instead, save your hearing for The Last HOPE in New York, where I’ll be speaking this year!


http://www.nowsms.com/discus/messages/1/1103.html – This message board thread provides a detailed description and listing of the SMS character set.

http://www.nortel.com/solutions/wireless/collateral/nn117101.pdfNortel whitepaper for the NSS19 HLR platform.

http://www.eventhelix.com/RealtimeMantra/Telecom/ – Detailed flowcharts of common GSM call flows and sequences.

http://en.wikipedia.org/wiki/GSM_services – Well-written Wikipedia article outlining consumer services available on GSM networks.