Planet maemo: category "feed:b45a8ddcf3f2f1452044ac0e6a02e711"

Martin Grimme

"Native" PAN support for maemo

2008-02-26 13:56 UTC  by  Martin Grimme
0
0
maemo in a PAN
The waiting is finally over. There is now support for phone-tethering via the PAN Bluetooth profile, which is so popular on Windows Mobile smartphones.

By "native" I mean that it's quite well built into the system and does not appear as a separate application. And you no longer need a command line or root access for making PAN connections.

After you have installed the maemo-pan add-on (sorry, only OS 2008 supported so far), you can get online with just a few simple steps:
  • Go to the system preferences and add your phone in the phone settings. Do not enter the wizard for configuring the dialup settings. PAN does not use them.

  • Start internet sharing on your phone. It depends on your phone how and where to do this. On Windows Mobile 5, open the Start menu and select "internet connection sharing" from there.

  • Make sure that Bluetooth is enabled on your internet tablet. Now open the connection dialog and you will see that there is a new connection called "Bluetooth-PAN". Select it and you will be connected to the internet via PAN.

  • When you're finished, just close the connection the usual way. Wasn't this easy? :)

Thanks go to aleksandyr for figuring out stuff and to Frantisek Dufka for writing the initial PAN connection shell script for OS 2008. Without you guys maemo-pan wouldn't have happened!
Categories: maemo
Martin Grimme

MediaBox 0.94.1 fixing a few things

2008-02-20 12:15 UTC  by  Martin Grimme
0
0
I have just released Version 0.94.1 of the MediaBox Media Center. This is a bugfix release and will help you if you experienced MediaBox 0.94 hanging on startup.

The new version also adds support for non-UTF-8 character encodings in ID3 tags, such as ISO-8859-1 and UTF-16.

Thanks to all users who reported bugs and made suggestions!
Categories: mediabox
Martin Grimme
Thank you all for reporting bugs and giving new suggestions for MediaBox Media Center! You help me a lot making this the best and friendliest media center for the tablets! Keep on reporting; you decide what's important!

MediaBox Track Info

So here is release 0.94 with a lot of small improvements.

The media scanner will now cache already loaded thumbnails so it will be quicker after you add or remove a media folder. You can also specify for each folder which kind of media you have in there. Thus you will be able to avoid getting all your album cover art listed in the image viewer, for example.

Configuring the media collection

If you've always wanted to play the FM radio through the loudspeakers, you can do so now. MediaBox can finally switch from headphones to loudspeakers when the headphones are plugged in as FM radio antenna. The FM radio is only available on the N800, though.

The button on the Nokia headset is now also supported and you can press it to pause and resume playback.

I have also added a tag parser for FLAC tags and fixed some flaws regarding FLAC playback. FLAC is a free and lossless audio codec for high quality audio.

MediaBox is now powered by player backends for mplayer and the native osso-media-server. By selecting between two backends, more media formats can be played back. This especially adds support for real media and real internet radio streams (.ram), as well as MP4 and 3GP videos.

The new MediaBox release is available from the website as well as through the application manager in the Maemo extras catalogue. The package installs on OS 2006 (video playback not yet supported on the 770), OS 2007, and OS 2008.
Categories: mediabox
Martin Grimme
Maybe you have already noticed that there's now MediaBox 0.93 available in the maemo-extras repositories for OS 2007 and OS 2008.

So what's new in this release?

First of all, rendering became a bit faster. Many rendering operations are now directly performed on the X server where they run 2D-hardware-accelerated. Previously, only the kinetic scrolling was done like this. Especially the Nokia 770 gives very smooth results that way.

But much more important, the media scanner became a lot quicker. So if there are no new thumbnails to generate, it will scan your media in almost no time. Together with deferred thumbnail assembling, this greatly speeds up startup time.
The scanner is now also much more robust and knows how to get past bad media files that make mplayer hang during thumbnailing. Oh, and you can now watch the new thumbnails while they are being created.

I have improved the ID3 tag parser as well and it supports ID3 v1, v2.2, v2.3, v2.4 now. If you have album art embedded in your ID3 tags, then chances are good that MediaBox will be able to show it.

MediaBox also runs on the Nokia 770 with OS 2006, but video still does not work reliably there, and there are still some memory issues to be solved. But it's perfectly usable as a photo viewer or for playing music. Of course I'll keep testing MediaBox on the 770 and try to make it work even better.

See the release notes for more.
Categories: mediabox
Martin Grimme

N810 - What's good, what's bad

2008-01-20 13:32 UTC  by  Martin Grimme
0
0
It's been one and a half weeks since I got my N810 and I had some time to play around with most of its features.
Click to read 1702 more words
Categories: n810
Martin Grimme

Tablet Python #3 - List Comprehension

2008-01-01 07:14 UTC  by  Martin Grimme
0
0
A Happy New Year to everyone! In today's episode of Tablet Python I'm going to tell you more about list comprehension which we were already using in the last episode.
Click to read 1286 more words
Categories: python
Martin Grimme

Tablet Python #2 - Resource Modules

2007-12-30 05:31 UTC  by  Martin Grimme
0
0
Introduction

In this second episode of Tablet Python, I'm going to tell you about an easy way to make resource modules. A resource module is a Python module which you can import for loading resources such as images, fonts, or whatever you want.

For example:

import graphics

img = gtk.Image()
img.set_from_pixbuf(graphics.icon)


Implementation

In episode #1 we talked about writing relocatable software. We are going to apply the same technique for resource modules, since they will be relocatable as well.

