Monday, May 30, 2011

Weekly report: 5/25 - 5/31

The goals for this week were to:

  • Figure out if there was a "mid-way" solution between using a smart phone to receive/send all sms messages, and whatever industrial solutions American Idol and the like uses.
  • Continue researching, corresponding with people to ensure that our solutions will work. Finding out what similar solutions are already out there.
  • Get started on smart phone development: Symbian, Blackberry, etc.
  • Research the plausibility of a facebook app
Most of my time was spent with the first part, and I've made a lot of progress in that area. Essentially I learned that in order to do what we want, the only options are to use a smartphone as we previously learned, to use a commercial SMS gateway, and to use a GSM modem connected to your computer. (Good link summarizing that is here.) The latter two options are described below:

SMS Gateway

This option was the more expensive one, closer to the "American Idol"-like solution. It involves basically having another company take care of the technical details. I contacted a bunch of companies offering these services:

twilio - doesn't deliver sms to destinations outside US / Canada

textghana.com - sent email, no response

smsjunction - they responded: "As of now don't have stable coverage for Ghana"

routomessaging - sent email, no response

ozeki.hu - They claim to be the largest provider of sms gateways. They have a great api guide. They responded to my email by recommending their product "Ozeki NG SMS Gateway".
They also have great guides on how to set up gsm modems:
http://www.ozekisms.com/index.php?owpn=101
http://www.ozekisms.com/index.php?ow_page_number=201

Ozeki is by far the best of these that I've found. However, even if we went with them we are still required to purchase the required hardware (a GSM modem, computer to run software, SIM card from compatible Ghanaian service provider, etc). Furthermore, their pricing is set up for extremely large traffic clients (the cheapest is for 5 messages / minute, for about $850 USD+any separate fees the Ghanaian service provider charges).

GSM Modem

Since we'd have to purchase the hardware anyway, the mid-range solution would be to either write our own software to communicate with the GSM modem, or find something free out there. There are some good resources I've found and studied for implementing our own solution:

receive and send from gsm using visual basic:
http://www.codeproject.com/KB/cs/SMS.aspx

tutorial about gsm:
http://www.developershome.com/sms/GSMModemIntro.asp

But I first tried to find something that already existed. Fortunately something like that exists and is highly acclaimed. Frontlinesms seems almost custom made for us, just check out their mission statement:
A lack of communication can be a major barrier for grassroots non-governmental organisations (NGOs) working in developing countries. FrontlineSMS is the first text messaging system created exclusively with this problem in mind.
By leveraging basic tools already available to most NGOs — computers and mobile phones — FrontlineSMS enables instantaneous two-way communication on a large scale. It’s easy to implement, simple to operate, and best of all, the software is free. You just pay for the messages you send in the normal way.
Their software is free, and has been used by tons of other groups in order to establish sms services in 3rd world countries. I found one person who is using frontlinesms in Ghana, and I contacted him to get experiences and to find out his success rate (no response yet). Finally, the frontlinesms website claims the following uses are implemented already in Ghana:

  • Helping citizens monitor elections
  • Fundraising for charity football matches
  • Interaction with audiences in radio broadcasts
  • Tracking students returning to secondary education using surveys
  • Providing automated responses regarding drug authenticity
  • Communication with microfinance clients about their loans
  • Allowing people to report human rights violations or other incidents
  • Empowering local communities to express and convey their opinions

The cost to implement this would be considerably less: we just need the hardware, and need to pay for whatever monthly Ghanaian service provider charges there are.

Implementation


To get this to work, we first need a GSM modem. This can be a phone that allows sending and receiving of AT commands, or (more reliably) a dedicated modem. We need the intersection of devices which:

  • Work in Ghana
    • According to this website, almost all Ghanaian service providers support GSM 900.
    • I asked MTN Ghana, and they responded that to use their SIM cards, we need a phone that has "the frequency bandwidth of 1800/900".
  • Work in America - this is for testing purposes. As long as we have an unlocked device (one that allows us to use sim cards from different service providers; I emphasize because popular modems such as the T-Mobile Jet are locked to T-Mobile), every known US service provider supports at least GSM 900.
  • Work with a T-Mobile SIM card - this is again for testing purposes.
  • Work with the software we decide to use
  • Can handle a reasonable load (this rules out all old phones)
