Archive for October, 2010

I spent half a day setting up a demo RapidSMS system using Ubuntu 10.04, a Multitech MTCBA-G-U-F4 modem, and the RapisSMS-XForms application.  I’m new to RapidSMS and revisiting DJango after many years so this will be the first of several posts documenting how I setup RapidSMS to accomplish various needs for mobile data collection in Nigeria.

Visit the Google Doc: RapidSMS on Ubuntu 10.04 with MultiTech MTCBA-G-U-F4 for the most up-to-date version.

RapidSMS on Ubuntu 10.04 with MultiTech MTCBA-G-U-F4

  1. Connect and Configure MultiTech Modem
  2. Install the Python Environment
  3. Installing pyGSM
  4. Installing RapidSMS
  5. Configure RapidSMS and RapidSMS-XForms
  6. Add a RapidSMS Project
  7. Add the MultiModem GSM Backend
  8. Add the XForms App
  9. Starting Up RapidSMS
  10. Getting Stated Collecting Data
  11. References

Connect and Configure MultiTech Modem

Connecting to the MultiModem from Ubuntu is easy using the screen command.
screen /dev/ttyUSB0 115200,ctsrts
From here you can issue AT commands to view the modems status, configuration, as well as read and send messages.
AT+CREG? [enter] will tell you the status of the modem. The response 0,1 is typically what you are looking for.
To use the modem in Nigeria I needed to change the GSM band.
AT+WMBS=5,1 [enter]
After this step I needed to disconnect and reconnect the modem for it to receive and send SMS messages.
Confirming that you can send and received SMS messages or even establish voice calls is a good next step before proceeding to installing and configuring pyGSM and RapidSMS.  See the MultiModem guide referenced below for the SMS Examples (pg 27) and Establishing a Voice Call (pg 26) sections.
To end the MultiModem terminal issue the ctrl+a k and press y to confirm the killing of the session.

Install the Python Environment

sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install pip
sudo pip install –upgrade pip
You will also need git installed (sudo apt-get install git-core) and the sqlite3 packages (sudo apt-get install sqlite3 sqlite3-doc).

Installing pyGSM

sudo pip install pytz (an additional library needed by pygsm)
Retrieve the pygsm sources from the rapidsms repository on github and unpack to the /usr/local area for easy system access.
cd /usr/local
sudo git clone http://github.com/rapidsms/pygsm.git
Compile and Install pygsm
cd /usr/local/pygsm
sudo python setup.py install
To check to make sure pygsm is working normally you can run the pygsm_demo program.
pygsm_demo /dev/ttyUSB0 baudrate=115200 rtscts=1

Installing RapidSMS

I installed the RapidSMS from the github repository using
pip install git+git://github.com/rapidsms/rapidsms.git#egg=RapidSMS
To be able to quickly create forms in installed the rapidsms-xforms app
pip install django-uni-form
sudo pip install rapidsms-xforms

Configure RapidSMS and RapidSMS-XForms

TODO: Understand what virtualenv settings are for

Add a RapidSMS Project

> cd ~
> mkdir ~/workspace
> rapidsms-admin.py startproject myproject
> cd myproject

Add the MultiModem GSM Backend

Edit settings.py (gedit settings.py) and add the following to the INSTALLED_BACKENDS section
“mtn_ng”: {
“ENGINE”: “rapidsms.backends.gsm”,
“PORT”: “/dev/ttyUSB0”,
“baudrate”: 115200,
“rtscts”: 1
},

Add the XForms App

In settings.py you need to add the following to the INSTALLED_APPS section:
INSTALLED_APPS = ( “rapidsms”,
.. other apps ..
“uni_form”,
“rapidsms_xforms” )

In the instructions for XForms the is a step to configure the TABS section.  However neither of the two configurations available in the documentation work without errors. TODO: Find a fix for this or find the correct configuration.

