1
WWW.SPECTRUM.IEEE.ORG Hacking the Nokia N800 This handheld costs a tenth as much as an equally powerful desktop 10 years ago A lot can happen in a decade. You can hold the Nokia N800 in your hand, yet it’s a near-exact match for a high-end desktop PC from 10 years ago. It has a 320-megahertz processor, 128 megabytes of RAM, and a few gigabytes of available mass storage. Although its screen displays only 800 by 480 pixels instead of 800 by 600, it’s a touch screen, and the machine comes with IEEE 802.11g wireless-networking capability, which wasn’t available in 1998 at any price. It’s not the only pocket computer with such specs by any means, but it sure makes a good test bed for thinking about life 10 years hence, when PCs may well be printed on shirtsleeves. If the N800 were a PDA, it would have a calendar/contact/ to-do manager built in. It doesn’t. If it were a smart phone, it would connect to cellular networks. It doesn’t. Instead, you can wirelessly connect to Web-based versions of these tools. Or you can hack together your own programs. Since the N800’s predecessor was released two years ago, a community of thousands of hackers has grown up around it. We converge at Maemo.org, the Web site Nokia set up to support us. More than 300 open-source software projects are hosted there, with uncounted others elsewhere. And the N800’s Linux-based foundation means that yet other masses of software—pretty much anything that doesn’t need a graph- ical interface—can run unaltered. I start with the basics— a calendar program—by down- loading GPE, a suite that runs on pretty much any Linux box. However, synchronization to my Macintosh isn’t really ready for prime time. There’s a program (gpesyncd) you can run from a terminal window that will accept the vCal format the Mac uses and stuff items into the local data- base, but that’s about it. The developers promise they’ll get around to full sync eventually. In the meantime, I could log into the N800 from my Mac, fire up gpesyncd, and paste each event into the terminal window by hand. But that would be too simple, and it would work for me only at my desk. Instead, I glue together a bunch of disparate tools: I’ll e-mail events to the gizmo and sync from there. On the Mac side, that’s easy: I simply mail the event to an address that only the N800 will ever read. For the N800, I start with a special filter rule for the mail software to recognize an incoming calendar message and send its text to a program (as yet unwritten) that will, in turn, call gpesyncd. Here’s where I learn how to write a little code in Python: first, I play around on the Mac and figure out the most concise way to extract the data. Then I shift over to IPython, a nice interactive Python development environment that runs on the N800, to code up the part that will talk to gpesyncd. In short order, I have two terminal windows open from the Mac to the N800: one to play with code fragments and another to monitor interprocess activity and kill stuck processes when necessary. Not too long after that, I have working code—and the good sense to stop. My information goes a dozen hops on the Internet from my Macintosh to some mail servers out of state, then another dozen hops back to my gizmo. It’s inefficient, but I don’t care. Both computers have CPU cycles and bandwidth to spare, I’ve spent a few enjoyable evenings hacking, and I have a solution now instead of months from now. The mere fact that a tyro like me can cobble a solution together out of existing tools also gives me a glimpse of what the world might be like when pretty much any computer visible to the naked eye can be pro- grammed (for better or worse) by ordinary users. —Paul Wallich SOFTWARE USED ON THE MAC: • Emacs • Firefox • Python 2.5 • Thunderbird • IPython • iCal ON THE N800: • Claws-mail • JOE (Joe’s Own Editor) • Python 2.5 • gpesyncd to-gpe.py • IPython • GPE Calendar • Bash SMALL? SURE, but the point is that the N800 is a full-blooded computer that a bona fide amateur can reasonably hope to program. PHOTO: SHAYNE LYNN Mini- Profile By Susan Karlin MIKE DAISEY: ONE-MAN SHOW Mike Daisey’s “Monopoly!” may be the only nightclub act ever to center on the relative merits of alternating and direct current. In his monologue, Daisey describes the eccentric genius Nikola Tesla and his part in the feud with Thomas Edison over the two forms of electricity. In the process he explores corporate rule, life according to the dictates of profit and loss, the Microsoft antitrust lawsuit, Wal-Mart’s impact on Daisey’s hometown, and the secret history of the board game Monopoly. For more, see http://www. mikedaisey.com. APRIL 2008 IEEE SPECTRUM NA 25 PETER DYLAN O’CONNOR

Tools & toys: Hacking the Nokia N800

  • Upload
    paul

  • View
    214

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Tools & toys: Hacking the Nokia N800

www.spectrum.ieee.org

Hacking the Nokia N800

this handheld costs a tenth as much as an equally powerful desktop 10 years ago

A lot can happen in a decade. You can hold the Nokia N800 in your hand, yet it’s

a near-exact match for a high-end desktop PC from 10 years ago. It has a 320-megahertz processor, 128 megabytes of RAM, and a few gigabytes of available mass storage. Although its screen displays only 800 by 480 pixels instead of 800 by 600, it’s a touch screen, and the machine comes with IEEE 802.11g wireless-networking capability, which wasn’t available in 1998 at any price. It’s not the only pocket computer with such specs by any means, but it sure makes a good test bed for thinking about life 10 years hence, when PCs may well be printed on shirtsleeves.

If the N800 were a PDA, it would have a calendar/contact/to-do manager built in. It doesn’t. If it were a smart phone, it would connect to cellular networks. It doesn’t. Instead, you can wirelessly connect to Web-based versions of these tools. Or you can hack together your own programs.

Since the N800’s predecessor was released two years ago, a community of thousands of hackers has grown up around it. We converge at Maemo.org, the Web site Nokia set up to support us. More than 300 open-source software projects are hosted there,

with uncounted others elsewhere. And the N800’s Linux-based foundation means that yet other masses of software—pretty much anything that doesn’t need a graph-ical interface—can run unaltered.

I start with the basics—a calendar program—by down-loading GPE, a suite that runs on pretty much any Linux box. However, synchronization to my Macintosh isn’t really ready for prime time. There’s a program (gpesyncd) you can run from a terminal window that will accept the vCal format the Mac uses and stuff items into the local data-base, but that’s about it. The developers promise they’ll get around to full sync eventually.

In the meantime, I could log into the N800 from my Mac, fire up gpesyncd, and paste each event into the terminal window by hand. But that would be too simple, and it would work for me only at my desk. Instead, I glue together a bunch of disparate tools: I’ll e-mail events to the gizmo and sync from there.

On the Mac side, that’s easy: I simply mail the event to an address that only the N800 will ever read. For the N800, I start with a special filter rule for the mail software to recognize an incoming calendar message and send its text to a program (as yet unwritten) that will, in turn,

call gpesyncd. Here’s where I learn how to write a little code in Python: first, I play around on the Mac and figure out the most concise way to extract the data. Then I shift over to IPython, a nice interactive Python development environment that runs on the N800, to code up the part that will talk to gpesyncd.

In short order, I have two terminal windows open from the Mac to the N800: one to play with code fragments and another to monitor interprocess activity and kill stuck processes when necessary.

Not too long after that, I have working code—and the good sense to stop. My information goes a dozen hops on the Internet from my Macintosh to some mail servers out of state, then another dozen hops back to my gizmo.

It’s inefficient, but I don’t care. Both computers have CPU cycles and bandwidth to spare, I’ve spent a few enjoyable evenings hacking, and I have a solution now instead of months from now. The mere fact that a tyro like me can cobble a solution together out of existing tools also gives me a glimpse of what the world might be like when pretty much any computer visible to the naked eye can be pro-grammed (for better or worse) by ordinary users. —Paul Wallich

Software uSed on the mac:• emacs • Firefox • python 2.5 • thunderbird• ipython • ical

on the n800:• claws-mail • Joe (Joe’s own editor) • python 2.5 • gpesyncd to-gpe.py • ipython • gpe calendar • Bash

SMAll? SurE, but the point is that the N800 is a full-blooded computer that a bona fide amateur can reasonably hope to program. photo: Shayne Lynn

Mini-Profile By Susan Karlin

MIkE DAISEY: ONE-MAN ShOw Mike Daisey’s “Monopoly!” may be the only nightclub act ever to center on the relative merits of alternating and direct current. In his monologue, Daisey describes the eccentric genius Nikola Tesla and his part in the feud with Thomas Edison over the two forms of electricity. In the process he explores corporate rule, life according to the dictates of profit and loss, the Microsoft antitrust lawsuit, Wal-Mart’s impact on Daisey’s hometown, and the secret history of the board game Monopoly. For more, see http://www.mikedaisey.com.

April 2008 • iEEE SpEctrum • NA 25

Pe

te

r d

yla

n o

’Co

nn

or