GeoCachers: WAP cache lookups

Posted by: mlord

GeoCachers: WAP cache lookups - 05/11/2003 22:02

This is stricly for GPSr lugging geocaching fanatics, of which there are a few on this BBS.

I recently upgraded my ancient Sony first-generation CDMA/AMPS telephone to a slightly newer AudioVox-8300, which has WAP capability (for "surfing the wireless web"). So.. first thing I've done, is code a CGI script on my webserver to allow me to do cache page lookups from the field.

You see, when I travel, I usually load my GPSr with waypoints for most caches in the area I plan to visit (I have another script to do that for me), but I don't always have the cache descriptions with me. Many caches which are marked as "traditiional" (simple walk ins) are actually more complex than that, and may be difficult or impossible to visit without the detailed cache instructions..

So now, in theory, I can lookup such cache pages using just my mobile telephone. And so can you!

http://rtr.ca/GCxxxx -- just replace the GCxxxx part with the geocaching.com waypoint label for the cache in question -- upper/lowercase don't matter.

Let me know if it crashes your phone, or otherwise does something weird. One thing I know about, is that it reformats the cache page (text only, btw.) to fit within a single "page" (or "deck") sent to your phone in one burst. To do this, it first tries to find out how large of a buffer your phone reports to it. It does NOT currently implement paging to break up a very large page into multiple smaller ones of acceptable size. I may add that in the future.

And now, someone will point out at least two other sites that already have this, right?

Cheers
Posted by: visuvius

Re: GeoCachers: WAP cache lookups - 06/11/2003 01:18

WHOA. That is awesome. You've just made this so much more convenient. The page loaded quicly on my phone and all the info was there -- very nice.

So, no matter how long the page is on the actual geocaching website, it still displays as one long screen on the phone?



Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 07:24