TABS = [
(‘rapidsms.views.dashboard’, ‘Dashboard’),
.. other tabs ..
(‘xforms’, ‘XForms’),
]

TABS = [
(‘rapidsms.views.dashboard’, ‘Dashboard’),
.. other tabs ..
(‘rapidsms_xforms.views.xforms’, ‘XForms’),
]

Starting Up RapidSMS

To configure and setup the database (default is sqlite3):
python manage.py syncdb
Run the the RapidSMS/DJango development server
python manage.py runserver (starts a server on the localhost using port 8000, this is only accessible on the local machine)
python manage.py runserver ipaddr:port (will run the development server on the specified ip address and port, allowing connection from other machines on the local network).
Startup the Message Router in a different terminal or screen session.
python manage.py runrouter

Getting Stated Collecting Data

You should now be able to send and SMS to your Modem’s number and receive a response (most likely “Sorry, RapidSMS could not understand your message”).
These messages will show up in the Message Log (ie http://192.168.25.209:8000/messagelog/). To get data into the RapidSMS using the XForms app we need to visit the XForms ADMIN area (ie http://192.168.25.209:8000/admin/rapidsms_xforms/).

  1. Add a New XForm. (ie ‘friends’, with the response ‘Your friend added!’)
  2. Add several XForm fields. (ie ‘name’, ‘age’, ‘phone’)

When these fields are added you can now send an SMS to your modem and have the input received successfully.
SMS: friends +name Adam Thompson +age 27 +phone 123456789
You can check the Message Log and ‘x form submissions’ to see if your data was successfully received and you should also receive your confirmation SMS.

References

  1. Installing RapidSMS on Ubuntu 9.04 Jaunty
  2. Multi-Tech Wireless Modems Getting Started
  3. MultiModem® GPRS USB Wireless Modem MTCBA-G-U-F4
  4. Installing RapidSMS in Debian Based Linux for development
  5. RapidSMS-XForms github repository README
  6. RapidSMS-XForms Documentation

Development and formative evaluation of the e-Health Implementation Toolkit (e-HIT)
Elizabeth Murray1, Carl May2, Frances Mair3

1 E-Health Unit, Research Department of Primary Care and Population Health, University College London, London, United Kingdom
2 Faculty of Health Sciences, University of Southampton, Southampton, United Kingdom
3 Section of General Practice & Primary Care, Centre for Population and Health Sciences, University of Glasgow, Glasgow, United Kingdom

BMC Medical Informatics and Decision Making 2010, 10:61doi:10.1186/1472-6947-10-61
Published: 18 October 2010
Available online PDF [24p.] at: http://bit.ly/9O2DRG
“….The use of Information and Communication Technology (ICT) or e-Health is seen as essential for a modern, cost-effective health service.

However, there are well documented problems with implementation of e-Health initiatives, despite the existence of a great deal of research into how best to implement e-Health (an example of the gap between research and practice).

This paper reports on the development and formative evaluation of an e-Health Implementation Toolkit (e-HIT) which aims to summarise and synthesise new and existing research on implementation of e-Health initiatives, and present it to senior managers in a user-friendly format.

Results
The content of the e-HIT was derived by combining data from a systematic review of reviews of barriers and facilitators to implementation of e-Health initiatives with qualitative data derived from interviews of “implementers”, that is people who had been charged with implementing an e-Health initiative. These data were summarised, synthesised and combined with the constructs from the Normalisation Process Model.

The software for the toolkit was developed by a commercial company (RocketScience). Formative evaluation was undertaken by obtaining user feedback.

There are three components to the toolkit – a section on background and instructions for use aimed at novice users; the toolkit itself; and the report generated by completing the toolkit.

It is available to download from http://www.ucl.ac.uk/pcph/research/ehealth/documents/e-HIT.xls

Conclusions
The e-HIT shows potential as a tool for enhancing future e-Health implementations.

Further work is needed to make it fully web-enabled, and to determine its predictive potential for future implementations.