Archive for the 'Mobile' Category

2-D Slider – GTK Widget

July 02nd, 2008 | Category: Informatics, Mobile, openmoko

Today I build my first true GTK widget. Since written in Python, it’s not fitting in all GTK programs, but still I think some people might find it useful.

The Idea is to have a widget that can change two values at the same time. This comes in handy whenever a program has two numeric inputs that are manipulating one result. Users will not have to jump from one input element to another, but can use a diagram-like area to set values using an X and an Y axis.


Screenshot of the 2-D Slider

When the widget is created, the programmer can select which ranges X and Y shall be in. The 2-D area will then displays a grid to show where values will be placed. And while the mouse is hovering over the grid, a preview dot will mark the nearest available value pair. If a coordinate is selected (by pressing the mouse button, or dragging the mouse over the field) an event will be generated, to inform the rest of the program about new values (X, Y, or both).

The Python sources can be found at the SVN repository of the #neo1973-germany developers Homepage. The following code snippet shows how to use a slider_2d widget and how to connect two callback functions to the “value_changed” events.

import slider_2d
...
def x_changed_callback(new_x_value):
    value_x_label.set_text("Value X: %s" % new_x_value)
def y_changed_callback(new_y_value):
    value_y_label.set_text("Value Y: %s" % new_y_value)

value_x_label = gtk.Label("Value X: none")
value_y_label = gtk.Label("Value Y: none")
slider_2d = slider_2d.slider_2d(x_range = (0, 30), y_range = (0, 10))
slider_2d.connect('x_value_changed_event', x_changed_callback)
slider_2d.connect('y_value_changed_event', y_changed_callback)
...
No comments

Googles Android Online Services not open (yet)?

June 03rd, 2008 | Category: Mobile, Opinion

After being told that Google understands the need for 3rd party access to Androids online services at Android Developer Session (Munich) in January 2008, I wonder about a statement in Ed Burnettes blog showing that Google is restricting access to the protocol API.

A Google employee I talked to felt the need to apologize for this. “We’re not holding it back for any nefarious purpose,” says Dick Wall on the Android team. “We’re simply not ready to publish the API that talks to the back end server.” This makes sense given Google’s extreme reluctance to be “stuck” with a poorly thought out API that they can’t support forever. This doesn’t preclude the company from opening up the source to those apps later.

In Munich we where told that Android developers would see a use case for 3rd party access, and start planning the interface for server-to-server XMPP. But after renaming and changing the XMPP services to “GTalk” it seems to me like Google does not plan to provide any open interface to their services.

Let’s hope it’s only a temporary thing until the API is stable…

No comments

Getting a Huawei E800 UMTS Modem to work with Linux

March 26th, 2008 | Category: Informatics, Mobile

Today I finally managed to get the E800 ExpressCard provided by BASE working with Linux. I installed the latest Version (0.8) of Klaas van Gends umtsmon, and configured it to use 3G instead of GPRS. The problem that kept me from bringing the configuration to work until today was that two of the tree USB serial devices (/dev/ttyUSB0 and /dev/ttyUSB2) are only available for a couple of seconds.

UMTS Monitor with established connection

But now I figured out that those will stay available once you disable the usb-storage part of the card right after the card is initialized.

To provide Windows drivers on the fly, the E800 has a build in, read only USB stick like device, where the manual (PDF) and the setup program are stored. Once that device gets mounted, the card is not usable as a modem anymore.

While writing this blog post I just found out that the ExpressCard slot also provides a USB interface, which explains the device tree seen in the following picture. There you can see that the modem hardware is detected as a Huawei E220 and is not using the PCI Express Bus at all. It is rather using the same USB Controller as the Infrared Remote Port of my MacBook Pro.

UMTS Monitor with established connection

When thinking about this further, I figured it would be possible to build a ExpressCard to USB adapter – and after some googling I found one that is even said to work with the E800. Engagded also reviewed one of those devices some time ago. I wonder that some plastic and connections from pin 34, 36 and 38 to a USB cable are still worth more than $ 30.

The steps to bring an E800 to work in a current Ubuntu Laptop are the following (this will only work if you are not using a USB storage device at the same time).

  • Register the USB serial modul to handle the Huawei card
  • sudo modprobe usbserial vendor=0x12d1 product=0x1001

  • Append the above line to your /etc/rc.local (without “sudo”)
  • Plug in the device
  • Try running the following command every second until no error is returned
  • sudo chmod a+rw /dev/ttyUSB{0..2}; sudo rmmod usb-storage

  • Run umtsmon (try with sudo in case it gets stuck)
  • Configure your connection and press the connect button

As umtsmon is a QT program, I think this would be a nice project for pyGTK.

1 comment

Bluetooth PAN on Openmoko

March 16th, 2008 | Category: Informatics, Mobile, openmoko

Last night I could finally finish the 0.8 release of SettingsGUI. The touch based application for Openmoko does now feature a configuration interface for Bluetooth Personal Area Networks. After setting up such a Network (touching the “Connect” button on both ends) I could get two Neo1973 phones to communicate with each other.

SettingsGUI will use the last byte of the 6 bytes long Bluetooth Address as fourth number in its IP Address. That way most devices will reach each other without any further configuration.


The new Bluetooth Panel in SettingsGUI

Thanks to Professor Dr. Rüdiger Weis who privately financed the second Neo1973 as our university does not seem to be able to equip students with GSM capable hardware.

In the picture you can see the two Neo1973 (GTA01) with SettingsGUI running. Also I could successfully test a configure where the default gateway points to my Laptop, so that ip-forwarding would work. That way you can surf the Web using Bluetooth on Openmoko. Bluetooth 2.0 can reach a transfer speed of about 2 MBit/s which is about as fast as DSL, so it is fun to use.

Since last week SettingsGUI and the three other tools I wrote for Openmoko are part of the Moko Underground movement at neo1973-germany.de where they finally found a SVN home.

I would be happy about any kind of feedback regarding SettingsGUI.

2 comments

open Bicycle Computer

January 12th, 2008 | Category: Informatics, Life, Mobile

During the last week I had the privilege to help a good friend to build the project homepage for oBiCo. The open Bicycle Computer project aims to build nothing less then an open source autonomous embedded system for your bike.


The oBiCo Logo


Peer with whom I shared a flat while studying at Aalen University and his girlfriend Ramona are planing to release the open source project at LinuxTag 2008, May 28 – 31, here in Berlin.


oBiCo prototype running gravitational sensor testprogramPCB of oBiCo prototype


Have a look at the projects homepage – which is still being developed – and notice the features. Just imagine what can be done with a dynamo-charged open source media device during bike trips.

Also I find it really astonishing that Peer could develop the prototype from scratch (hardware and software) in just a couple of months during his spare time, while being really busy at his day job.

I was excited to do the artwork of oBiCo.de and to finally spend some time using Blender again, which really grew in the years.


oBiCo developer button


In this spirit – keep developing, see you at LinuxTag 2008.

No comments

OpenMoko

October 16th, 2007 | Category: Mobile, openmoko

As I’ll write my Master Thesis on OpenMoko, I bought a Neo1973 as soon as it was available in the OpenMoko Online Shop. OpenMoko is an open source distribution for mobile phones, and the Neo1973 the first publicly available Phone, using it.

After it arrived, I managed to write some software just to get used to the environment. I’ve chosen Python for the task, as I like the development speed you can achieve with it and the number of libraries it provides.

OpenMoko is based on OpenEmbedded (OE), and so I was happy it had the most important Python libraries in its recipe database. I could start using pyGTK, Distutils, Subprocess and urllib right away.

What would you code on a virgin Embedded System like the Neo? Well the first thing that came to my mind, after playing around with the functions that could be only accessed by the on screen terminal or an ssh connection, was a User Interface to provide these functions. That way, I would be able to set options on Audio, Video and GSM connection without having to use the onscreen keyboard. SettingsGUI was born.

SettingsGUI GSM Panel

It’s a great experience to work with the OpenMoko community. There is a Wiki to get in-depth information, and the guys at #openmoko (and #neo1973-germany) at the freenode.net IRC network are providing instantaneous help. I could commit patches and bugs into the Bugtracker, to get the existing source code adjusted to my needs, and Alessandro offered to package my programs for his repository. Thanks for that.

So, it is really fun to develop for OpenMoko. Currently I’ve also got an SMS tool and a note writing program in the works. Expect more blog posts on those and on an experimental RSS Feed Reader soon.

This all provides a great basis for the Master Thesis, and I am really looking forward to start writing in the next weeks (after my university approved). So stay tuned and don’t hesitate to send me any thoughts or ideas.

No comments