Several devices fit all of these requirements, namely the recommended modems at the top of the Ozeki list I linked. Only one of these, the "HUAWEI E220 3G WWAN HSDPA UTMS USB MODEM 7.2M", is USB (the others are serial) and so I placed an order for one, it should arrive in the next few days.

Until then I'm trying to get used to the frontlinesms software, and have started testing it using my own phone as a modem.

Other Stuff

Haven't gotten around to the facebook and smartphone app stuff yet. However my initial research with the smartphone apps do not bring optimism: the development environments for android, iphone, symbian, and blackberryOS are too different to easily create a unified solution. Learning, developing, and testing for all of them may be too implausible for this summer.

Monday, May 23, 2011

Weekly report: 5/18 - 5/24

This week was spent investigating the options for a system which would allow cell phone owners in Ghana to easily access information about condom providers in the area, and possibly set up a social networking system that would update, rate, and improve the quality of this information. Particularly in regards to the following questions:
  1. Does Ghana have a zip code or area code system? Are they too big to be useful? Comfortable walking distances for Americans is typically a quarter mile radius (5 minutes at a comfortable pace).
  2. How do we embed location information into a text message. Do emergency (911) services help in this regard?
  3. What are the service providers in Ghana? Could they be of help to this project? Would they be interested in using our final (open source) product? 
  4. How much does the software and hardware for a phone tree cost?
The questions and the relevant research is as follows:

Does Ghana have a zip code or area code system?

Ghana is divided into ten regions (capitals)(area code):
Ashanti Region (Kumasi)(32)
Brong-Ahafo Region (Sunyani)(35)
Central Region (Cape Coast)(Central)(33)
Eastern Region (Koforidua)(34)
Greater Accra Region (Accra)(30)
Northern Region (Tamale)(37)
Upper East Region (Bolgatanga)(38)
Upper West Region (Wa)(39)
Volta Region (Ho)(36)
Western Region (Sekondi-Takoradi)(31)

These are further subdivided into 170 districts which are either municipal, metropolitan, or ordinary. These districts range widely in size, anywhere from being 730 km2 (about 17 miles across) to 17,317 km2 (about 80 miles across). Some of districts are further subdivided into councils, but I am having trouble finding a complete, up to date list of these councils (I wonder if this is because the councils are somewhat more informal).

There appears to be no zip code-like system in place (USPS website confirms this) other than the area codes which refer to the regions.


How do we embed location information into a text message. Do emergency (911) services help in this regard?


9-1-1 works in the following way (from Wikipedia):

"In 2000, the U.S. Federal Communications Commission (FCC) issued an order requiring wireless carriers to determine and transmit the location of callers who dial 9-1-1. The FCC set up a phased program: Phase I transmitted the location of the receiving antenna for 9-1-1 calls, while Phase II transmitted the location of the calling telephone. The order set up certain accuracy requirements and other technical details, and milestones for completing the implementation of wireless location services. Subsequent to the FCC's order, many wireless carriers requested waivers of the milestones, and the FCC granted many of them. By mid-2005, the process of Phase II implementation was generally underway, but limited by the complexity of the coordination required from wireless carriers, PSAPs, local telephone companies and other affected government agencies, and the limited funding available to local agencies which need to convert PSAP equipment to display location data (usually on computerized maps). Such rules do not apply in Canada.[27]FCC rules require that all new mobile phones will provide their latitude and longitude to emergency operators in the event of a 9-1-1 call. Carriers may choose whether to implement this via Global Positioning System (GPSchips in each phone, or by means of triangulation between celltowers. Due to limitations in technology (of the mobile phone, cellular phone towers, and PSAP equipment), a mobile caller's geographical information may not always be available to the local PSAP. Technologies are currently under development to remedy this situation and improve performance.[28] Although there are now technological ways to obtain the geographical location of the caller, a 9-1-1 caller should try to be aware of the location of the incident about which he or she is calling."
So as far as automatic location finding based on texts, no, at least not without cell phone carrier permission. It is unlikely they would allow us to do this, as it would certainly raise privacy concerns. 911 services, in the US at least, use cell phone towers to detect your location and Additionally, people there tend to use pay as you go services rather than monthly services. I emailed some of the top service providers (MTN Ghana, Vodafone, Zain, Tigo, not Glo Mobile) to see if they could offer me any information about this, and also if they could send me information on phone type/usage data in Ghana. Hopefully if there is a way to get location information from texts they will respond and tell me.

