The Mobile Web

As detailed elsewhere I have found my Nokia 7250i’s XHTML browser to be singularly crap because of memory limitations. As part of my attempts to make this phone more useful I have written a web page shrinker that allows you to enter a URL and get a stripped-down version of that page’s contents.

As the dominate web use mode is to search first on google the program also has the ability to shrink google searches.

Both entry points support link rewriting so any link in the pages is rewritten to point back at a shrunken version of the page being linked to (basically you never visit anything apart from my servlet – it goes and grabs pages and shrinks them as required).

The shrinking and rewriting are fairly brittle. There is a lot of nonconformant and just plain weird HTML out there and I have not done much work on coping with boundary cases but enough pages should shrink to make the app useful. If you find a page that doesn’t work or have any other kind of bug report/feature request put in in the comments or feel free to mail me at bakert+mobileweb@gmail.com.

The URLs for your phone are (stick them in bookmarks):

URL entry: http://bluebones.net/miniweb/?cmd=url

Google search: http://bluebones.net/miniweb/

The Google search uses the brilliant Google Search API.

CSS, Content-Type For RSS

I have updated my RSS feed to use the W3C’s CSS file for RSS (which you can see in action at W3C News Syndication).

I have also fixed a minor problem I was having. Internet Explorer would not display my RSS feed. It was because I had not set a MIME type. A quick bit of Response.ContentType = "text/xml" later an voila a browser-readable RSS feed. I wanted to use application/rss+xml as previously recommended at Dive Into Mark (now using Atom) and seen until recently in my <link> tag but this causes browsers to pop up a download box rather than render the XML. Because of this I have also updated my link tag that refers to my RSS feed to <link rel="alternate" type="text/xml" title="RSS" href="http://bluebones.net/rss.asp" />.

You can view the ASP source to my feed.

Network Client Assigned 169.154 Address

Just spent half an hour fixing this one. My laptop was assigned a 169.154.*.* address and I could not ping even my gateway server via IP. I checked the network cable and lights on the hub and the docking station, changed the cable and used the built-in network card on the laptop itself. I tried a whois on the strange IP I was getting assigned:

NetRange:   169.254.0.0 - 169.254.255.255 
CIDR:       169.254.0.0/16 
NetName:    LINKLOCAL
NetHandle:  NET-169-254-0-0-1
Parent:     NET-169-0-0-0-0
NetType:    IANA Special Use
NameServer: BLACKHOLE-1.IANA.ORG
NameServer: BLACKHOLE-2.IANA.ORG
Comment:    Please see RFC 3330 for additional information.
RegDate:    1998-01-27
Updated:    2002-10-14

RFC 3330 has the following to say:

169.254.0.0/16 - This is the "link local" block.  It is allocated for
   communication between hosts on a single link.  Hosts obtain these
   addresses by auto-configuration, such as when a DHCP server may not
   be found.

After trying various registry fixes I realised the awful truth: my DHCP server’s network cabled was unplugged!

Streetmap for Mobiles

I have been disappointed with the capabilities of my Nokia 7250i’s XHTML browser. Although it can theoretically load almost any web page in practice virtually all web pages are too big for its miniscule memory and result in an error.

One site that I wish I had remote access to is streetmap (specifically the London street search). But even trying to load one GIF (no HTML) from the resultant map gives the error, “Not enough memory”.

Rather than be defeated, however, I have written a Java servlet that does searches on streetmap, screen scrapes the central GIF (the one with the road you searched for on), resizes it (actually I make it slightly bigger) and reencodes it as a JPEG. For some reason the phone seems better able to cope with JPEGs than GIFs at the size we are talking about (15-20KB). You can access the service via a browser (phone or computer based but not WAP) at http://bluebones.net:8080/map/. (Sadly I am having to run Tomcat on port 8080 at the moment so this won’t work behind some firewalls – if anyone knows how I can run IIS and Tomcat on port 80 simultaneously please drop me a line (address below).) You need to Zoom the image once you receive for street names to be legible.

I really need to drop the colour depth on the image when resizing to reduce its weight (streetmap images come at 256 colours but look fine at 16) and thus the cost of using this (plus increase the loading speed). I also need to add in links for North, South, East and West because the map is much less useful if your road happens to be near the edge (with the streetmap website you get the eight surrounding squares as well as the one with your road in it). Of course by the time you read this I might have made these changes.

If you use this service and have any comments/requests please send them to bakert+streetmap@gmail.com.