Archive for the ‘Programming’ Category

About summer, Nokia 770, Python and GPS

Tuesday, July 11th, 2006

Huh, man it has been a hot summer here in Finland. It has been something like 30 degrees centigrade for a month now and I’m sort of thinking that this starts to be enough. Anyway, I haven’t been writing to my blog for quite a while now. I was on a vacation for some time and in couple of weeks I will go out for some more. Meanwhile, a lot has been happening with the Nokia Internet Tablet. The final version of the 2006 software has been released and now we finally have also a almost fully functional Python runtime for the Maemo 2.0 platform as well. Now it is time to start making some serious Python applications for the Nokia 770.

I bet that everyone that has the Nokia 770 knows about the Maemo Mapper. I’ve also been using it for some time know and finally yesterday I wen out and bought myself a bluetooth GPS receiver so that I can fully utilize the power of Maemo Mapper. I have to say that I’m impressed. It works like a charm. Btw… the GPS receiver that I have is Insmat InsSiRF III.

11072006

Python and Maemo 2.0

Saturday, June 10th, 2006

As we all probably know by now the Beta version of Maemo 2.0 and OS2006 has been released. Too bad that I forgot my Nokia 770 at work and I cannot test the new software yet. :( Of all the weekends, why It had to be now.

Anyway, I’ve been browsing through the Maemo.org site and I noticed that there was very nice Python tutorial there that includes lots of useful information. It seems that now it is really possible to develop fully working applications for Maemo platform using Python, since LibOSSO and D-BUS services are included. The tutorial has also very good instructions on how to make application installer packages from your Python applications.

The tutorial mentions that the Nokia 770 software images won’t include the Python runtime by default, but it has to be installed separately. This is quite understandable considering the amount of memory that is available on Nokia 770 for installable software. Also according to the tutorial the Pymaemo runtime package should be downloadable via maemo.org, but I haven’t found it yet. Anyway, the future looks promising.

Please also note that my previous tutorials do not apply anymore on Maemo 2.0 since hildon.App and hildon.AppView have changed to hildon.Program and hildon.Window.

Collection of my Pymaemo tutorials

Friday, June 2nd, 2006

I though that I set up a collection of the pymaemo tutorials I’ve written so that they would be more easily accessible. From now on you can find them at pymaemo.teemuharju.net. Of course, I still put them on my blog also. I haven’t written much new tutorials lately, but I think that during the weekend I could write about things like how to create a Hildonized toolbar etc.

Raccoon goes open source

Friday, May 26th, 2006

Earlier, I wrote about the Raccoon web server that you can run on your mobile phone. I just found out that it has been released as open source. Also the gateway implementation has been released, so now you are no more attached only to the project’s own gateway. A brief look at the gateway install instructions seemed to be quite complicated, but I’m definitely planning to set up one to my home server.

This is the first, but rather small step towards having your mobile phone part of the Internet. Now all we need are flat fee data connections and I think lots of cool new stuff will appear. If you have a Series 60 phone, give Raccoon a try. You’ll be amazed by what you can do with it.

MaemoFlickr

Tuesday, May 23rd, 2006

Besides working with the BitTorrent client, I’ve been also working with application that I call MaemoFlickr. I’ve been building this application from scratch and when it is ready it will be able to upload photos to Flickr using simple and intuitive user interface. The intention is that if you have camera phone or something you could easily upload the photos you’ve taken to Flickr. Future versions might include also some photo organizing features, but I think that for starters it is probably better to keep it simple.

Here are some screenshots…

MaemoFlickr

MaemoFlickr Loading...

MaemoFlickr About

BitTorrent for Maemo continued

Tuesday, May 23rd, 2006

Ok, now I’ve got the UI of the BitTorrent client somewhat Hildonized. I decided to move the start/stop button, the search field and the connection indicator to a toolbar at the bottom of the view. I think this makes it a bit more usable. I’m considering moving the upload rate adjust bar to the toolbar also, so that the main view would only contain the information about the torrents that are being downloaded or uploaded. I haven’t yet touched the other views, but I think those need less editing anyways.

The search bar on the bottom does not of course work yet, since it is not possible to launch the web browser form Python applications yet. However, this should become possible with the new software release and new pymaemo version. Then also MIME support for bittorrent files would be nice. I’ll look into that and then we have full blown BitTorrent for the Maemo platform. All I would need now is actual content distributed via BitTorrent that actually could be used in the Nokia 770. Usually videos are too large and those iPod mp4 videos does not seem to play in the video player. Anyone know any good podcasts that are distributed using BitTorrent?

Maemo BitTorrent

The original BitTorrent on Nokia 770

Saturday, May 20th, 2006

As the readers of this blog have probably noticed, I like doing stuff with Python. I also like downloading all kinds of stuff from the Internet and what better way to do that nowadays than the BitTorrent. How convenient, BitTorrent has originally been written in Python. ;) Here we go… I need to port the BitTorrent client on Maemo platform using pymaemo. I know there are command line versions of some other BitTorrent clients already available for maemo, but I kind of like having UIs. They make life alot easier. ;)

