GPS on Maemo

Posted by Jerry Sun, Sep 30 '07

Received my Holux M-1000B Bluetooth GPS module on Friday, and have been playing around over the weekend. I bought it on an eBay store for AUD$80 last week, took some time for it to get here but it was pretty well worth the wait! Turned it on after a good recharge and brief look at the user manual (only a few relevant pages in the manual, the rest of the documentation is in PDF form on the driver CD), and fiddled with Maemo Mapper to use it for positioning.

After pairing the N800 with the GPS module it took a while to locate enough available satellites and confirm the current coordinates:


Using Microsoft’s Virtual Earth hybrid maps (Google Maps and OpenStreet is available as well) and leaving the GPS running while on Chad’s car (we were leaving the labs and I was hitching a ride home) plotted this route (red lines) on Mapper:


The positioning isn’t entirely accurate though – when left on my table for some time, as you can see the coordinates start jumping all over the place. Probably due to weather and satellite communication strength, or by the fact that using it indoors affects the line of sight. The green lines were from me searching a route from my house to the Brisbane CBD, which is another feature I haven’t played with much, but one I can foresee will be insanely useful when I’m heading down to Melbourne in December.

Also tried setting up Geoclue, a geographical information framework, and osso-gpsd. Geoclue sits on the Maemo status bar, and there’s a number of backend servers from which context data can be collected (See screenshot). Unfortunately it doesn’t feel quite finished yet… Plazes.com is a hassle to set up, Hostip doesn’t provide quite enough information, and the GPSd backend took some hacking to get working. GPSd refused to run at first, and I had to dig around for some documentation on GPS/Bluetooth support on the N800. After playing around with the “rfcomm” commands, I made some changes to libgpsbt to recognize my Holux (it does a string comparison against a hard-coded list of Bluetooth device names… horrors!), and then get it to run as normal user. Once I got that out of the way, python-gpsbt worked beautifully! I’m already chalking up plans for some future projects after this semester ends… but that’ll be a different story. :)

Overall, GPS on the N800 is pretty good, although lack of maturity is still leaving much to be desired. If the tablet’s next successor is really integrated with GPS as the FCC filings show, geographical/context-aware software could really be Nokia’s killer app. Here’s to hoping!

# Posted in 11 years ago comments
 

Backlog September '07

Posted by Jerry Wed, Sep 19 '07

Long time no blog. :P

Just did my COMS4507 Advanced Security seminar today, titled “OpenID 2.0: A Platform for User-Centric Identity Management”, which can be downloaded here on Google Docs.


It was intended to be a critique of this paper, but in the end I’ve placed more focus on introducing OpenID in general and then shifting into a critical discussion on digital identity management issues on the Web… sometime between 1am and 7am while I was hacking away on the slides trying to get it done last minute. Yes, I know, bad habit. :P All in all, turned out decent. Went overtime by 11 minutes (Marius thought it was still okay), and I think I may have explained too little on the actual authentication process. Still needs work on untangling tongues while talking. Marius thought it was a 80-90% , for sure. Woot. :)

Spending much more time (than I should) on my Nokia N800 tablet, which I decided to finally splunk down the moolah for last month (A$660 exclusive of shipping, over eBay.com.au from Hong Kong), and which awesomeness cannot be simply defined by words alone. :) I really should have written a deep down and personal review of the tablet when I first got it, but my lack of blogging habits got to me first. Perhaps sometime, soon, soon. Anyway, the hackability of this slim little device is really promising. Maemo still has its rough edges, and unlike Ubuntu, still has a huge number of usages that are quite literally begging to be implemented… but the project really suffers from a lack of an active developer community like common Linux distributions. A sneak peak into the upcoming Intel Midinux just has me idea factories churnin’... When hasn’t anyone thought of implementing gestures on Maemo yet??!