That should answer question 3, as well. The final question, and the rest of what I've learned so far, can be summarized by the following options I've been researching for how to implement this system.



Option 1: SMS -> Script -> SMS

This option seemed the most straightforward: write some program that could run on a server somewhere, have people text their location to a numer, have the program read the messages, process the text, and then respond with the nearest locations. I found a really cool python script that allows sending AND receiving of texts (both of these use textmagic):
I emailed that company, textmagic, to have them suggest which pricing/service option is best for our purposes. Unfortunately, it turns out that you can only receive SMS from numbers you have already sent messages to (this service is more for bulk message senders, such as advertisers), so that effectively eliminates this option.


Option 2: SMS -> email -> SMS

According to this website, you can send SMS to email from almost any phone by just typing in the email address. This worked with my phone. 

Advantages
  • Somewhat easy to implement
  • Cheap -- all we need is a server running constantly (from anywhere, can even be located in the US) that checks emails, parses them and responds.

Disadvantages
  • Do not know if it works with non-smart phones (need to test)
  • Need to know if it works with Ghanaian service providers. It worked with mine, but I am using a smart phone (running Android) and T-Mobile as my service provider.
  • My phone (with T-Mobile) added a bunch of extra information with the text -- the t-mobile logo, header info, etc. This will be difficult to parse through, since each service provider might include different information, and these formats might change over time.
  • The idea of texting to an email address might be confusing to non-technical people (even I never knew it was possible before today).

Option 3: SMS -> Smart Phone -> SMS


Another option is to have an android device (or other smart phone) intercept text messages. The idea is that the smart phone would always be running a process which would be listening for incoming messages. Since the phone would have a phone number, it would receive texts, process them, and either send back a text on its own, or pass the message to a faster device (a computer) which would do the processing and reply with an SMS.

I contacted a T-Mobile representative about this option, to find out how we would set up a US-based smart phone to receive and send texts to Ghanaian numbers without incurring additional costs:

_Gregory C:  John, you have several options for what you want.
_Gregory C:  If you want a Ghanaian number, you will need to start service or obtain a sim card from Ghana. If you want a T-Mobile device to be unlocked for you, you can purchase any T-Mobile device at full retail price from a T-Mobile store.
John Licato:  can any t-mobile device be unlocked?
_Gregory C:  Yes they can. It is a short process in which we will submit a request to the manufacturer and an email with a code and instructions will be emailed to you, so you can recieve it anywhere in the world.
John Licato:  I see, and then any monthly rates or fees I'd have to pay would be to whatever Ghanaian service provider I choose?
_Gregory C:  That is correct.
John Licato:  I don't know if you'd know this, but do you know if those international service providers would charge any additional roaming fees for receiving and sending texts since the phone would be in the US?
_Gregory C:  Many providers around the world offer prepaid sim cards for a set price that allow international texts and calls.
I also contacted some Ghanaian service providers regarding this question and to see if they had any plans/rates that would work best for us. Still waiting for a response.
EDIT: Two Ghanaian service providers seem to imply that this is not true and that international fees will still be incurred, I am corresponding with them to confirm this.