The surrent stable version of the BitTorrent client uses PyGtk for the user interface so porting should go quite smoothly. I decided to give it a go and as I suspected it worked straight from the package. Of course I had to modify the .deb installer a bit to make it install using the application installer on the device, but otherwise nothing else was needed.

Here are couple of screenshots. As you can see, no Hildonization for the UI yet, but I’m already rolling up my sleeves so lets see when I can release the first installer package.

Maemo BitTorrent main screen

Maemo BitTorrent about screen

Nannoid 1.0 for Maemo

Saturday, March 18th, 2006

In my previous post to this blog I was experimenting with Pygame and found out that a game called Nannoid worked almost fully on the Nokia 770 without modifications. Well, I decided to modify it a bit and now it should be fully playable.

It requires you to have Pymaemo runtime installed. Also, since Python for Maemo does not yet fully support LibOsso (or something?) you wont be able to switch back to another application during the game and you don’t see the “loading…” sign when launching the application from the menu. After clicking the menu item, just wait a couple of seconds and the game will launch. You can play the game using the stylus or the keys.

Download the installer package from here. I hope you enjoy the game. Here are some screenshots…

Nannoid menu

Nannoid

Nannoid

Experimenting with Pygame on Nokia 770

Wednesday, March 15th, 2006

It’s been a while since my last post to my blog and yesterday, while watching OC and lying on the couch, I thought I gotta post something. Then I started to browse through the Pygame site since I thought there might be something cool stuff that I could try on my Nokia 770.

First I started at the Gamelets section. I thought that these should be simple enough and work without any editing on the device. To be honest, that was not the case, but at least I got this small game called Spacepong working. It worked really nice and I could control the ball on the screen using the stylus. The game itself is not the coolest kind, but might offer a good example on how to develop games using Pygame. Here are some screenies from the game taken from Nokia 770.

Spacepong menu on Nokia 770

Spacepong game on Nokia 770

Now, encouraged from this nice experience with Pygame gamelets, I decided to go for the actual games. Since I’ve always liked Arkanoid I immediately wanted to try Pygame version of that called Nannoid. To my surprise, it also worked right out of the package. Well not fully. As you can see from the screenshots below, the game didn’t quite fit to the screen. Anyhow, this seems like something that would be really cool with some modifying.

Nannoid menu on Nokia 770

Nannoid game on Nokia 770

And remember people, this was all done while watching OC. ;) All you need to do is to install Python for Maemo. Then download the .tar.gz packages of the games, for example, to your memory card. Then go to the directory where you downloaded them using Xterm (MMC is found in /media/mmc1) and type “tar xzvf the_name_of_the_package.tar.gz”. Change to the directory that was extracted and start the game by typing “/var/lib/install/usr/bin/python2.4 the_name_of_the_file_that_starts_the_game”. If you have errors, you might have tried to start the wrong file or it just doesn’t work. If you find more games that would be cool for Nokia 770, I’d like to hear about it. That was all this time… happy gaming. :)

Porting Python modules to Maemo

Friday, February 24th, 2006

In some of my earlier Python related postings someone asked if Python Imaging Library (PIL) has been ported for Maemo. It seemed like it is not, so I decided to give it a try. I’ve never before created any Python .deb packages so, this was sort of my first experiment in this area and I decided to write here how I did it. In case it would be of use to someone.

The created PIL package for Maemo can be downloaded from here. Anyone interested in porting Comix for Maemo now? One point I need to mention is that I have not tested the PIL library that I’ve created for performance and quite frankly I have no idea how to optimize it, so if anyone is interested just go ahead.

I made a test using PIL on my Nokia 770 and created a blended image of the two default wallpapers. Here’s the result. Keep on reading if you want to know how I ported the library for Maemo.

Blended image created with PIL

(more…)


blog.teemu.im is Digg proof thanks to caching by WP Super Cache