Meanwhile, still trying to get a bit more of the Telepathy stack onto Maemo, and I’m hoping to perhaps work on a port of Empathy, Tapioca or Colligo. Turns out the Glib library ported fine with minimal changes, but still having problems cross-compiling telepathy-salut / Bonjour on Scratchbox. I should pop on #maemo and ask the experts about it sometime.



The 3 loves of my (current) life – My mom is going to be disappointed that this sample does not yet include a live human of the female gender. :P

Kexin is having his interview on Friday, and it turned out his interviewed would be no one else but Nigel Tao?! What an insanely small (open-source) world we live in! :P After exchanging much exclamation marks, we decided the best plan is just to focus on his enthusiasm on GNOME, and if possible, his very short one-day experience on Deskbar... Possible? The odds are rapidly growing. G’luck, anyway. :)

Tutoring is going well, and I’ve decided that actually being appointed for both courses which I’ve applied in the first place is quite definitely the best accidental choice I’ve made in my university years. Am currently thinking of continuing to tutor for another semester after my graduation, just so I can see the CSSE3005 guys pull through. May I dare wish for another Tutor Award again this time?

Anyway, mid-semester break coming up soon. Will be working on thesis full-time, with Advanced Security project on sidelines ('wireless penetration testing toolkit’ on Maemo). Much work to be done. Sigh, the life of a soon-to-graduate honours student.

# Posted in 11 years ago comments
 

Three Things I Learned about Software in University

Posted by Jerry Sat, Jun 30 '07

Spotted this on Reddit (many insightful and funny comments I’d relate to), so I thought I’ll hop in and make up a list. :) Not officially graduated yet, and don’t have enough experience in work or hobby programming to make up a “While not in college” list, so here’s my take on just the three things I learned about software in university:

  • On programming: Code flows out better at the time period between 3am and 7am in the morning. Bugs are solved better at the time period between 8am and 12am in the morning (after a good nap and caffeine beverage).
  • On code quality: Time and effort spent notwithstanding, there is always A Bug in the code. There are no exceptions, period. (Or more commonly put, “Bugs are a fact of life.”)
  • On peers: As a twist on the old joke – there are 10 types of people in the IT faculty. Those who “get it”, and those who don’t. And never will, or simply do not care enough to do so. Way over-quoted, but really very bluntly mirrors the kind of people you meet.
# Posted in 11 years ago comments
 

Random thoughts on Comet

Posted by Jerry Fri, Jun 29 '07

Went down to Gold Coast with Chad and Zee today to see a client – a car sales agency, as a matter of fact. Young, chinese guy, smartly dressed. He had some pretty clear, not exactly in depth, but straight to the point requirements: See this (future rival) car auction website here, with its real-time bidding features? Now, build me one. In PHP, chop chop.