Our resource modules are Python packages, i.e. a subdirectory with a __init__.py file in it. The name of the directory will be the module's name. Be careful to only use valid characters (characters valid for Python variables) in the directory name and the filenames of the resource files (e.g., my_icon.png is OK, while my-icon.png would be not!).

Let's assume the following filesystem structure for our example:

graphics/
+ __init__.py
+ icon.png
+ logo.png
+ background.png

test.py

The package directory will also contain the resource files. In order to access them, we'll have to put them into the module namespace. Write the following into graphics/__init__.py:

import os
import gtk

_RESOURCE_PATH = os.path.dirname(__file__)

def _load_resources():

# Find all .png files in the resource directory. This construct is called
# "list comprehension" and will be covered in detail in episode #3.
# This returns a list of the names of all files in the resource directory
# ending with ".png".
resources = [ f for f in os.listdir(_RESOURCE_PATH)
if f.endswith(".png") ]

# load resources into module namespace
for r in resources:

# the filename without extension will be the name to access the
# resource, so we strip off the extension
name = os.path.splitext(r)[0]

# this is the full path to the resource file
path = os.path.join(_RESOURCE_PATH, r)

# Now we can load the resource into the module namespace.
# globals() gives us the dictionary of the module-global variables,
# and we can easily extend it by assigning new keys.
globals()[name] = gtk.gdk.pixbuf_new_from_file(path)

#end for

# load the resources when importing the module
_load_resources()

That's all. Let's test it with a tiny test program test.py:

import gtk
import graphics

win = gtk.Window(gtk.WINDOW_TOPLEVEL)
img = gtk.Image()
img.set_from_pixbuf(graphics.logo)
win.add(img)
win.show_all()

gtk.main()

You may put as many resource files as you want into the resource directory and simply access them by their name. The files are loaded only once when the module gets imported the first time. Subsequent import statements reuse the module without reloading the resources. I'm going to talk about the "singleton" nature of Python modules in a later episode.

A more sophisticated example of resource modules can be found in the theming engine of MediaBox (the subdirectory called theme).
Categories: python
Martin Grimme

MediaBox doesn't like winter?

2007-12-24 07:09 UTC  by  Martin Grimme
0
0
There crawled a stupid little bug into MediaBox which made it dislike winter. A bug in the clock module made it return bogus data during winter. Since winter started recently, MediaBox failed to start up after December 22nd.

clock

The new release 0.92.1 fixes this. Now you can enjoy MediaBox again!


Merry Christmas!
Categories: mediabox
Martin Grimme

MediaBox gets FM radio

2007-12-09 13:10 UTC  by  Martin Grimme
0
0
I have been busy getting FM radio in the MediaBox media center ready for release. So if you have a N800 (the only Nokia internet tablet with built-in FM tuner chip so far), you will get the radio button at the bottom.

FM radio in action

But the new release will also bring some improvements to N810 users (sorry, no FM radio on the N810...). Kinetic scrolling is now smoother without the occasional "hiccups" while playing an audio file. Some bugs have been squashed as well.

Oh, and since MediaBox uses pyFMRadio for the FM radio, I made a new release of this as well. The new version has improved signal scanning for automatic station detection.
Categories: n810
Martin Grimme

Tablet Python #1 - Relocatable Software

2007-12-01 15:09 UTC  by  Martin Grimme
0
0
Python is becoming more and more popular for development on the Nokia internet tablets. It is indeed a very powerful and clear language and makes it easy to write applications that work on all internet tablet versions.

With this post I'm starting a new series on nice Python tricks which might be interesting to tablet software developers. So, if you're doing something in Python on your tablet, this series is for you!

In this first episode I will talk about writing relocatable software. This is software which works no matter where it's installed. There are no hardwired absolute paths to resources in relocatable software.

Knowing where you are

Every Python module knows the path where it's installed. You can retrieve the module's path by reading the __file__ variable.

print "This module resides at:", __file__

This makes it easy to find the directory where your app is installed:

import os
path = os.path.dirname(__file__)


Finding your resources

So if you want to load bundled resources into your application, you know where to find them:

path = os.path.dirname(__file__)
image_file = os.path.join(path, "images", "foo.png")
img = gtk.Image()
img.set_from_file(image_file)


Starting the application

This is the way I use to make my programs executable on the tablet. All of the program files and resources are within a subdirectory (e.g. /usr/lib/myapp/) together with the executable start module, which could look like this:

#! /usr/bin/env python

from mediabox.App import App

app = App()
app.run()

Let's assume this file is /usr/lib/mediabox/MediaBox. Then I make a symbolic link to this file as /usr/bin/MediaBox, and it's all done.

If I move my software to another place, I would just have to update this link.
Categories: python
Martin Grimme

MediaBox 0.90.1 addresses the gconf issue

2007-11-27 12:11 UTC  by  Martin Grimme
0
0
It seems that the gconf Python bindings are not available on every installation of pymaemo. Thus many users (mainly OS 2008) were not able to run the MediaBox media center. This release is for you!MediaBox 0.90.1 falls back to using gconftool-2, if no gconf bindings are available. As a side-result, version 0.90.1 will now also start on the Nokia 770 with OS 2006 and sorta works (kinetic scrolling
Categories: mediabox
Martin Grimme

MediaBox Enters the Stage

2007-11-26 11:40 UTC  by  Martin Grimme
0
0
Finally, the first version of MediaBox has been released. This is an extremely finger-friendly media center for the N800 and N810 internet tablets. The Nokia 770 should be supported with a later release. Let the screenshots speak: