Wednesday, April 16, 2008

Hello world, Nokia

That goes without saying ;)

Don't underestimate this simplistic program though, getting it compiled is hard enough without official Linux support from Nokia and there's no concrete and definite community documentation that outlines how to use the Nokia SDKs in Linux (after Nokia dropping the Concept SDK for Linux, that is). It took me quite a lot of obscure googling to get that working.

I'm still working out a simpler way to get this done instead of a very hack-ish bash script that I assembled just now. From the steps that was needed, I'm pretty sure that I could do somthing about having it to work with EclipseME (hopefully I'm right at the fact that it'd only involve modify some files that Nokia supplied in their SDKs ;) ).

Will post a follow-up on my progress while I tinker with it.

Sunday, April 13, 2008

Swinging Preferences

Having more time for myself, I'm back into the continuous effort in tuning my Ubuntu installation to match my usage preferences and making it more pleasant and efficient to use.

Two of the most interesting switches in my own preferred software: namely favouring Quod Libet over Rhythmbox; Emenese over Pidgin (previously GAIM). What's more interesting that both Quod Libet and Emesene were written in Python and were fairly new players in the open source universe.

Now, as we know it, the beauty of software in general is all about choice: there's a lot of different implementations of any application domain and users are free to choose any alternatives that were available to them. However, what kept me thinking is that: what had me making the switch from more established open source projects (Rhythmbox and Pidgin) to newer projects instead.

To think about it, Rhythmbox and Pidgin have served me very well indeed to a point I didn't see the need to change: afterall, it does what I wanted and probably more. But then came Quod Libet and Emenese that not only does everything plus the "killer feature" that I wanted badly:

  • Quod Libet: The "Random by album" plugin (Implemented as a plug-in)
  • Emesene: MSN personal message feature

Now, looking at the two features above, it's not hard to notice that these two features were never "essential" features; but rather, they were "highly desired" non-critical features. Granted, both of these software doesn't do everything their similar counterparts does, but the thing is that they position themselves as a promising alternative by not only providing all the essential features while being stable but also being able to adapt to more "minor" but "highly desirable" features.

So really that begs the question: how high such small but highly desirable features be in terms of development priority? On one hand, you need these new features to be in to attract a larger user base (especially if the feature is perceived to be important to a large number of users); on another hand, the feature may as well be a fad that lasts for a short term and devoting too much time with such "features" spells disaster for any projects. I suppose in the end, it's important to have an extensible infrastructure (the plug-in infrastructure?) and a means for users to install and uses these features in a prompt and user-friendly manner (either by bundling them with the main package like Quod Libet, or provide an easy way to obtain them like Firefox).

Saturday, April 12, 2008

Sync'ing Nokia 3500 classic with Ubuntu

It's been about a month or two since I got my Nokia 3500 classic and have had whined a lot about Symbian S40 with it:

  1. Unable to do full phonebook backups on the phone itself
  2. Unable to restore a vCard File (.vcf) that contains multiple phonebook entries on the same file, which is considered a common means of doing backup (at least I'm aware that Sony Ericsson and LG phones does that)

But at least it supports SyncML, which provides a platform-independent means of information synchronization. So with some effort, I got OpenSync and MultiSync setup to have Evolution and my mobile phone to sync with each other. At the moment I'd say that using these tools made me feel like such information sync'ing architecture is still quite in its infancy stage: mainly due to a lack of user-friendly graphical frontends and seamless integration with the desktop environment. Which is quite a pity really, especially the rise of handheld devices, I'm currently looking forward to more development with such a capability.

But anyways, for those needing a working syncml-obex-client configuration for the Nokia 3500 classic (via Bluetooth), here's the configuration that I'm using at the moment:

<?xml version="1.0"?>
<config>
<!-- (Only for bluetooth) The bluetooth address if the bluetooth mode is selected -->
<bluetooth_address>[The Bluetooth address for your Nokia phone]</bluetooth_address>

<!-- (Only for bluetooth) The bluetooth channel to use. `sdptool browse $MAC` to search for the correct channel -->
<bluetooth_channel>11</bluetooth_channel>

<!-- (Only for USB) The usb interface number of the SYNCML-SYNC target. use syncml-obex-client -u (you will need access to the USB raw device) to find it. -->
<interface>0</interface>

<!-- The string that the plugin will use to identify itself. Some devices need a special string here. -->
<identifier>PC Suite Data Sync</identifier>

<!-- The syncml version to use: 0 for 1.0, 1 for 1.1 and 2 for 1.2 -->
<version>1</version>

<!-- if the plugin should use wbxml -->
<wbxml>1</wbxml>

<!-- The username to use. Leave empty to not require a username -->
<username></username>

<!-- the password for the username -->
<password></password>

<!-- sets the connection type to use. 5 means obex over usb, 2 means obex over bluetooth -->
<type>2</type>

<!-- If wbxml is enabled, defines wether the wbxml should use string tables -->
<usestringtable>1</usestringtable>

<!-- Never send ADD command, but send REPLACE (not needed normally) -->
<onlyreplace>0</onlyreplace>

<!-- Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! -->
<onlyLocaltime>0</onlyLocaltime>

<!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 -->
<recvLimit>10000</recvLimit>

<maxObjSize>0</maxObjSize>

<!-- The name of the contacts db. Must be the same as the phones sends -->
<contact_db>Contacts</contact_db>

<!-- The name of the calendar db. Must be the same as the phones sends -->
<calendar_db>Calendar</calendar_db>

<!-- The name of the note db. Must be the same as the phones sends -->
<note_db>Notes</note_db>
</config>

Genius Wizardpen with Ubuntu Linux (8.04 only)

NOTE
  • AN UPDATED TUTORIAL FOR INTREPID IBEX IS AVAILABLE! Need someone to check whether that tutorial is compatible with Hardy Heron
  • [Compatible with Hardy Heron (8.04) ONLY]
  • [TODO]
    • Add a FAQ section (especially the fact that only realized that recently the original forum was down x_x...) -- main proof that I have been neglecting this blog and WizardPen progress these days
    • Any update if necessary

UPDATE HISTORY:

21 October 2008

  • Verified that steps are compatible with Intrepid Ibex (using compile by source method),
  • Added draft FAQ [Big TODO item, help needed]

27 May 2008

  • Added a troubleshooting step in the setting up section which recommends you to regenerate a fresh xorg.conf

27 April 2008

  • Updated link to download the driver source (Contributor: zack)
  • Included instruction on how to using precompiled driver
  • Modified xorg.conf on where to put the "CorePointer" option

As Ubuntu 8.04 (Hardy Heron) was released end of April 2008, one of the major change is XOrg 7.3, which sports hot-plugging, auto-configuration, better support of multiple input device and other powerful features. However, with those features in place, the existing Genius Wizardpen driver was not compatible with the latest XOrg.

Currently, Miriad (whom participated in the original Wizardpen driver forums) have updated the driver to make it compatible with XOrg 7.3 (rejoice!). Here are the instructions to configuring your Wizardpen:

Obtaining the driver
Option 1: Using a precompiled driver (Recommended)

Miriad have provided a precompiled driver for Hardy and can be obtained from http://specificcrap.arbitrarycrap.com/wizardpen_drv.so. Just download the driver and put it in /usr/lib/xorg/modules/input/.

Option 2: Building from source

(*Note: I haven't tested this with completely fresh Hardy system though ^^||)

  1. Download the source package: http://specificcrap.arbitrarycrap.com/wizardpen-0.6.0.2.tar.gz
  2. Unpack it somewhere with following command: tar -zxvf wizardpen-0.6.0.2.tar.gz
  3. Grab the necessary packages (UNCONFIRMED! Let me know if I missed out an important package): sudo aptitude install xutils libx11-dev libxext-dev x-dev build-essential xautomation xinput xserver-xorg-dev
  4. Change directory to where you unpacked the source code: cd wizardpen-0.6.0.2
  5. Compile and install the driver: sudo ./configure --with-xorg-module-dir=/usr/lib/xorg/modules && make && make install
  6. Verify that the driver is installed correctly (Check for wizardpen.la and wizardpen.so): ls /usr/lib/xorg/modules/input/wizardpen.*
Configuring and using your Wizardpen
  1. Connect your Wizardpen tablet (if you haven't already done so)
  2. Find out the name of your tablet : cat /proc/bus/input/devices | grep Name
  3. Edit your /etc/X11/xorg.conf file and type the following (or to verify against your last working xorg.conf with the Wizardpen in Gutsy):
    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "vmmouse"
    Option "Emulate3Buttons" "true"
    EndSection

    Section "InputDevice"
    Identifier "WizardPen Tablet"
    # Paste the name of the tablet as found in the previous step
    Option "Name" "UC-LOGIC Tablet WP5540U"
    Option "SendCoreEvents" "true"
    Driver "wizardpen"
    Option "TopX" "5619"
    Option "TopY" "6554"
    Option "BottomX" "29405"
    Option "BottomY" "29671"
    Option "MaxX" "29405"
    Option "MaxY" "29671"
    EndSection

    Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen"
    InputDevice "WizardPen Tablet" "SendCoreEvents"
    InputDevice "Configured Mouse" "CorePointer"
    EndSection
  4. Restart your X server: sudo /etc/init.d/gdm restart (*Note: It'd be better for you to logout, press Alt-F1 to go into the command prompt screen to execute this command)
  5. If X fails to start up, or that the cursor runs amok with unpredictable and unacceptable behaviour (e.g. button mapping screw-ups), I greatly recommend that you execute sudo dpkg-reconfigure xserver-xorg to regenerate a new working copy of xorg.conf and reattempt to configure the Wizardpen again (i.e. repeat Step 3-4 in this section). It may be helpful to read the IMPORTANT NOTE I had below.

IMPORTANT NOTE: The "SendCoreEvents" option is mandatory to prevent focus stealing between your mouse and Wizardpen, which would lead to a jerky pointer which is not what you'd want when you're drawing ;). It may be required to have your mouse being set with the "CorePointer" option (Reason I'm setting this option for the mouse is because without the actual mouse configured with "CorePointer" would give X11 an option to select the Wizardpen as the core [read: main] pointer and royally screw the button mapping of my mouse).

Should you find your Wizardpen not working yet, check out the /var/log/Xorg.0.log to see what went wrong (Search for "EE" and "WW" would give you some important hint). Google and the UbuntuForums are always your friend when it come to troubleshooting things ;).

Till then, good luck and have fun!

[FAQ - DRAFT]
  1. Wireless mouse for Wizardpen is not working: From my understanding is that support for the wireless mouse that comes with Wizardpen is NOT IMPLEMENTED yet. Therefore it won't work.
  2. Pressure sensitivity not working in GIMP: Check your GIMP preferences at "Edit > Preferences". Under the "Input Devices" menu item, click on "Configure Extended Input Devices...". Choose the WizardPen device and MAKE SURE YOU SET THE MODE TO SCREEN/WINDOW (not "Disabled"). Without that setting, it won't work ;)

[REFERENCE AND RESOURCES]

  1. WizardPen driver and XOrg 7.3
  2. TabletSetupWizardpen (Ubuntu Community Help)
  3. HOWTO: Setup a wizardpen-based tablet (Ubuntu Forums)