Home Articles How to build a business in 7 days for under $500

How to build a business in 7 days for under $500 [Day#6: The Gateway]

4

So, you want to start a business but have no time or money? That’s no excuse, according to Sebastien Eckersley-Maslin.

In early 2010, serial entrepreneur Sebastien Eckersley-Maslin set himself a grand entrepreneurial challenge. In seven days, he would create a new business from scratch — from concept and branding to product development and launch.

And, to make things just that bit more tricky, he would do all this with a budget of only $500. For seven days, he blogged about his adventures (and misadventures). This is what happened.

Click here to sign-up for the full eSeries.

Entrepreneurs’ Challenge: Day #6

“Nothing is particularly hard if you divide it into small jobs.” — Henry Ford

AutoCarLog was quickly becoming a fully-functional system to manage vehicle mileage logbooks online. Now I needed a way for my customers to update their log books using SMS, and for this I needed an SMS gateway.

What is a gateway?

An SMS gateway is a device that takes an SMS from the mobile phone network and spits it onto the internet. There are surprisingly quite a few ways to go about doing this.

The easiest way is to use a third party. As previously posted, in Australia there are quite a few companies who will manage the gateway and send every incoming SMS to your website. They can also arrange to charge the mobile user a premium for this privilege (called ‘Premium SMS’). These services have a startup fee and an ongoing monthly cost, which can be as high as $1,300 a month for six digit premium ‘19’ numbers.

With my $500 budget, I couldn’t afford to go down this path for AutoCarLog, so I had to come up with another, cheaper way.

Using a mobile phone

The core of a SMS gateway is the GPRS module, an electronic chip which can talk to the mobile phone network and receive SMS of an attached SIM card. You can find these electronic chips everywhere, as every mobile phone has one.

So, I can receive SMS on my mobile but how do I get SMS messages delivered to my website? Well, firstly, I would need to get the SMS into a computer.

Most modern mobiles come with the ability to connect to a computer via a serial or USB cable. The mobile phone companies will then install a suite of software on your computer to manage contacts, read SMS, and update SIM card details. But what you might not know is that it is possible to send “AT commands” to a connected mobile by hand using a terminal program and read the messages directly.

The good news is that this idea isn’t new. Here’s a tutorial from the Nokia website on how to connect to Nokia mobiles, and here’s a great source about connecting mobiles to computers. Look up the AT command set for your mobile because, although it’s common, it isn’t a standard.

The flow of information from the customer to the server.

The program

Sending and receiving messages from your computer by hand is all very well and good, but you’re not going to want to sit at your computer 24/7 and type AT commands every time you check for a new message. No, you need a program to do this for you.

Any programming language that supports serial ports will do. DotNET, C, C++, Python and the old Visual Basic can all do it.

Your program shouldn’t be overly complex, in essence it should:

  • Check for new messages using AT+CMGL (Nokia),
  • Read a message in using AT+CMGR (Nokia),
  • Parse the message to retrieve the phone number, date and content, then
  • Upload it to a website using an HTTP request.

Fortunately, there are heaps of examples online of how to go about this, including completed code. You should be able to get something together with basic programming skills, and it wouldn’t cost much to outsource the development of one.

The hardware way

I didn’t use a mobile for AutoCarLog for two reasons. Firstly, believe it or not, I didn’t have a spare one lying around!

And secondly (and the real reason), I can never resist the opportunity to get out the soldering iron and build a piece of hardware.

So instead of using a mobile, I built a stand-alone gateway using an AVR microprocessor and the GPRS module found in SAGEM phones. You can see my prototype below.

AutoCarLog SMS gateway prototype.

My device was built by combining modules from previous projects. I already had a system to send Twitter updates from a pot plant (“water me please!”), so posting information to AutoCarLog — which is just a different website — should be easy.

Well it wasn’t. The Twitter example used a class built by someone else to talk to the Twitter servers and I had to create one from scratch for AutoCarLog. Also, I spent several hours wondering why my device crashed after 20 seconds, only to find it was because I missed a memory-mapping tilde (~) in one line of code.

Eventually, I got it to work. I had a system to check for new messages using the AT commands in one hour, a system to parse the message for phone and content in six hours and a system to send these messages to the AutoCarLog website in seven hours (which would have been four if it wasn’t for the tilde). I added a small LCD screen to tell me what it was doing and spent another six or so hours refining and testing the modem.

My girlfriend didn’t see me that day.

Uploading to the server

Uploading to a server is as simple as opening a website. Open up Google in your browser and do a search for something. See how the URL has now changed from www.google.com to something much bigger? You have just sent Google data (your search in this case) that is contained in the URL.

This is called a GET request.

For AutoCarLog the process would work like this:

  • Modem receives SMS message (custom hardware, but could be a standard mobile phone)
  • Modem sends message to a computer (AVR MicroProcessor for me, but this could be a desktop PC)
  • Function resolves phone number and message content
  • Function sends an HTTP request to a website with number and message encoded in URL
  • Website receives URL, decodes the message and sends to database

For example if 0413227564 sends the message “20321 b work planning meeting” to AutoCarLog, the modem would request the following URL:

/upload/?number=0413227564&message=20321%20b%20work%20planning%20meeting containing the two GET value pairs:
number = 0413227564 and
message = 20321 b work planning meeting (%20 is URL speak for a space).

My page on the server would then decode the message text and in the above example, it would add a business trip with the odometer reading 20,321 and comment “work planning meeting” to the logbook with which the number 0413227564 was registered.

Home made SMS gateway sitting on my bookshelf.

Limitations

It is worth noting that these methods will only work if you’re receiving SMS at a slower rate than you can read them, which is about one per second. However, if your business is receiving 60 messages a minute you could probably afford to go through a third party or invest in a commercial modem bank!

Final word

Building a modem sounds like a huge task, but when you break it down into smaller steps it becomes manageable. An SMS gateway is just a modem talking to a computer. A modem can be a simple mobile phone with a USB cable, or it can be a complex embedded hardware device. The trick is to tackle the smaller pieces first.

One of Anthill Magazine’s inaugural 30under30 Award winners, Sebastien Eckersley-Maslin thrives on creating smart solutions to every-day problems. For the past decade, he has spent his time balancing the demands of a full time Naval career, a Masters in Engineering and running personal businesses.

In 2009, Eckersley-Maslin returned from duty in Iraq with a drive to storm the ‘front line’ of Australian business. In 2010, he was the subject of an international documentary, where he aspired to create the world’s smallest multinational.

Get unlimited access to our FREE business tools…

Need to raise capital? Want to become a more persuasive presenter? Want to master social media? Is it time to overhaul your website? Unlock the library to get free access to free cheat sheets and business tools. Click here for free business tools.