WAP Server HS – Review

In a professional capacity, I’ve been playing with WAP on and off for the last 12 months. For those people who have been shut in a dark room for the last 2 years, WAP was conceived as a low-bandwidth way for people to access the Internet via mobile devices such as mobile phones.

I think I’m safe in saying that it hasn’t exactly taken off in the way the designers planned. A year ago, it was being pushed as “the next big thing”, however it soon became apparent that the limitations of viewing Internet information on a screen not much bigger than a box of matches wasn’t what many people wanted.

Another problem with WAP is simply one of content. Okay, so you can check cinema times, or book train tickets via WAP, but I for one, sometimes wonder why you’d want to! In the last year I’ve put together a few WAP sites for clients, but as of yet, I’ve only come across one or two uses of WAP which have made me sit up and think “Yes, I’d use that”!

However, I tinker with Home Automation in my spare time – Or, as I like to called it, Home Monitoring. The difference? Simply that rather than my lights being rigged up via X10, or the curtains being drawn automatically, I tend to use a combination of X10, the HomeSeer software, and PC voice announcements over ceiling speakers to monitor the status of the house. X10 PIRs track people as they walk around the house, doors and gates are rigged up to X10 aware contact switches and incoming and outgoing telephone calls are logged (and announced using CID).

With the onset of un-metered Internet access, Cable modems, and xDSL access in the UK, the possibility at last exists to use your home PC as a way of viewing X10 information via your WAP phone from anywhere in the world.

If you have an Internet connection of some type, then you already have the ability to run a web server. Homeseer itself comes with a web server, and it’s simply a case of finding out the IP address of your PC (ipconfig with do this), and connecting to it from a browser? Bob’s your uncle, you now have web control of your X10 devices via Homeseer.

But the IP address is a problem. If you use dial-up access then the chances are that your IP address is going to change each time you connect to the Internet, and even if you use cable, you can’t guarantee that your IP address is going to stay the same forever (hence the reason for ISPs still getting away with charging an arm and a leg for a leased line connection? You’ll almost certainly get a “static” IP with one of those!). However, there is a solution to this. There are a few kind people on the net offering free Dynamic DNS, or DDNS, services. Using one of these services (www.dnsq.org for example), you always connect to your PC using a static domain name, and the DDNS will route you through to whatever IP address your PC happens to be using at the time. A very useful service considering how annoying it is typing in an IP address each time you want to connect via a WAP device!

So you’ve got a DDNS, and you’ve got a web server. You can now connect to your web server without having to worry about IP addresses – The next step is to configure your web server to talk WAP. The HomeSeer web server doesn’t handle WAP, so you’ll have to run something else. As this information is based around HomeSeer, it’s safe to assume that you’re running Windows, and although this information may be of use to people running Unix, PWS under Win-9x, or IIS under NT4, I’m going to assume you’re running IIS5 under Windows 2000.

You can run both IIS, and the HomeSeer web server at the same time by changing the default port of one of these servers. By default a web server uses port 80, but HomeSeer (and IIS) allow you to change this. By changing the HomeSeer port to 8080 (for example), and keeping IIS running on port 80, you’ll be able to connect to both from a web browser.

You then need to configure IIS to act as a WAP server. WAP servers and Web servers are basically the same, with the exception of some “MIME types” (which basically tell the server what to do with certain file types). There are standard WAP MIME types, which need to be configured in IIS:

wbmp image/vnd.wap.wbmp
wml text/vnd.wap.wml
wmlc application/vnd.wap.wmlc
wmls text/vnd.wap.wmlscript
wmlsc application/vnd.wap.wmlscriptc
wmlscript text/vnd.wap.wmlscript
ws text/vnd.wap.wmlscript
wsc application/vnd.wap.wmlscriptc

You should now be able to create a simple WML file (WML being the WAP equivalent of HTML), save it on the server, and view it from your WAP device.

WML is based on XML, and is too large a topic to go into depth here, however there are various resources on the web which will tell you about WML – A word of warning though – Just because your WAP page works in a “on-line WAP emulator” doesn’t necessary mean it will work on a real WAP device. XML/WML is extremely fussy, and the smallest misatke (sic!) will stop the page from loading.

Integrating your newly configured WAP site with HomeSeer is also quite a big task! I tend to use VBScript to write all HomeSeer events to a database, and then use ASP code on the WAP site to read the database and view the information. Unfortunately this involves quite a good knowledge of ASP, VBScript, ADO, and other “Internet technologies”. However it’s an interesting project to attempt, and one which can be achieved in small phases. I’ve recently created a web site at http://www.habitron.com/ which hopefully will point you in the right directions!

For those people interested, you can connect to my WAP “house status” site by pointing your WAP device to http://zz9.dnsq.org/wap/. If you don’t have a WAP device, but would still like to take a look around, then my home’s web site is at http://zz9.dnsq.org/ or you could use the Yahoo WAP emulator at http://uk.mobile.yahoo.com/ (follow the “WAP Browser” link).

Update – Adam now has his own website describing how to setup your own WAP server – www.habitron.com

Want More? – Follow us on Twitter, Like us on Facebook, or subscribe to our RSS feed. You can even get these news stories delivered via email, straight to your inbox every day

Be the first to comment on "WAP Server HS – Review"

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.