Monday, June 1, 2009

How we use FrontlineSMS

Jos, Nigeria has been in the news recently because of riots in November that killed hundreds of people. This was the second such episode since 2001, and the situation remains tense. Besides this, violent crime has increased rapidly in the past 4 years, with frequent robberies by armed gangs of up to 20 or more men.

tempPart of our response as a group of missions in Jos has been to strengthen our communications network, and FrontlineSMS has become a key part of that network. The mobile phone is the basic means of communication in Jos, where there are few if any functioning land lines, and where Internet access is still expensive and spotty. During the November crisis, we noticed that voice calls on the mobile network rarely connected, probably because of congestion, while SMS messages got through well.

With FrontlineSMS, we have so far developed a system with these features:

  • Anyone can text the system and receive a response with the current status message. In a crisis, this could contain warnings, instructions, announcements and so on.
  • Besides this "on demand" capability, we keep one list of users ("text alerts") who receive broadcast alerts.
  • Anyone can join the "text alerts" group by sending the request as a text message to the system. We ask people to send the message ".join " followed by their name. At this point, FrontlineSMS cannot automatically include the name when the phone number is added to a group, but we hope that could be added in the future.
  • We maintain other user lists such as compound security leaders, crisis management team, and so on. Anyone can broadcast a message to the crisis management team by prefixing a text message with a code that causes FrontlineSMS to forward the message to team members.
  • The system sends outgoing SMS message through the Internet when it is available. They're sent to the Clickatell, which routes them to the actual SMS network. Clickatell is is very fast and inexpensive. We can send about 80 messages per minute this way, far more than is currently possible if we were to send messages directly onto the mobile phone network.
  • FrontlineSMS is compatible with many mobile phones and modems. We are using a Huawei E170 modem.

    Real Life Examples

    Fortunately, we have not had actual rioting since we set up the system. However, there have been times when it has been very useful to send warnings and to raise the alert level. Here are some actual examples:

    @Alerts: Jos is tense, please avoid downtown today.

    @Security: X and Y have been robbed tonight & report the robbers took their Toyota Land cruiser and muttered something about Hillcrest on the way out.

    @Alerts 20Feb 655pm. Serious rioting reported in Bauchi. No problems in Jos. Obey curfew, avoid areas that could be troublesome.

    22 Feb 8am. *** Rioting on Friday Bauchi, churches & mosques burned. Now controlled. Keep on alert. Report signif news this num or ur security rep.

    SecGrp: Some rumors are going around about unrest planned for Friday, .... Email or txt me if you know more. --Mike

    Effectiveness

    The system has worked quite well. The most serious limitations have been

    • The interfaces (modem and Internet) have had a tendency to lock up, failing to receive messages, and have to be re-initialized manually.
    • Message delivery is sometimes delayed for hours, occasionally more than a day. This is a fault of the local network and has nothing to do with FrontlineSMS or Clickatell.

    Summary

    FrontlineSMS has served us very well as a well to communicate quickly by SMS. We would recommend it for others in similar situations.

    Tuesday, May 26, 2009

    Using WSUS to save bandwidth, and how to set up an XP Home edition computer to use it

    Two of the biggest challenges in keeping computers running in Africa are power and bandwidth. Bandwidth as in connection to the Internet, which is now vital for many of us. We're constantly trying to control and limit our bandwidth usage, which gets harder as people have higher and higher expectations. Our old-timers remember when we had to pay $0.50 a page to get emails that were sent over a noisy transatlantic phone connection to an expensive, 19 kbps Zyxel modem. Newcomers from developed countries are used to streaming video, Skype phone calls, file-sharing and so on.

    One of the hidden consumers of bandwidth, though, is program updates. Keeping programs up to date is critical for security, but can consume a lot of bandwidth. For example, our network at SIM Nigeria serves roughly 40 computers (including laptops members bring to the office just to connect to the Internet). If a set of Windows updates is released that comes to just 10 MB, that translates to 400 MB to update all 40 computers, which is close to a whole day's bandwidth allocation for us.

    Part of the solution is to use Windows Server Update Services (WSUS). This lets you download Microsoft updates onto a server on your network from which all your other computers can access them. Each update is downloaded once for the whole network, rather than once for each computer. You can read about WSUS and how to set it up here on the Microsoft Technical network.

    An issue I encountered when trying to get as many computers as possible to use WSUS, though, is that XP Home (as opposed to Pro) edition does not include the policy-setting tool (gpedit.msc) normally used to instruct computers to get updates from the local WSUS server rather than over the Internet from Microsoft. Nor can you simply copy gpedit.msc from another computer onto the XP Home computer.

    Instead, you can use a simple script to add some keys to the XP Home computer's registry. The script and explanation can be found at Guide For Setting Up XP Home Clients With WSUS. Just create a new text file, enter "REGEDIT4" as the first line, and copy and paste the registry keys as shown in that page. Change the two occurrences of "http://yourWSUS" to reflect the URL of your WSUS server. Save the file as "WSUS4XPHome.reg" (or whatever.reg) and run it on the XP Home machine. I think a simple reboot will suffice to start it looking for updates in the new location, but the page above tells how to use some commands to start the process immediately and without rebooting.

    Reversing the process

    You definitely do not want to leave these settings on a computer once it is no longer using your network for updates, since it will then fail to be updated at all. For computers joined to a domain that sets the group policy to use WSUS, it should be enough to remove them from the domain. For computers you manually changed (via local policy or registry changes) , you will have to undo those changes. As far as I know, you can simply delete the entire [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] key as it does not appear to exist in the default installation.

    If anyone has corrections or further information, I would love to know.

    Monday, May 18, 2009

    Twe2 is gone, but then I never did get it to work

    Earlier, I wrote about a service called Twe2 that allows people around the world to get Twitter messages on their mobile phones. That's needed because Twitter does not send to mobiles in most countries, only to the US, Great Britain, Canada, and, for some reason, India. Twe2 was supposed to be a gateway you could use to get around that limitation. Without something like it, Twitter is of limited use here (actually, I'm still trying to figure out what the use is).

    I've tried many times to get my mobile phone number "verified" to work on Twe2, but for some reason the confirmation message would never come through. Perhaps a problem with my carrier. Whatever the case, it's now a moot point because I learned today from Twe2's website that it no longer exists, the source code having been sold to Wadja (an unfortunately heavy, clumsy sounding name in English, in my opinion, but what's a name).

    temp I've signed up for Wadja (as MikeBlyth, in case you want to follow me) and am trying to get some friends in Jos to join so that we can test its capabilities. So far, I haven't seen anything about a gateway with Twitter, but we don't really need that if all we want is to access a Twitter-like network for our friends in Nigeria. I'll report later how it works. So far, all I can say is that the web interface seems really slow, at least from Nigeria.

    Sunday, May 10, 2009

    Disaster Avoided -- A Corrupted Microsoft Access Database File

    I had a near miss today, almost losing my main address list, which I keep in Microsoft Access. I haven't used it in quite a while, as I have another list of recent address changes, but it's still my most comprehensive list of mailing addresses. When I tried to open it today, I got a message that it was in an "inconsistent state" and Access would try to repair it. Next, an error message that it "can't be repaired" or "isn't a Microsoft Office Access Database File."

    I tried using my backup copies, but they had the same problem. It has been very long--4 years!--since I've put backups onto CDs or DVDs, simply because it takes so many of them, and have been relying mainly on one or two levels of medium term backups on an external hard drive.

    Of course, this is far better than nothing, but the risk is just what I encountered today: having a file lost or corrupted and not knowing about it until the last "good" backup is gone. The same can happen with a virus. If you are keeping system backups but a virus has silently infected your machine, it could happen that all your backups are infected by the time you discover the problem.

    I tried the solutions I found on the Microsoft site and by Googling, but they didn't work. The main thing I learned was that when your Access database is corrupted, there is a good chance that it's not something you can repair on your own. There are professionals who will do it, and some commercial programs. I tried one program, Advanced Access Repair, which quickly showed me that my data was recoverable. I was all ready to pay the $29.99 price of the program to actually recover the data, then noticed that the price is really $299.99. Oops.

    Happily for me, the next program I tried was MDB Repair Tool, by Skysof, and it promptly repaired the database without my having to answer any questions or try different options. It just worked. To my surprise, this "trial" version actually recovered all the data for me for free, and I still have 58 more uses before I have to register. What a deal!

    Lessons learned:

    • If you can't or don't want to save full backups to long-term media (DVD, CD, tape, or online), then you should at least save your most important data that way once in a while. This method is risky because you might miss data you should have backed up, but at least you will have most of what you need. (Be sure to include your email in your backup; it may not be included if you're not careful).
    • My address list doesn't need to be kept only in an Access database. I could periodically backup the actual address information so a simple text file. Then, if I lost the Access file, at least I would have the essential data.
    • Hopefully I won't ever have to repair another Access database, but if I do, MDB Repair Tool will be the first thing I try.

    Sunday, April 26, 2009

    Don't neglect online backups

    A week ago, one of my friends was mugged on his way home from school on a bike path. He was badly beaten and ended up unconscious in the hospital. Though his bike, computer and some other things were stolen, and despite his injuries, I suspect that his most serious loss is much of the work he had done on a masters thesis. Apparently any backups he had were also stolen.

    It's one thing to lose your most recent work, and losing your whole email store can be serious. But what if you lose something you've been working on for years--that book you're writing, a carefully compiled bibliography, your research data, a major proposal for your organization? It's almost unthinkable, yet it happens. Data loss is sure to happen if you have no backup strategy, but it can happen even if you do have backups. For example

    • Backups may be lost along with your computer in a fire, theft, evacuation and so on
    • Backup media may fail or be destroyed. Here in Nigeria, at least, flash drives have a high failure rate. CDs and DVDs can be scratched or damaged by sunlight and heat.
    • If your original data becomes corrupted and you don't immediately know it, you may store the corrupted data in the backups.
    • When do yo discover that your backup is damaged or corrupted? That's right, you discover it when you need it because your original data is lost.

    For these reasons, it is important to have more than one level of backup for any data that is important to you. For any data that is really important, you should have at least two and preferably three backups stored in a way that they cannot be lost simultaneously. For example, you could keep one copy on a hard drive at work, one copy on a flash drive or re-writable CD at home, and one copy online.

    In my last post, I briefly mentioned that one use of Dropbox was backing up your data online. Online backup should be more than an afterthought--it should be an important part of your backup strategy. Most of us in Africa do not have the luxury of a low-cost Internet connection that will let us back up all our data, let alone the whole system, but we can back up what is most important. Apart from multimedia files (video, pictures, music), your most important data, what you've actually invested the most time on, is probably a few hundred megabytes at most. You should at least consider saving some or all of it online.

    There are many online data storage services, including a fair number of free ones. I like Dropbox--it works for me--but another solution might work better for you. One thing I like about Dropbox is that it keeps previous versions of changed and deleted files. That feature has already saved me a couple of times.

    David Bradley's article "Make SkyDrive a Virtual Drive" describes the free Microsoft SkyDrive online service and add-ons that make it more useful and transparent. Some people send their important documents to their own online email addresses (a Gmail account, for example). It's not the simplest or most secure method, but it's a lot better than nothing.

    Saturday, February 28, 2009

    Dropbox: A free, low-bandwidth solution for online file sharing, syncronization and backup

    One of my projects is the book AIDS Is Real and It's In Our Church, which I co-authored. The English version has been quite a success, Hausa and Amharic editions are in print, and now we're working on the French version. One of the technical problems we've dealt with is simply how to share the files between authors and editors on different continents, while being sure that corrections and updates are made to the right file. Once, in the Hausa version, I spent quite a few hours making corrections and then discovered that the file I'd been given was not the latest.

    There are many approaches to this issue, which after all is a common one whenever people are collaborating on documents. One of the particular constraints for some of us though, is that the solution has to be low-bandwidth, simple, and free (or at least very low cost). It simply isn't practical to be uploading and downloading a 20 MB file every time it is changed.

    I've looked briefly at Google Docs, which works fine and would be my first choice for documents that don't have a lot of formatting requirements. Collaborators work (even simultaneously) on a document in Google's own format, stored in cyberspace somewhere, and that document can be exported when necessary to another format. Documents can be text (with pictures), spreadsheets, or presentations. Google Docs is free, doesn't require any setup, and lets users work online or offline (that is, you can edit documents even while not connected to the Internet, and they will be saved again when you are online).

    Google Docs won't do what I need at the moment, though, which is to allow people to edit Microsoft Word and Publisher documents. That is where Dropbox has been a real help. I use it to
    • Share files with co-workers, automatically keeping everyone's copies synchronized
    • Work on files from different computers without having to do anything manually to keep them synchronized
    • Keep online backups of projects I'm actively working on, so that the backup is always current.
    Here's how it works:
    1. Download and install the free software (currently a 14 MB file). It creates a special My Dropbox folder on your computer.
    2. Register as a user with the service. You get a 2 GB online folder free, and can pay for more storage.
    3. "Once installed, any file you drop into your Dropbox folder will synchronize and be available on any other computer you've installed Dropbox on, as well as from the web. Also, any changes you make to files in your Dropbox will sync to your other computers, instantly."
    4. Dropbox does not transfer the entire file each time it is changed, but only sends the changed portions. This means that when I change one word in the 20 MB file, only a small amount of data has to be sent back and forth over the Internet, not 20 MB. That makes it useable over our low-bandwidth connection.
    You can use the Dropbox folder like any other folder. Drag files into it, make sub-folders, add and delete files, and so on. All those files and sub-folders will be transparently synchronized with your online folder and with any users sharing those files. That last point is important. People sharing your files do not have to do anything to keep their copies up to date, as Dropbox does that in the background.

    Example:
    1. I create an "AIDS is Real" folder inside my Dropbox folder and drag my 20 MB aids_is_real.doc file into it.
    2. If my collaborator does not already have Dropbox installed, I send her an invitation to install it.
    3. I mark the AIDS is Real folder as shared with my collaborator, for reading and updating.
    4. The Dropbox software automatically downloads aids_is_real.doc into my collaborator's computer.
    5. I open my copy of the document from my local Dropbox folder, make some changes, then save and close the file (changes are not synchronized until the file is closed).
    6. Dropbox software automatically saves my changes to the online copy and to my collaborator's local copy. When my collaborator opens her copy, it is always up to date (as of the last time she was connected to the Internet).
    7. Likewise, when my co-worker changes the file on her computer, those changes will be reflected in my local copy (almost) immediately.
    Give it a try! It's well worth the effort if only for the ability to keep 2 GB worth of your important projects safely backed up online. (Of course, how safely depends on the long-term survival, security, and stability of Dropbox; you shouldn't depend on any one service for the backup of your valuable data).

    Monday, February 16, 2009

    Now you can use Twitter in Nigeria

    This is the good news I learned today from Jon's latest blog at Appfrica.net. In case you don't know, Twitter is a "micro-blogging" service that lets you send tiny posts, limited to 140 characters each. The posts appear on your page where (as you choose) others can view them, but they can also be broadcast by mobile phone text messaging (SMS) to anyone subscribed to you. You can choose to let everyone subscribe, or you can let only approved individuals subscribe, depending on your needs.

    The problem has been that last year Twitter stopped sending out those SMS messages in most countries of the world, basically because they didn't have any way to fund the service--someone has to pay for all those messages. Now, as Jon describes, you can use a new service called Twe2 which does send text messages around the world. They're financed by attaching a small text advert to each one, which seems to me a reasonable price to pay to receive free text messages by Twitter.

    I'm still trying to subscribe ... it's very easy but requires your mobile phone number to be verified, and sometimes here in Jos it takes many hours for SMS messages to be received, so the verification could take a while.

    Now, if I can just figure out a good reason to use Twitter ...