Making Wikipedia Available by Text Message — Part 2

Murtaza Tunio
BurningDaylight
Published in
2 min readMay 22, 2019

We left off last time with a prototype working off of my computer using the Twilio framework. In this brief update I show how I moved over to the EnvayaSMS framework in Python.

EnvayaSMS is an android app which enables the phone to forward incoming messages to a server, and receive ‘send-message’ requests and other instructions from the server. Basically, it makes it very easy to run sms-based applications from any android phone. However, standard incoming and outgoing charges do apply. So although we are closer, we are still far from enabling completely free, and internet-free access to Wikipedia (etc.). As far as I know only ‘short-codes’ are free to text, and are expensive to buy and use.

The move over from the Twilio based protocol to the Envaya based one was fairly trivial. The ‘Wikihelper.py’ interface is the same as before, and the new Envaya message handler was fairly easy to set up as well. The only real learning curve here is the exact protocol which Envaya uses to forward messages and acquires instructions. The details are in the scripts linked below.

On the user side the interface is exactly the same, except that they text a local number instead of an international one, and hence pay only local sms fees. (Which is literally ~1000 times cheaper!).

Future development goals:

  • Making sessions for each request by a different number. I will have to strictly define a scheme to maintain sessions for request/number.
  • Moving off of the free ngrok service I am using in a cost — effective way. Perhaps setting up a local server on a spare machine and pointing the Envaya client (running locally) to it.
  • Potentially moving the entire project into a standalone Android app. This would be the cleanest and most efficient way to run the framework.

Scripts:

Here is the same Wikihelper script which sits behind the new Envaya Message handler. And here is the new Envaya message handler script.

--

--