Implementing a simple mobile telemetry system using a simple LAMP stack

So every year around this time ie. the holidays, I’ll embark on a coding (more like “hacking”) spree and one of the on-going projects has been to build a simple telemetry (or what I called “App Beaconing”) system. I started with using Splunk (ie. beaconing to a Splunk server) and got a little frustrated with the whole process of finding a cheap Splunk instance to host it on (lol).

So last year (yeah, talk about *late* documentation! The code *is* on github tho), I decided to keep it simple and just implement a simple REST API on a LAMP stack and host it on Digital Ocean. Oh gosh I so love Digital Ocean! The best thing about DO is that it is just great for hobbyists cos unlike AWS (you practically sign your life away once you give them your credit card. It makes Amazon *really* rich tho) you can control your spend. Just prepay a fixed amount eg. $100 and once you hit that limit you know you have overspent or not (and it’s probably time to do some spring cleaning). You don’t clock up bills of like thousands of dollars (which happens a fair bit on AWS, so I’ve heard).

OK, enough with the bullcrap. Here is the github repo:

The is pretty descriptive. This is fairly old code and not updated so you’ll have to do your own updating (sorry!). There are 3 main folders:

  • LAMP – this is where the server code resides. There are PHP scripts and MySQL scripts there for set up.
  • iOS – this is code for the iOS app for beaconing the device location etc
  • Android – ditto for Android app

So what’s with the “hash” thingy? Well the code and server uses a shared secret to generate a HTTP Authorization header so that you know the POST is legit. (I’m too cheap to go with HTTPS).

Have fun!




Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s