Paul Makepeace ;-)

May 22, 2005

How to get internet from a hospital bed

Posted in: Injury Time, Tech

Directional Wifi AntennaSince being in hospital Saturday 14th I've had no internet connection - there is no wireless here, nor any Ethernet, nor even a crappy bedside unit. There is a bedside unit that does TV and radio, and is supposed to do 'net but it doesn't work, and besides has an awful PDA-style keypad.

For the first few days Nik ever so kindly shuttled his powerbook back and forth with my mail downloaded for offline tinkering. This worked pretty well all-in-all but obviously I couldn't use the Web or do any work. We did try to set up a dev environment but it was quite hard work and out of both our areas of knowledge.

Word got out I was banged up in hospital and Saul Albert of wirelesslondon.info rocked up with two laptops, a 12V car jumpstart battery, a directional wifi antenna, and reams of various cables.


Whole World Of Crap
A miracle the nurses tolerate this kind of "ops centre" annexation...

By this stage I'd taken up residence closer to the window for precisely the purpose of getting a wireless signal at some point. And today was the day...


Saul set up his laptop and connected it to the antenna mounted on a tripod (with rubber bands and medical tape!). Using NetStumbler to scope out the radio space:

Wireless Hunting
I can smell a Wireless!

We found a variety of nodes, some open, some encrypted. All unfortunately showed pretty weak signals ... apart from one! Down in Waterloo train station there appeared to be a commercial hotspot with a reasonable signal.

Firing up a webpage showed the usual "pay here" splash page. As it turns out only a handful of the usual internet "ports" were metered: web, mail, and SSH. Saul has SSH running on a non-standard port on his server so connected straight in. From there, I could get to my box and run my own non-standard SSH server (sshd -p 12435).

Now for the web: I needed to find a proxy to bounce all my requests through. The neat solution to this is that there's no need for additional software, simply point the browser's connection settings at another machine and all web requests go through there, very commonly on a non-Web port such as 3128 or 8080. Non-web port in this case means the hotspot isn't metering it! I.e. it's no cost to me.

Fortunately, there are collections of open proxies kept up-to-date minute-by-minute, proxies that are typically misconfigured to allow anyone to use them. These are normally a curse since they're abused by web spammers, but in my situation, a blessing. Using a text-mode browser on the SSH connection we found a few, tested their response with ping, and tried a couple. There was a very fast one in the UK that appeared to be a corporate proxy but turned out to be running quite a severe content filter (good enough to haul 30+MB of Windows Update though :-)). A couple of other usable ones in Germany and Italy we found without too much hassle and bingo, we were on the Web!

The Mozilla/Firefox Switch Proxy Tool was a great help in testing and switching between various sites.
As for mail, by the power of SSH's local port forwarding capability I now also have IMAP and SMTP tunneled direct to my server through the non-standard port. (ssh -C -N -f -p 12435 -L143:127.0.0.1:143 -L25:127.0.0.1:25. -C = compression; -N = no shell; -f = background. I've given the SSH command line but I actually did it with PuTTY.)

Since then I've at last figured out how to have Apache act as a proxy, which I'll write up since I couldn't find any copy-n-paste examples. In the meantime, here's a listing for a sample httpd-proxy.conf I wrote.

The final tweak was downloading and installing vendor drivers for the wireless card I'm using - under Windows 2000 the default wireless drivers aren't great and the connection would pop in and out every few seconds. Now it's solid.

I've moved over to my cute little tripod which is currently perched next to my bed:
Directional Wifi Antenna Side View
Bedside aerial

The next upgrade, if I'm in here long enough to warrant it, is to get the antenna by the window attached to a router rather than wired next to me which is a bit of a pain. It's not that much of a problem since I don't actually move anywhere...

Thank you Saul! (And thank you unsecured hotspot owners!)

Shameless plug of Saul's project: Imagine anyone could share wireless internet all over London: that's the vision of wirelesslondon - check it out, anyone can help.

Posted by Paul Makepeace at May 22, 2005 23:13 | TrackBack
Comments

Hi Paul,
Not looked on on the LKB site for a week or so and just saw you had been injured this morning. Hope you get well soon. Looks like a neat set up you have there in hospital. I suppose while you wait for the legs to get better you can get to grips with the rings. ;)

All the best,
Paul Corfield.

Posted by: Paul Corfield at May 23, 2005 08:15

with all that kit installed do they still insist you keep your mobile phone off? :)

Posted by: ken at May 23, 2005 10:01

Ken - the "mobile off" rule isn't applied at all as far as I can see. I think it's signs they put up to for liability or something. Medical equipment isn't susceptible; apparently it's like a 1 in a million contingency.

Example: I was right outside the CT scan room and my mobile rang. I asked a nurse if I could answer it. His reply "yeah, I'll give you a few minutes." So he interpreted my question as "could I have some privacy?" LOL!

Posted by: Paul Makepeace at May 23, 2005 10:16

HiPaul,thanks for your advice and hope it will work with me Re;the wireless internet connection.Get well soon

The nurse Mohd.

Posted by: Mohd at May 24, 2005 10:15

*sigh* to think I knew Paul before he blogged, let alone blogged in bed! ;-) Get well mate. xxx

Posted by: .M. at May 24, 2005 12:20
Post a comment









Remember personal info?