betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

04 August 2005

GPRS Setup On PowerBook and Mobile Phone

Getting the Minimum out of the Internet

Now that I have arrived on Limnos island, my Internet access is restricted to GPRS. That's pretty bad, because GPRS is expensive, slow and expensive. It's not that bad though, because it's all I've got and at least I can get and send mails (and do some IRC/SILC chatting once in a while). I had a similar setup last year, when I spent six months on the island. So I tuned my setup to get the minimum out of the Internet...

I say "the minimum", because the target is to spend as little as possible bandwidth for the content I want. One example: If you use Apple's, you will spend a lot of bandwidth, because it downloads all mails, then decides which ones are junk, then you decide which ones you want to read. You can set it up with IMAP to only partially download large messages. But it is still incredible more chatty than my current setup.

Connection via Bluetooth

But let's start with the basic setup. My PowerBook runs Mac OS X 10.3, a more or less similar setup would work with any random Unix clone though (something like OpenBSD, Free/NetBSD, Linux, whatever). My PowerBook is connected to a Sony Ericsson P910i mobile phone, using a cheap USB bluetooth adapter. Setup was a breeze, no drivers to install at least for the bluetooth part.

GRPS to the Internet

What I had to install was a modem script for the GPRS connection, which I found from Ross' GPRS info site, the place to go for GPRS scripts for all kind of phones. From the side of the provider, I have GRPS access as an extra to my phone contract. I don't have any special plan for "free" access, since I don't need GPRS that regularly. GPRS is paid by amount of data transfered, and may I note it's pretty expensive. But on the upside, it's not paid based on connection time. So I can leave the connection up while waiting for an answer to a mail.

IMAPS and IRC problems

Some specials about GPRS connections I've encountered: Often some ports are blocked, more or less in random fashion. For example here on CosmOTE, port 993 (for secure IMAPS) does not work, which makes absolutely no sense at all, unless they want everybody to use insecure mail protocols. My answer to this was to set up my server to provide STARTTLS over the standard IMAP port 143. This way the connection starts insecure, then both sides agree to move it to encrypted mode. Another speciality that I found at CosmOTE and Vodaphone GPRS is that the auth protocol (also known as ident protocol) is blocked. Ident/auth is not really a modern, much used protocol, except for IRC, where servers use it to weed out some abusive clients. On the other hand, the IP addresses given to me for my GPRS connection do not resolve back to a hostname.

Both of these authentication failures lead to failure to connect to an IRC server. Since IRC does not work this way, I ssh tunnel port 6667 to my server and connect from there. That way both auth and reverse lookup work, and I'm a good IRC citizen. Tunneling through ssh gets my bytecount a bit up, but it's not that bad. Logging in to the server and using irssi on the ssh shell to do irc chatting eats much more bandwidth and is also much less responsive, especially for typing. For these reasons, last year, I used SILC a lot, which sports a similar interface to IRC, but works fully secure with encryption and authentification. Most of my friends aren't on SILC though, so it's more a solution for a personal chat here and there.

The Web I ain't

I don't use the Web. Or I only use it when I absolutely have to. Then I'm using lynx to get the minimum bandwidth out of my content. I'm still undecided if login to the server through ssh and using lynx from there is better or worse, bandwidth wise. Loading a large page and seeing only the first 25 lines is sure more economic, but ssh and especially curses seem to be chatty. If your phone providers GPRS plan gives you some "free" bandwidth, then using the Web via Bluetooth/GPRS may be an option, for me it isn't. From time to time I'm going into town, where I catch up in the Internet cafe. Other than that, I see myself on vacation, only interested in personal relations. And mail is really best for that.

Mail setup

My mail client is mutt. I've compiled my own setup on my PowerBook, since I want some settings that are not around in stock download binaries. For example mutt is compiled to do POP, IMAP, and SSL. I did this a while ago and back then had some trouble getting the configuration right. (Latest setting seems to be: "./configure --enable-imap --with-curses=/usr/local --with-ssl --with-included-gettext --enable-pop --enable-locales-fix --without-wc-funcs" for compiling mutt on 10.3.) I then open mutt twice, each in one Terminal window. The first one is used for mail reading/writing/replying. The second one is used to connect to my mail server, with a command like "c imap://servername".

There I mark the messages I want and save them to their respective mailboxes. Leaving one mutt connected to the IMAP inbox saves connection setup bandwidth. I have I set up as a shortcut to "imap-fetch-mail", which updates the content of the IMAP inbox. Whatever mails I don't want to read can be saved to "imap://servername/Mail/mailboxname", causing not much wasted bandwidth. In the end I download only minimal headers and the mails I really want to read. My "index format" is set up ""%4C %Z %{%b %d} %-15.15F (%4c) %s", so I can see the size of mails in bytes/kbytes. As long as I don't hit any wrong key, I won't download any mails with attached photos by mistake. Sometimes mutt hits me there: When I accidentally hit "enter" twice after typing "c imap://servername" it will open and thus download the first message, because the second "enter" is still in the type buffer. Ugly.

Dealing with SPAM

I don't want to download any SPAM, at this price I don't even want to download SPAM headers. So I weed out the SPAM on my server. I'm using bogofilter for this. And after more than a year and a half of training, it works quite good. I can spot the rare unidentified SPAM message from the subject and save it to a special mailbox on my server. There it is picked up by a cron job and bogofilter is retrained on that message. Once every something I log in from the Internet Cafe and go through all the identified SPAM messages. In 1.5 years only about 5 messages were mistakenly identified as SPAM.

The Weblog

Feeding and maintaining my Weblog is a new challenge. Posting can be done via moblog (specially formatted mails). But it has some restrictions, worst is the lag of formatting as HTML, and that I can't use the "Extend" field of the web interface (which makes the "Read more on..." links and gives a new page with the full post, allowing entries on the main page to be shorter). Moderating comments will be troublesome too, I don't know yet how I will do that. Maybe I should have set up a script to do moderation via mail (like it is done for moderated mailing lists). Also maybe I should have gotten some blog software to remote update, but I would have to examine them for chattiness.

Summing it up

With this setup my bandwidth consumption goes down a lot, to something like 12kBytes to maybe 120kBytes per session. Of course all depends on the amount of mail I get and send, so comparisons are difficult. But I am quite confident that I have removed bandwidth overhead a lot.

Posted by betabug at 14:15 | Comments (2) | Trackbacks (0)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< Ankunft auf Limnos | Main | Found on the Beach >>
Re: GPRS Setup On PowerBook and Mobile Phone


Posted by: IFEANYI NWODO at September 28,2007 17:39
Re: GPRS Setup On PowerBook and Mobile Phone

i have a wap on my phone but i want the gprs because its priceless than wap!!! how to have internet on china mobile phone

Posted by: Lambros at July 08,2009 16:16
You can trackback to:
There are no trackbacks.