Ok, I kid… not quite the exact words, but you get the gist. Logically, I should comment on said rival website a bit. It boasts a pretty sound design: access the bidding page, and it loads a Java applet seamlessly, draws a simple textbox and a Big Red Button ('Bid’), rotating carousel of car photos, and generic auction details. Bids show up in textbox while they occur, it is linked to offline auctioning as well, and you click on the Big Red Button to add $200 to current going price. I’m guessing notifications are done either with sockets or dispatching HTTP calls, but judging by the speed of activity updates at times I’m betting sockets. I forgot to check what language the server would be on. I’m guessing PHP. So, let’s reverse figure out the design:

Applet (on the client’s Java VM) creates socket, server maintains an in-memory collections of connected ('subscribed’) clients, sends data stream down socket, applet read()'s, updates.

Not too complicated, but in the age of APIs, Rails-killer frameworks and Web-2.0-ness, perhaps dwelling a little too low-level on the client side. Still understandable, I suppose even though everyone thinks applet’s are sooo 1995, there’s still a certain supply and demand chain of Web 1.0 developers going on. Second mistake: no mention that the page uses Java – the client casually but specifically mentions the fact that he ingeniously figured out it needed the JVM. That’s one point off portability, and another off usability – and no, while Java is inherently cross-platform, the browser plugins are horrible on lower-end machines. Why else did the applets trend blow over and people migrate to Web Start? (See Wikipedia’s take)

Now this is where Comet (wiki) seems to fit perfectly. So it was quoth:

Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. It allows creation of event-driven web applications which are hosted in the browser.

To explain further, instead of the “pull” paradigm in traditional HTTP apps where you query the server for a response, the server keeps clients updated by somehow “push“ing notifications of events to clients. (Some wavy hand motions through the air usually help to speed up comprehension.) Think Meebo and chat on Gmail. Recommended reading: HTTP streaming, push technology. Ok, perfect. Now implementing is the hard part, because simply reading a bunch of articles on Ajaxian last year doesn’t count, so some research is in place…

To tally current implementations,

  • Wikipedia lists several commercial and non-commercial Comet engines. There is the open source Cometd, and a number of articles that cover the iframe/javascript method.
  • Dojo seems to be the prominent Javascript library for Comet, but I suppose basic Javascript + any Ajax library would do.
  • One notification-based implementation is in PHP, but it really just is a socket-server-client prototype.
  • Most immediately-available (?) engines either directly implement the server (as a HTTP daemon or middleware app – I spot ICE!) itself, use J2EE, or a second medium for managing communications (e.g. Flash).

Now, the problems,

  • The client insists on PHP (which, none of the three of us have mastered).
  • I believe he uses shared hosting, on Apache.
  • Note that there doesn’t seem to be any directly pluggable libraries like the J2EE WARs to support Bayeux...
  • And since installing custom Apache modules to extend and implement efficient streaming is likely out of the question…
  • And Comet may require certain implementation shifts on the server side to work properly (e.g. not closing HTTP sockets prematurely)...
  • And from the Cometd mailing lists and other Googled sites, Apache (or at least, the fork version; I’m not sure if this is what his hoster uses) seems to be notoriously bad in terms of scaling. Keeping 1000’s of persistant connections open = need high efficiency.
  • And finally, though it’s none of my business, I do worry about his quota and server hoster… Don’t they used to ban high-traffic generating software like CGI chat?

Hmm, dai pinch? Quick ideas,

  • Scrap Comet. Poll server with Ajax calls every x seconds (where x is between 0.1 and 1).
  • Scrap performance. Just use the iframe/javascript method, and explicitly tell the client not to leave their browser for prolonged periods.
  • Scrap high-level stuff. Implement PHP sockets with PEAR library, and optionally use Java on client-side. Unlikely to work on shared hosting, isn’t it?
  • We haven’t asked for more in-depth details. Ask if possible to use mod_jvm. Highly unlikely though.
  • Scrap PHP. Move the whole darn site to Ruby on Rails! (We were joking over the RailsEnvy videos after the meetup)
# Posted in 11 years ago comments
 

Maemo + GPS

Posted by Jerry Sat, Apr 14 '07

Was thinking about possible uses for the Nokia N800 Linux tablet recently, and had a short discussion with my cousin on utilizing Google Maps on it to compensate for lack of built-in GPS. We exchanged ideas on how it would work as a vehicle GPS system purely via WiFi… maybe overlaying a speech synthesis system (screen scraping + Festival would work) onto the Google Maps direction, and use the stylus to update the vehicle’s position on the map? (Could be done every few traffic stops or by a second passenger… but I imagine it would be a pain to use) And not to mention the lack of Wifi coverage in non-urban areas… Looks like it would still be better off if packaged with a GPS module.

And then what about software support? Neither the N800 nor the OpenMoko Neo1973, which does have GPS, are sold here, so they probably don’t have map software for this region. There are GPS software for Symbian, but it’s… well, Symbian. ;) I’ve been wondering if there’d be popular GPS devices on the Australian market use Linux… looks like TomTom does! Now I’m left wondering when we’ll see some Maemo/TomTom love anytime soon… :)

# Posted in 11 years ago comments