Advantages
  • Also relatively easy to set up (note that for options 2 and 3 I say they're easy, these are relative terms compared to option 1 and 4) since I already have experience programming Android applications.
  • Easy to use -- the user simply has to text the phone number attached to our listening device.
  • The "extra information" problem with option 2 would (presumably) be eliminated, since only SMS data would be transmitted.
Disadvantages
  • Cost -- we have to not only buy a smart phone (one time fee), but we have to pay the monthly service charges to a Ghanaian service provider.
  • The device receiving the incoming messages would have to be relatively fast to handle all of the traffic. We can mitigate this somewhat by having another device (a computer, laptop, whatever) to which the phone would delegate part of the processing power, but this solution would definitely not scale to extremely large numbers. It is, however, extremely plausible as a starting point.



Option 4: Smart Phone -> Website

Senyo seemed confident that a lot of Ghanaian users have smart phones which presumably would have internet access (my emails to the Ghanaian service providers asked to confirm this, hopefully they will respond with some data). If smart phones with internet access are sufficiently prevalent, then we actually have two sub-options here:

  1. Program a lightweight website that Ghanaians can go to with a web app graphical user interface where they can enter their location.
  2. Program an app they can download which would automatically determine their location and give them the relevant information.


Advantages
  • Would be easy to use
  • Virtually cost-free in terms of set up, equipment costs. All we would have to pay for is website storage and whatever trivial app market fees there are.
  • The interfaces would provide better locations: turn-by-turn directions perhaps, and maps with locations clearly marked would make them much easier to find.
  • Kills two birds with one stone: They can also easily rate places they've been to from the same app.
Disadvantages
  • We don't know the distribution of smart phones in Ghanaians at this time. And even if it is relatively large, the amount of them that have consistent internet access and data plans may not be acceptable.
  • Programming and maintenance would be extremely difficult. In addition to testing the smart phone app or web app on the different operating systems (at least Symbian and Blackberry OS), we may have to test it on phone models that aren't even available in the US.
  • In the case of apps, installing the app before use may be a bit of a hassle for first-time users.



Option 5: Phone Call -> Auto-Answering System

The more old-fashioned back up plan is to have a system that would answer their phone calls, offer them a menu where they could press a button to choose their area, and give them the relevant information. Software exists for this purpose, and they range anywhere from $100 to $600 (I haven't found any free versions at this time). 

Advantages
  • Somewhat easy to implement
  • Easy to use -- all they have to do is call, listen, press.
Disadvantages
  • May be somewhat slow--it will take a while for the system to read through each option.
  • Maintenance and creation will be difficult. We'd have to have a human voice recorded to read every possible location, which is a daunting task. Speech synthesis (automatic computer reading) might not be trustworthy enough to pronounce some things here.
  • The software is costly, and the additional costs--how would we make it so Ghanaians wouldn't have to pay international calling fees each time?
  • Pay-as-you-go plans may make minutes a rarity, and it could discourage some from using a call-only service.

Option 6: Facebook App


This may be something interesting to look at for the future -- a friend from Kenya mentioned to me that Facebook usage is becoming pretty widespread in Kenya and Ghana alike. The data from this source shows about 950,000 Ghanaian facebook users (3.9% of the population) and incredible rates of growth (50,000 new users just in the past month). A facebook app would be simple to use--they simply log into facebook, click their location on the map, and look for places nearby. It would give us all of the benefits of a web app (option 4.1). 

Recommendation

With all of these options in mind, I feel that option 3 is the best way to go right now. It could give us something to start with that can be plausibly finished and implemented by the end of the summer, which can be built on and expanded easily. Options 1 and 4 are, in my opinion, ruled out. Option 2 is the second best idea, while option 5 is a good back-up idea.

Wednesday, May 18, 2011

Setup / Test Post

Just set up this blog today; this blog will contain the record of my work done this summer.