So, no matter how long the page is on the actual geocaching website, it still displays as one long screen on the phone?
Yes, for now. Except that some of the the long description may get chopped off (replaced with ... if the page is too big for your phone. The web script tries to keep the uncompiled WML (webpage) within the max size reported by your phone.

But I notice in the logs that it did not correctly figure out the size allowed by your SprintPCS Samsung phone, so it likely defaulted to 1397 bytes max. Since your phone reports 64KB max, I'll fix that today.

Cheers (and thanks for trying it out!)
Posted by: russmeister

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:11

Mark, very nice job!!! It seems that you have it set to download everything up to the hint(already decoded) and to stop there. Very nice work. My phone (Sony-Ericsson T616) seems to handle it well and it loads quickly.

I'll test it on Saturday. Meatballman, his wife, and I are going to hit a few caches in a park that he and I visited last weekend. We didn't get to all of them (there are 11 in one park I believe) so we are heading over that way this weekend.

I probably won't need it much this weekend b/c I already have all the waypoints entered and the pages printed but this will come in very handy down the road.

Thanks again!!
Posted by: loren

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:13

Sweeeet!!! Now i can just dump the waypoints to the GPS and not have to print out 10 pages when we want to go caching! Thanks Mark. Really cool.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:21

Good! I am gradually building up a small database of telephone types every time a new one connects, and the script is evolving to match as needed.

There is also now a TravelBug lookup by tag number. Again, upper/lower case don't matter on the URL.

http://rtr.ca/TAGnnnnnn

That's a feature I have needed for some time now, useful when finding a bug unexpectedly in a cache, and wondering whether to take it or not. Knowing the bug's goals/destination comes in handy in such situations.

Meanwhile, I have emailed the geocaching.com site gods to seek permission to make this functionality available to others (anyone other than me). I don't know whether they'll say yes or no, so keep it in the family for now, please!

Cheers
Posted by: andy

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:33

Didn't work when I tried it from my Ericsson T39m. It said there was something wrong with the page, which I think sometimes mean it found HTML when it was expecting WML.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:46

Hi Andy.. try again once more please --> I've set it up to log everything so I can see what might be wrong.

Thanks!
Posted by: andy

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:50

Just tried again.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 12:57

Thanks. Your phone is requesting "compiled" WML rather than the original "source" text.. My scripts don't support that (yet). But I've just hacked them to return the WML source regardless.. Try it one more time and let me know what happens now.

Thanks!
Posted by: JBjorgen

Re: GeoCachers: WAP cache lookups - 06/11/2003 13:16

Mark...I hate to encourage feature creep, but how bout a way to send a lat/long ie...

rtr.ca/latN3422930longW08004760

and have it return nearby waypoints like:

GCH2A3
GCB436
GCB7D0

This would enable one to go caching at a moments notice. One could query the nearby caches and then query each individual waypoint to get the info.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 14:17

Hi,

I plan to perhaps add some scripting capability to run on the handset to allow convenient entry of coords from the field. But later..

Cheers
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 14:26

Okay, I fixed it.

The webserver now compiles the WML into WMLC form before returning it, if the phone supports it of course (like yours does).

Cheers
Posted by: JBjorgen

Re: GeoCachers: WAP cache lookups - 06/11/2003 16:16

I plan to perhaps add some scripting capability to run on the handset to allow convenient entry of coords from the field. But later..


Sounds good to me.

/me walks away thankful for what IS available.
Posted by: foxtrot_xray

Re: GeoCachers: WAP cache lookups - 06/11/2003 16:29

That is effin' sweet. I can't use it - I only have a Palm and my GPS unit, but if I ever get something that supports that technology, I can see myself loading in benchmarks (does it work for benchmarks, too? -- I got for the 'harder' caches around the coutry. Muhaha.) and going off in search for a few.

Me.
Posted by: andy

Re: GeoCachers: WAP cache lookups - 06/11/2003 16:31

I am now getting the message:

"Your request for a service could not be fulfilled. Please try again or contact your operator if the problem persists."

Not sure whether that is being generated by your site, or Orange's WAP gateway or somewhere else.
Posted by: jbradshw

Re: GeoCachers: WAP cache lookups - 06/11/2003 18:33

Seemed to work for me though I only got a description of the cache and no coordinates.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 20:56

> I only got a description of the cache and no coordinates.

Yup, that's the idea for now. I usually have all the waypoints for an area pre-loaded on my GPS unit, and just need access to the descriptions when actually hunting -- so that's what I've implemented first. More is planned..

And I just got this reply from geocaching.com on the subject:
Hi Mark

Thanks for your email. We are currently working on a WAP section on the
site to replace the one we had a couple of months ago at
http://www.geocaching.com/wap . Good luck in your further education
programming pages for your cellphone.

Please let me know if you have any further questions or concerns.

Happy Geocaching!

Nate

Cheers
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 06/11/2003 21:57

I am now getting the message:

"Your request for a service could not be fulfilled. Please try again or contact your operator if the problem persists."

Not sure whether that is being generated by your site, or Orange's WAP gateway or somewhere else.
Mmm.. my logs show that a compiled wmlc file was passed back to your gateway. But I have since found a bug in the code that causes a miscalculation of max bytecount. Shouldn't have mattered much in this case, but..

???? any difference now?

Thanks
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 07/11/2003 14:34

Before heading off to eat Kenmore's dust in the Gatineau today,
I did manage to add a front page menu to the wireless web geocaching
site that I am working up. Now one can "bookmark it" on the phone
to avoid having to renter the address each time.

The new front-end is here: http://rtr.ca/geo

Currently, the menu prompts for either a Cache number
or a Travel Bug tag number for lookups.

More features coming soon.. feel free to suggest improvements.

Cheers!
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 07/11/2003 20:22

OOoopppsss.. drat. I just discovered it has been broken for the past 4-5 hours. Fixed now, but it works only on phones that accept non-compiled .wml (nearly all WAP phones except Andy's).

Cheers
Posted by: andy

Re: GeoCachers: WAP cache lookups - 08/11/2003 03:35

My phone definitely accepts non-compiled WML, as I have a simple WML page that I host on my server to use as a home page on my phone. My WML is complete dumb, it doesn't try to work out what the phone is, just sends it:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
<card id="normancx" title="norman.cx">
<p>
<a href="http://orange.multimedia/" title="orange">Orange home</a>
<a href="http://mobile.msn.com/" title="google">MSN</a>
<a href="http://wap.google.com/" title="google">Google</a>
<a href="http://wap.maporama.com/" title="maporama">maporama</a>
<a href="http://rail.kizoom.co.uk/" title="kizoom">kizoom</a>
<br/>
08/11/2003 09:34:20
</p>
</card>
</wml>

Which is probably against all the WML specs, but I only spent a couple of hours getting it working and it works on the Nokia and Ericsson phones I own.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 08/11/2003 07:08

Your WAP gateway is sending my server this line:
HTTP_ACCEPT=text/x-vcard, application/vnd.wap.wmlscriptc, text/x-vcalendar, */*,

application/vnd.wap.wbxml, application/vnd.wap.wmlc, text/x-vmel
Also, your phone itself reports this:
                                

<prf:BrowserName>Ericsson</prf:BrowserName>
<prf:CcppAccept>
<rdf:Bag>
<rdf:li>application/vnd.wap.wmlc</rdf:li>
<rdf:li>application/vnd.wap.wbxml</rdf:li>
<rdf:li>application/vnd.wap.wmlscriptc</rdf:li>
<rdf:li>application/vnd.wap.multipart.mixed</rdf:li>
<rdf:li>text/x-vCard</rdf:li>
<rdf:li>text/x-vCalendar</rdf:li>
<rdf:li>text/x-vMel</rdf:li>
<rdf:li>text/x-eMelody</rdf:li>
<rdf:li>image/vnd.wap.wbmp</rdf:li>
<rdf:li>image/gif</rdf:li>
<rdf:li>application/vnd.wap.wtls-ca-certificate</rdf:li>
<rdf:li>application/vnd.wap.sic</rdf:li>
<rdf:li>application/vnd.wap.slc</rdf:li>
<rdf:li>application/vnd.wap.coc</rdf:li>
<rdf:li>application/vnd.wap.sia</rdf:li>
</rdf:Bag>
</prf:CcppAccept>
No mention of text/vnd.wap.wml compatibility there. Buggy gateway, I suppose, or perhaps the gateway automatically compiles WML on your handset's behalf. Or maybe your phone doesn't like the compiler I'm using If you can flush your browser's cache (on the handset) and try one more time to verify now, I'd appreciate it (I have made some changes). If it still doesn't work, I'll hack the site to always return WML to your type of phone.
Also, the top menu should now be working for you http://rtr.ca/geo since that is entirely wml regardless of who requests it.

Cheers
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 10/11/2003 15:56

Hi all,

I spent much of the weekend doing "paperless" cache hunting,
using my cell phone to do lookups instead.

Worked great!

I went 10/10 for the weekend, including some virtuals and a D5 cache.
And I think this may even be cheaper (for me, at 2-cents/cache) than printing them out!

New on the menu now is a "Find Caches.." entry, which allows lookup
of caches either near a known GCXXXX waypoint, or by direct entry of
Lat/Lon coordinates.

Planned features:
1. access to cache log entries.
2. (maybe) the ability to log a "find" from the field.

If you have a modern cellphone with "wireless web" capability,
then you can use it to access Cache/Bug pages at: http://rtr.ca/geo

Cheers
Posted by: mlord

GeoCaching Portal updated: Nokia friendly now - 12/11/2003 11:08

Today I completed some updates to the WAP GeoCaching Portal to make it viewable/usable on Nokia handsets. I hadn't realized before just how ugly the "browser" is on those, so the site now presents itself differently to make it usable on handsets which lack the OpenWave browser (used by almost everyone except Nokia).
     http://rtr.ca/geo

Feedback (for any handset type) would be appreciated.

Cheers
Posted by: rjf

Re: GeoCaching Portal updated: Nokia friendly now - 20/11/2003 22:28

Mark, I tried the geo link with my Motorola T70 and I get a:

1019: compile error

Let me know if you need any other info.

Thanks,
rjf&
Posted by: mlord

Re: GeoCaching Portal updated: Nokia friendly now - 20/11/2003 22:45

Does it work better now? (you may need to flush the cache on your phone first).

I just fixed a problem whereby it was sending too large of a page for the top menu to some phones.

Cheers
Posted by: mlord

Re: GeoCaching Portal updated: Nokia friendly now - 20/11/2003 22:49

I've also added several new features over the past couple of days, including multi-page responses, most recent log entries, lookups by ownerid, zip-code, and postal-code, etc.

All of this seems to have spurred the geocaching.com gods into implementing their own version at last, but it's clumsier on my phone (they're doing one size fits all, rather than customizing the pages for the type of browser).

Cheers
Posted by: rjf

Re: GeoCaching Portal updated: Nokia friendly now - 20/11/2003 22:58

After resetting the memory via the OpenWave advanced menu and trying again, I still get the 1019: compile error

rjf&
Posted by: mlord

Re: GeoCaching Portal updated: Nokia friendly now - 21/11/2003 00:06

Thanks.

Fixed (for real) this time!

Cheers
Posted by: rjf

Re: GeoCaching Portal updated: Nokia friendly now - 21/11/2003 19:46


Dude, that kicks so much A*S I can't even say. You just changed my geocaching life forever.

I am wondering, are you willing to make the source to this available? I will be doing a WAP front end for my irc/email bot, and would love anykind of example to start with.

Thanks so much Mark!
rjf&
Posted by: mlord

Re: GeoCaching Portal updated: Nokia friendly now - 21/11/2003 20:54

Sure.

You can fetch the source for the top level menus under Linux with:

wget http://rtr.ca/geo/gen0.wml
wget http://rtr.ca/geo/ow0.wml

There are two versions, one "generic" for Nokia style browsers, and one for OpenWave browsers.

The rest of the "site" is simply a huge AWK script, that generates WML or HTML on the fly in response to queries from the top level scripts above.

The source for THAT is attached, since the security on my server won't normally permit a download of it.

All of this won't run on it's own as is, because I also use Apache's "rewrite" facility to redirect everything for /geo to /geo/geo.cgi

Cheers
Posted by: mlord

Re: GeoCaching Portal updated: Nokia friendly now - 21/11/2003 20:58

And while we're on the subject, anyone who has not already learned to use AWK should really consider it. Much simpler than Perl, but capable of doing just about anything, and a very very C-like syntax.

Cheers
Posted by: julf

Re: GeoCaching Portal updated: Nokia friendly now - 24/11/2003 13:36

Hear, hear! Awk is one of the unappreciated greats!
Posted by: drakino

Re: GeoCachers: WAP cache lookups - 24/11/2003 16:05

Just tried this out from my Sony Ericsson T610, and it is working well. One thing that you might want to reword is the error that comes up if a user tries to access a subscription only cache. The first one in the 80922 search (GCH2Q8) gives a not found error.
Posted by: mlord

Re: GeoCachers: WAP cache lookups - 24/11/2003 16:48

OOoohhh! Good one! I didn't know any of the restricted cache waypoints to test it with. Fixed now.

Cheers
Posted by: JBjorgen

Re: GeoCachers: WAP cache lookups - 25/11/2003 09:35

Just wanted to let you know it tested successfully with a Sony Ericsson T226. (At least the home page...need to try it in the field...perhaps this weekend)
Posted by: mlord

WAP cache lookups, with LOGIN !! - 25/11/2003 11:10

Well, I just updated everything, and most likely broke non OpenWave browsers (dunno, don't have a Nokia to test with, and the simulator I use is broken).

The site now accepts a Login (optional), so that it can "filter finds" when doing searches at geocaching.com. Your userid/passwd are NOT saved anywhere on my machine for this -- they just get passed to the main geocaching site, which gives us back a cookie, which my site then gives to your phone.

I'm curious if/how this works for people, especially on Nokia browsers.

Cheers
Posted by: russmeister

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 12:24

I just tried it and received a "login succeeded" message and then proceeded to press RETURN and got this message:

"The entered address is invalid. Please retype and try again."

Using Sony Ericsson T616, Cingular service.
Posted by: mlord

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 12:35

How peculiar!

Maybe the flakey compiler I'm using messes up that specific WML -- so I've just now fixed it to simply send the WML source (instead of compiled WMLC) for those responses. Works in my simulator, how about your phone?

You will likely have to restart the browser and/or flush it's cache first. I haven't yet figured out what "cache control" info I need to add to the pages.

Cheers
Posted by: ricin

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 12:48

Like this?
Posted by: russmeister

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 13:46

After choosing return, I now get:

500:Web service problem: Please contact the service provider.

Oh, and I did flush the cache and restart the browser.
Posted by: mlord

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 14:23

MMm.. Okay, I've mucked with it some more. One of my simulators was objecting to card names with space (quite reasonably, I suppose), and perhaps that was the issue with your handset as well. Fixed?

And thanks for helping me tweak this thing out!

Cheers
Posted by: mlord

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 14:24

Yeah, exactly.

Cache-control stuff now added.

Cheers
Posted by: russmeister

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 14:36

That's happy.

I'm assuming that you are "filtering finds" by what we have found and only showing those we have not hit yet? That's what it appears to be. And if I'm wrong, correct me, or if there's more filtering going on that I'm not seeing, please advise.

Thanks for the hard work, Mark. It's great to have this readily available.
Posted by: russmeister

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 14:44

I hate to encourage feature creep here, but do you think you can store certain search criteria? i.e. I may want to search by a zipcode and it can be a local one that I use often b/c there are multiple caches in the area that I spontaneously decide to venture out after. Or there's a TB I want to check up on but I can't remember the number right off hand...

Possible?
Posted by: JBjorgen

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 14:52

You should be able to do that with favorites. At least the travel bug. I'd imagine there's a way to do it with zip codes too.
Posted by: russmeister

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 14:59

Ah, yes. I don't know why that slipped my mind.

I'll think before I request next time.
Posted by: mlord

Re: WAP cache lookups, with LOGIN !! - 25/11/2003 15:20

Well, actually, my site is NOT doing any filtering.. it's just passing the userid cookie and "&f=1" to geocaching.com, and they are doing their normal "Filter Finds" (as per link on your MY CACHE PAGE). This filters out all caches you have logged a FIND on, as well as all caches you OWN. Archived caches are also filtered out, but not "disabled" caches.

You can bookmark (or "favourites") any page you pull up, but I may also add "search from home coords" just like on the main geocaching HTML site.

But first I want to be able to log a cache find from the field! Should be easy now that logins are mostly working -- that was tricky to figure out.

Cheers
Posted by: SE_Sport_Driver

Re: GeoCachers: WAP cache lookups - 17/05/2005 19:35

Quote:
The new front-end is here: http://rtr.ca/geo

Currently, the menu prompts for either a Cache number
or a Travel Bug tag number for lookups.

More features coming soon.. feel free to suggest improvements.

Cheers!


Very cool! I checked out the geocaching.com one as well, and yours is much cleaner. I was getting such a kick out of it last night, and I don't even have my GPSr yet!