Monday, March 14, 2011

Stopping Runaway Processes: Magic SysRq Keys

Pre-sequitur:
Consider the following Wikipedia entry that I subsequently found after doing all this work: 
 http://en.wikipedia.org/wiki/Magic_SysRq_key
 But it doesn't invalidate my findings:

     w f e v b (in that order) are the more useful.
And many of the claimed functions simply do not work, as discussed below.
Always willing to be corrected...
======================================================================== 
I found out how to get the kernel's attention when it is in some kind of process panic or runaway process. Before this, I just pulled the plug... :-( 
So this is much more elegant: 
        Alt+Fn+SysRq+<command key>
where +<command key> is one or another of a long list of characters, discussed below. It seems that  
        w f e v b 
(in that order) are the more useful. 
----------------------------------------------------------------------- 
When I leave the machine idle for a while (going to bed, going to lunch) I often come back to find it frozen with mad disk thrashing going on. Sometimes I get its attention back with a mouse move or hitting the Esc key, but more often I just have to pull the plug.
What I find from /var/log/messages is that hald is doing a lot of stuff and won't let go of the system.
Today I noticed that the log ends with entries like:
Mar 12 14:07:42 P1630 kernel: [11391.748962] Out of memory: Kill process
1378 (hald) score 598 or sacrifice child
Mar 12 14:07:42 P1630 kernel: [11391.748968] Killed process 1504
(hald-runner) total-vm:56372kB, anon-rss:26496kB, file-rss:632kB
Googling tells me this is the response of the out of memory killer (oom_killer), so I"ve read a lot about how it calculates the score by which to decide which process to kill to free up memory, and the winner (or actually, loser) in each case is hald.
Pulling the plug is actually a PITA, Searching around (thanks DenverD) gave me a much more elegant solution:
        /usr/src/linux/Documentation/sysrq.txt
This  bears careful reading and even more careful experimentation, which I here report:
The Fujitsu P1630 keyboard has a Function (Fn) key which is used to invoke functions on other keys that are indicated by a box around the function name, such as SysRq. In this case the following are the results of various key combinations, where a comma implies a wait, a + implies pressing simultaneously, and <command key> implies any of the letters of the alphabet cited in the sysrq.txt source above:

Alt, Fn+SysRq+<command key> just brings up the screen shot module 
 
Alt+Fn+SysRq+<command key> does nothing for <command key> = d g h.
 Instead, dmesg shows a help screen:
 [13321.912458] SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK
  show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync
 show-task-states(T) Unmount force-fb(V) show-blocked-tasks(W) dump-ftrace-buffer(Z)  
 
The following are the results for the remaining <command key> combinations:
 
Alt+Fn+SysRq+b  Will immediately reboot the system without syncing 
                or unmounting your disks.  
                This is clearly the most dangerous and exciting!
 
Alt+Fn+SysRq+e     Send a SIGTERM to all processes, except for init. 
                   Dumps you to the terminal prompt. 
                   This is almost as much fun as <b>...
 
Alt+Fn+SysRq+f     Calls oom_kill to kill a memory hog process. This is
                   probably the most commonly useful one, e.g.:
 [13385.402701] [11278]     0 11278     8026     2004   0       0             0 packagekitd
 [13385.402706] Out of memory: Kill process 3421 (firefox) score 122 or sacrifice child
 [13385.402716] Killed process 3631 (plugin-containe) total-vm:137648kB, anon-rss:840kB, file-rss:2436kB

Alt+Fn+SysRq+    i j k l m o all change the log levels:
        Alt+Fn+SysRq+i
        j[13859.996645] SysRq : Changing Loglevel [13859.996673] Loglevel set to 5 
        Alt+Fn+SysRq+j
          [14057.594808] SysRq : Changing Loglevel
         [14057.594837] Loglevel set to 1
        Alt+Fn+SysRq+k 
         [14158.143866] SysRq : Changing Loglevel
         [14158.143894] Loglevel set to 2
        Alt+Fn+SysRq+l 
         [14158.143866] SysRq : Changing Loglevel
         [14158.143894] Loglevel set to 3
        Alt+Fn+SysRq+m
          [14240.847738] SysRq : Changing Loglevel
         [14240.847767] Loglevel set to 0 
        Alt+Fn+SysRq+o
         [14399.663636] SysRq : Changing Loglevel
         [14399.663660] Loglevel set to 6
 
Alt+Fn+SysRq+n        This adjusts the niceness of the tasks.
         [14327.222095] SysRq : Nice All RT Tasks
 
Alt+Fn+SysRq+p  Will dump the current registers and flags 
                to your console to appear in dmesg).
 
Alt+Fn+SysRq+q  Will dump to dmesg per CPU lists of all 
                armed hrtimers (but NOT regular timer_list 
                timers) and detailed information about all
                clockevent devices.
 
Alt+Fn+SysRq+r  Turns off keyboard raw mode and sets it to XLATE.
        [14773.473596] SysRq : Keyboard mode set to system default
 
Alt+Fn+SysRq+s  Will attempt to sync all mounted filesystems.
        [14816.857775] SysRq : Emergency Sync
        [14816.860901] Emergency Sync complete
 
Alt+Fn+SysRq+t  Will dump a list of current tasks and their information to dmesg
 
Alt+Fn+SysRq+u  Will attempt to remount all mounted filesystems read-only
 
Alt+Fn+SysRq+v  Forcefully restores framebuffer console (same as b)
 
Alt+Fn+SysRq+w  Dumps tasks that are in uninterruptable (blocked) state.

So more experimentation later, but it seems like w f e v b (in that order) are the more useful.

How to Activate Macro Recording in LibreOffice 3.3.1

Tools > Macros > Record does not exist in LibreOffice 3.3.1 on first installation. But you can add it with
    http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=28782&p=131108&hilit=record#p131108

     menu -- > Tools -->Customize brings up a new window. Select the Menus tab.

On that tabpage there is a dropdown box where you can select the part of the menu where you want insert the new item. It starts with File selected. Scroll down to Tools | Macros

Then click on the Add button.

Another window opens. In the left window Category select : BASIC
In the right-hand window Commands select : Record Macro
Click button : Add
Click : Close
Click : OK
Repeat this process for any other additions you wish, e.g., Stop Recording, Run Macro.

Now we add toolbar icons:
 
Tools > Customize > Toolbars Tab > Toolbar: Formatting > (Scroll to end of list) > Add > Category: BASIC > Commands:
    >
Record
    >
Stop Recording
    >
Run Macro
    >
LibreOffice Basic Macro Organizer
 
    >Close > OK



Easy to do but obscure and undocumented...

Thursday, March 10, 2011

Another dead black beast: bluedevil!!

Posted details to http://tinyurl.com/66wr4q7.

The Waveinput contributor bpa has taught (um, re-taught) me a valuable lesson:

+ When pushing the car back up the hill, it is  best to go one step at a time. Tedious, but in the end more effective.

In this case it was one of adding one supporting application at a time, retesting, going back, doing it again.

And we have won:

+ Bluedevil requires the obex stack in addition to bluez! But none of the documentation I've seen describes this. So I have a self-assigned task to update the README file to make this clear.

Basically, we have loaded, unloaded, rebooted, reloaded, unloaded, etc. with a host of different combinations of stuff, finally deciding to do one-by-one:

+ Nuke all associated *blue* apps

+ Reboot

+ Add one thing at a time:
     - bluedevil (and nothing else that doesn't appear as being required)
     - on failure google around
     - discover obex
     -  Add obex elements one-at-a-time, repeat.

+ Success achieved in this manner after adding obexd and obex-client.

New README file to follow.

Wednesday, March 9, 2011

openSUSE 11.4 RC2 bêtes noires: One down, more to go...

Licked Squeezebox Server issues today, am delighting in Choral Evensong and Rachmaninoff as we speak.

Details posted to http://forums.slimdevices.com/showthread.php?t=80458&page=14:
:
So the key fixes were:

+ Providing a link to bootstrap.pm in one of the directories on the $PATH

+ Correcting the owner and group of the logs to squeezeboxserver

+ Setting up the firewall to masquerade the internal 192.168.x.0/24 network.

+ Explicitly setting Custom rules on the firewall to allow ports 3483 and 9000 in TCP and UDP.

Now for some tunes...

Tuesday, March 8, 2011

openSUSE 11.4 RC2 bêtes noires

Call me a self-flagellant.

I was so pleased with the smooth upgrade to KDE 4.5.5 that I decided to just go ahead and follow the instructions to upgrade to OpenSuSE 11.4 (oS11.4). Spent several hours RTFM on zypper, set up the 11.4 repos and removed the older ones, and pushed zypper dup. About an hour later it was all done.

[Footnote: OpenSuSE is now calling itself openSUSE so I guess we can all stop following the ancient German-based capitalization scheme...]

It went well enough. oS11.4 is at Release Candidate 2 Beta with only a few days to the full release. But there are some questions, if not bugs:

+ The splash screen is a grey streaked thing with a jagged gecko in the lower right corner that looks as if the video is corrupted until you notice that the gecko in the middle of the screen is perfect. So maybe this is a Beta reservation of some sort? It goes on and brings up the plasma desktop without fault or error. And indeed, the new video is crystal clear. Very cool.

+ There is a new tool KPackageKit that seems to be trying to takeover from YaST. It wakes up and downloads a scrunch of stuff, even though I had just done zypper dup the night before.

+ Squezebox Server (SBS) 7.5.3 won't connect. Part of it was a firewall thing (dropped port 3483 packets) solved by moving from guarddog to.the openSUSE firewall and turning on masquerading, but it still doesn't load. It shows as enabled but doesn't load, and when explicitly loaded does not respond. Now this may be an oS11.4 thing, or it may be an SBS 7.5.3 thing. I've posted to the forum, watch this space.

+ My mouse problems have been solved by replacing the keyboard (and its included stick mouse).

Other than that no noticeable problems except:

+ Bluedevil. Aaargh.

It was working on oS11.3 with KDE 4.5.5 but now doesn't. More to follow, but at present:
    - It sees the phone, the phone sees it, they pair.
    - The phone can send files to Bluedevil, but not vice versa
    - Neither can browse the other.

So this is what we've done:

1. Delete PC from N8, N8 from PC, reboot both.

2. Discover N8 on PC (Manage devices):
    a. It finds the N8, sends a PIN. Acknowledge all prompts on the N8 (PIN, services, access, etc.)
    b. Set up services on PC (Send files), follow prompts
    c. Transition into attempt to send file. Follow prompts, select file, destination, OK. Nothing happens. No audio on phone, no prompt on PC, no files on phone.

3. Discover PC on N8 (delete pairing on N8, search and pair):
    + You have to be really quick as the prompt doesn't last long on the PC, and after a few attempts does not appear at all. So reboot and try this step again:
        - Minimize all PC windows, with mouse at about 3 o'clock on the screen
        - Start the process on the N8
        -click the PIN approval
    + Success. Send from N8 to PC: (have mouse in same position)
        - Accept connection: success.
    + Send file from PC to N8: no joy, same as 2c. above.
    + Delete pairings on both devices, re-pair on PC, but do NOT transition to send.
    + Attempt send: once again you have to be quick. The notifications widget has the attempts but doesn't alert! But same as2c. above, no joy.

So:
    + Pairing does work in both directions, but you havae to be quick if pairing from phone to PC.
    + Better to pair on the PC - the prompts are too short-lived and obscure on the PC.
    + File transfer works from phone to PC regardless of pairing direction. But watch the notifications area for prompts and be quick.
    + Browsing a remote device does not work in either direction.

The installed version is 1.0.2-3.8.1. What happens if we uninstall and reinstall an older version?
We find version 1.0-2.9 at
    http://download.opensuse.org/repositories/KDE:/Release:/45/openSUSE_11.3/i586/
and give it a whirl.This was the version that worked for us before. But no joy. They all show
    0.6 KiB/s
    0.0 KiB/s
in the notifications section.

I've posted to
http://forums.opensuse.org/forums/english/get-technical-help-here/install-boot-login/455185-bluedevil-under-opensuse-11-4-rc2.html#post2300263
Se we await comments of others smarter than I.

FWIW, pretty much everything else works flawlessly on OS 11.4. Firefox 4 beta has a few problems, but that is not an OS 11.4 issue...

So all in all, a good couple of days.

Sunday, March 6, 2011

Success! Bluedevil on OpenSuSE 11.3

If you upgrade KDE to 4.5.5 or install KDE 4.4.4 development files (for ALL of KDE, OpenSuSE, and Bluedevil) then you can get Bluedevil to work, so far to the extent that I can now both receive AND SEND files between laptop and Bluetooth device. 

Woohoo!!
=========================================
Details:

Continuing to try solving.

The tarball responds

    ERROR: cmake/modules/FindKDE4Internal.cmake
Googling suggest running build-essential but this does not exist.

Repository search suggests it is in libKDE4, libKDEcore4,  libkde4-devel, libkdepim-libs4-devel, kdepim4-runtime-devel, or kdepim4-devel, which are not installed. So I install them all.

That problem is solved, but now it can't find libBlueDevil, no problem we have 1.0-3.3 available as an RPM. Install it and try again. But it still can't find it.

So I go to the gym to clear my head and try one more time.

Go search at http://software.opensuse.org/search, choose the v. 1.0-2.9 ymp. Again, it can't find kdebase4 > 4.6, but volunteers to install an older version, I click OK.

It runs and runs and runs and ... claims Installation was successful.

But it wasn't. bluedevil is not to be found.

Re-check yast2: It shows it as being installed. KDE also shows it as being installed but the icon bounces up and down and eventually dies.

Check yast2: it offers updates for libluedevil1 and libluedevil-devel. The latter was not installed Accept these and try again. Now the icon appears in the tray.
Woohoo!! Finally! I can send files to the N8 and it puts them in E:/Received files.
=====
But notso fasto. When I reboot I get the dreaded Unable to start ksmserver. But now I know, although have not heretofore tried
     zypper dup
 http://en.opensuse.org/SDB:System_upgrade
http://en.opensuse.org/SDB:Zypper_usage

This command uses the distribution upgrade algorithm, which handles package splits, unmaintaned packages, and similar. Use it to switch to another distribution release.
# zypper dup
It is recommended to enable only the main repository of the distribution you want to install plus a few important repositories you were using (even better - their version corresponding to the current main repository) during a dist-upgrade. You can achieve this by disabling the old repositories using zypper mr -da, adding the new repositories via zypper ar and issuing zypper dup. You can also specify repositories to be used using --repo option: zypper dup -r repo1 -r repo2 ...
This runs freaking forever, but on reboot, all is now working. Well, at least Bluedevil is working.
 Start > Favorites > Configure Desktop > Help > About KDE shows that I have been upgraded to KDE 4.5.5. Totally painlessly.
So now that was so much fun, I followed the advice of
     http://tinyurl.com/6kvoflv
 to upgrade to OpenSuSE 11.4!

Next step: return to resolve and review OpenSync.
Great progress, great day.

Friday, March 4, 2011

Dependency Hell

Note to reader: This is now 6 March 2011. I have learned more, so am editing this post to change things that no longer are correct. If you have saved information earlier than today then please review this article.

If you upgrade KDE to 4.5.5 or install KDE 4.4.4 development files (as posted later) then you can get Bluedevil to work, so far to the extent that I can now both receive AND SEND files between laptop and Bluetooth device. The strikethrough fonts below demonstrate the deprecated remarks.

  The solution appears to install devel packages for ALL of KDE, OpenSuSE, and bluedevil (libbluedevil1). So while it isn't presently easy, it is  doable

=================================================

A fresh morning, a fresh start:

http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_Factory/i586/
Download libbluedevil1-1.8-8.2.i586.rpm  and bluedevil-1.0.2-32.2.i586.rpm. The first installs flawlessly, the second complains about not having kdebase4-runtime >4.6.

This is where we crashed ksmserver yesterday. So this time I just skip that requirement and let it go ahead an install. But it fails.

OK, download and install kdebase4-runtime-4.6.0-287.1.i586.rpm since this time we have the zypper fix for the crash...

But it needs QTDeclarative.so.4. This is provided by lib32-qt, but that is not in the repositories.

So checked and updated the repositories and added OpenSuSE Build Service - KDE: Updated Apps.

We check https://build.opensuse.org for the dependencies. We have all the direct ones but as above kdebase4-runtime lacks some that do not exist in our repositories or yast2 web search:

dbus1-x11
kdebase4-runtime-branding-upstream
libIlmImf6
libexiv2-9
libjpeg62

So I am correct. We ain't there yet.

OpenSync Installation Protocol

So absent my current problems with Bluetooth, hopefully soon to be cured with OpenSuSE 11.4, here is the installation protocol I have gleaned from all the multitudinous sources. Again, I'll make it pretty tomorrow:

=============================================
1. Start clean. Nuke all opensync files and directories then download and install:
    - libsyncml
    - libsyncml-tools
    - libopensync
    - libopensync-pluginxxx 

     where xxx is one of the following:
        -evolution2
        --file
        -gnokii
        -kdepim
        -syncml
        -python-module
    - libopensync-tools


libopensync-plugin-kdepim is problematic as it no longer seems to exist.
The multisync-gui is nothing more than a text editor for the two configuration files.

2. Check to see if everything went right:
    msynctool --listplugins
    Result:
    Available plugins:
    syncml-obex-client
    evo2-sync
    gnokii-sync
    file-sync

We did not get syncml-http-server but it is there, check by running
    syncml-http-server

3. Set up the phone to sync. My N8 uses
    Settings
        > Connectivity
            > USB > Nokia Ovi Suite
            > Data Transfer
                > Sync
                    x Contacts
                    x Calendar
                    x Notes
                    x Bookmarks


All the following are done as user, not root:

4. Create a directory to store your files:
    mkdir ~/files_from_nokia

5. Add groups:
    a. Add a group to sync your Nokia to Evolution as user:
        msynctool --addgroup nokia2evo
    b. Add a group to sync your Nokia to files as user:
        msynctool --addgroup nokia2file

6. Add members to each group:
    a. Add members to the Evolution group
        msynctool --addmember nokia2evo evo2-sync
        msynctool --addmember nokia2evo syncml-obex-client

    b. Add members to the File group
        msynctool --addmember nokia2file file-sync
        msynctool --addmember nokia2file syncml-obex-client


7. Detect your phone over bluetooth:
    hcitool scan    This returns
        Scanning ...
                E0:A6:70:FE:9B:DC       Andy's N8
    http://osdir.com/ml/misc.opensync.user/2006-11/msg00006.html   
    A easy way to check/create your bluetooth pairing is (as root):

All the following are done as root, not user:
        hcitool cc E0:A6:70:FE:9B:DC
                Runs fine

        hcitool auth E0:A6:70:FE:9B:DC
            Not connected

             So we connect with the p1630 Bluetooth manager. Now: same answer, although the manager says we're connected.
        hcitool dc E0:A6:70:FE:9B:DC
            Not connected


        sdptool browse E0:A6:70:FE:9B:DC
            This returns the long list of services even with USB cable removed. So we are clearly connected, despite what hcitool auth says. So there is a problem with Bluetooth in general, as investigated and reported in my previous report.

8. Get all services available on this phone:
    sdptool browse E0:A6:70:FE:9B:DC | less
     This returns a very long list (253 lines in my case) of services, listed in the sub-tab Services.
    The |less pipe lets you scroll up and down the list using up and down arrows.

9. Find the USB services offered by the phone. Plug in the USB cable  and do
    syncml-obex-client -u
    If you don't plug in the cable you will get
        Found 0 USB OBEX interfaces
    With the USB cable connected you will get
    Found 4 USB OBEX interfaces
    Interface 0:
            Manufacturer: Nokia
            Product: N8-00
            Interface description: SYNCML-SYNC
    Interface 1:
            Manufacturer: Nokia
            Product: N8-00
            Interface description: PC Suite Services
    Interface 2:
            Manufacturer: Nokia
            Product: N8-00
            Interface description: SYNCML-DM
    Interface 3:
            Manufacturer: Nokia
            Product: N8-00
            Interface description: Haptics Bridge
    Use '-u interface_number' to connect


All the following are done as user, not root:
10. Configure clients:
    a. Evolution clients:
        i. Configure client 1 evo2-sync:
             msynctool --configure nokia2evo 1
             This creates the configuration file and opens it in vi. For this member much needs to be done, and done so much more easily in kate or some other GUI text editor so just quit:
      :q[Enter]

        ii. Configure client 2 syncml-obex-client:
             msynctool --configure nokia2evo 2
             Again, this creates the configuration file and opens it in vi. For this member much needs to be done, and done so much more easily in kate or some other GUI text editor so just quit
:q[Enter]

    b. File clients:
        i. Configure client 1 file-sync:
             msynctool --configure nokia2file 1
            This creates the configuration file and opens it in vi. For this member much needs to be done, and done so much more easily in kate or some other GUI text editor so just quit
      :q[Enter]

        ii. Configure client 2 syncml-obex-client:
             msynctool --configure nokia2file 2
            Again, this creates the configuration file and opens it in vi. For this member much needs to be done, and done so much more easily in kate or some other GUI text editor so just quit
     :q[Enter]
   
10. Refine client configurations. Open the file in your favorite editor. The file to open is:
        /home/$user/.opensync/groupm/n/syncmember.conf
      where
            $user is your user name (e.g., andy)
             m is the group number:
                1    Evolution group
                2    File group
            n is the member number:
                1    set number (evo, file)
                2    obex-client

    a. Refine configuration for nokia2evo evo-sync:
        kate /home/andy/.opensync/group1/1/evo2-sync.conf
        This file needs the explicit path to the evolution databases. Replace:
              default
         with (note to delete the trailing slash)
              ~/.evolution/addressbook/local/system
              ~/.evolution/calendar/local/system
              /~/.evolution/tasks/local/system   


    b. Refine configuration for nokia2evo file-sync
        kate /home/andy/.opensync/group2/1/file-sync.conf
        This file needs the explicit path to where to save files. Replace:
              default
                      with              ~/files_from_nokia

    c. Refine configuration for syncml-obex-clients for both Evolution and File:
        i. Make the uncontroversial settings:
            + Bluetooth MAC address:E0:A6:70:FE:9B:DC or whatever your value is from hcitool scan

            + The string that the plugin will use to identify itself.
                The identifier for Nokia mobile phones is:
                        PC Suite
                This parameter sets the "Synchronization Software" Identifier, which will be used to identify to the mobile phone. Most mobile phones ignore this identifier value. So far we only know Nokia mobile phones, which reject the synchronization when the identifier is wrong.

            + Other settings:
                https://help.ubuntu.com/community/NokiaEvolutionSyncing/Opensync suggests:
                    * version: 1
                    * wbxml: 1
                    --wbxml
                    This switch to WAP Binary XML instead of plain XML in the synchronization.
                    So far as we known this is used by most mobile phones, so we enable it by default.
                    If you have trouble with the initial sync testcase remove this parameter.
                    * usestringtable: 1
                    * recvLimit: 10000    Default is 0
                    * maxObjSize: 10000     Default is 0
                Don't change contact_db, calendar_db or note_db, and don't put in a username or password (perhaps unless you have one set up in the phone).

                https://help.ubuntu.com/community/NokiaEvolutionSyncing/Opensync
                    says to set it to the channel being used  by SyncML Server (10).
                    But other sources suggest using the SyncML Client (6)
                    And then we are using PC Suite Services, which suggests channel 8
                    So this needs to be determined by tests.

            + The USB interface number of the SYNCML-SYNC target returned by step 8 sdptool browse. The conf file says this is is the interface number (0) from step 9 above (syncml-obex-client -u with USB cable)
                    Interface 0:
                            Interface description: SYNCML-SYNC
                    Interface 1:
                            Interface description: PC Suite Services
                    Interface 2:
                            Interface description: SYNCML-DM
                    Interface 3:
                            Interface description: Haptics Bridge


        c. Additional settings not in the default .conf file
            https://help.ubuntu.com/community/NokiaEvolutionSyncing/Opensync
                suggests additional settings for USB:
                You'll need to fix permissions for your USB device. First you should connect your device with the usb cable. Then make sure that the lsusb command lists your device:
                    lsusb
                returns a bunch, including
                Bus 001 Device 003: ID 0421:0302 Nokia Mobile Phones

            i. Change the rules:
                + Unplug the phone
                + Use kate as root to modify /etc/udev/rules.d/40-nokia-mobiles.rules. The file does not exist.
                     Write it as
                    BUS=="usb", SYSFS{idVendor}=="0421", SYSFS{idProduct}=="*", MODE="0660", GROUP="dialout"
                    # This might work if the above doesn't :-( (substitutes ATTR for SYSFS)
                    # SUBSYSTEM=="usb", ATTR{idVendor}=="0421", ATTR{idProduct}=="*", MODE="0660", GROUP="dialout"
                + Run as root:
                    /etc/init.d/boot.udev reload                + Replug the phone

11. Check Bluetooth
    syncml-obex-client -b E0:A6:70:FE:9B:DC #        where # is 6, 7, 8, 9, or 10
        -b
        This parameter is for Bluetooth connections. For fill in the MAC address of your mobile phone and for the number of the SyncML service. But these all fail with
            Failed to start the client: You have to configure at least one database

12. To get a resume of your configuration just do a:
    msynctool --showgroup sync_nokia2file

13. Now all is configured: just sync your date from your phone to your computer:
    msynctool --sync sync_nokia2file

============================
In theory, enjoy. But first, we need to fix Bluetooth and USB connectivity.

Phew...

Note to reader: This is now 6 March 2011. I have learned more, so am editing this post to change things that no longer are correct. If you have saved information earlier than today then please review this article.
======================================================
What a day... Indeed, what a number of days...

I have spent the last several days trying to get a top down view of OpenSync.

Below is my first take, my gleanings from the zillions of postings on the subject. I will be ecstatic if someone would post comments directing me to the contrary:

Point one:

+ Everything I have found is at the warp and weft level
          http://en.wikipedia.org/wiki/Weaving

The postings address the finest details of the most lowly elements of the architecture, but I have not found anything that offers a top-down description of the architecture. Not even from the source...

 So as a result, there seems not to exist any source that describes in a single document on a macro level how to integrate the architecture with the remainder of the computer world. It seems to be an own-self-navel-contemplating structure in an ivory tower impervious to the forces of reality... :-(

-----
OK, dude, here is some reality, below.

Point two:

+ Great idea, but to date, poor execution. Aside from the relevance and context issue above, there is the issue of functionality. Guess what: it is broken.

At least it is broken on OpenSuSE 11.3.

=====
Look: here's the deal:

OpenSync is a great idea. You have a central engine that can translate from X to Y. X can be any of a zillion of different modules referred to as "plugins" that the user can choose among. Y can be any of a zillion same or different modules ("plugins") among which the user can choose.

This reminds me of the project for which I was a program manager at a large company once upon a time. Take X, translate it to a common  format (XML?) and then translate it to Y.

Great Idea.

=====
Howevah, Poor Execution:

+ Lots of people seem to be working on the intimate details of all the possible X and Y variations.

+ But THE WHOLE SYSTEM depends on access to hardware, that is on Bluetooth and USB interfaces. And there seems to be precious little effort there.

I'm on OpenSuSE 11.3. It seems by allegation that its default Bluetooth interface (kbluetooth) for the underlying protocol stack (bluez) is broken.

However, if you upgrade KDE to 4.5.5 or install KDE 4.4.4 development files (as posted later) then you can get Bluedevil to work, so far to the extent that I can now both receive AND SEND files between laptop and Bluetooth device. The strikethrough fonts below demonstrate the deprecated remarks.
 
Indeed, irrespective of OpenSync I can transfer data from a remote Bluetooth device to the bluez-equipped computer using the remote device's software. But I cannot transfer data from the computer to the device, despite kbluetooth's offering to do so. It doesn't work

So what alternatives exist?

bluedevil (http://www.afiestas.org/bluedevil-the-new-kde-bluetooth-stack-is-here/) is widely touted as the solution. But actually installing it is dependency hell. I have spent the entire day trying different combinations of RPMs, YMPs  (YaST Meta Packages), git streams, and tarballs. All fail in one or another way, one way in particular wiping my KDE 4.4 installation (cannot start kmserver) requiring a system reinstall ("update"). The solution appears to install devel packages for ALL of KDE, OpenSuSE, and bluedevil (libbluedevil1). So while it isn't presently easy, it is  doable.So yet another Great Idea But Poor Execution. The developers are not on the bleeding edge, they are on the hemorrhaging edge of the latest KDE variation (4.5.5) and installation techniques (CMAKE) for which little or no documentation exist.


How the heck do you use cmake anyhow? The source says just do ccmake but that crashes...

-----

OK, next rant. If Bluetooth won't work, how about USB, hmmm?

Well, it turns out that "OpenSync does not currently support accessing the raw USB device" or words to that effect.

In other words, it doesn't work on USB.

=====

So OK, kwitcherbichingnobodypromisedyouarosegarden, ok.

You can't make a case. It is free and open software, you get what you pay for.

But it would be nice if someone, in the course of doing the best that they can do, were to post a list of the things we are trying to do, each with an annotation of where we stand. A "todo" list so that at once:
+ A newbie can know where the project is along its trajectory
+ A supporter can see where he can apply his efforts to best solve the issue.

My contribution is in general providing the top down view posted below, and today getting my arms around the bluetooth/bluedevil part of it, contacting the developers and asking for information so I can make it better.

But we ain't there yet. The following is what I have figured out so far, I'll make it pretty tomorrow:

===========================================
http://en.opensuse.org/OpenSync
OVERALL ARCHITECTURE
Opensync software comprises a main engine and "plugins".

There are two version sets: STABLE (v. 0.22 series) and UNSTABLE (v.0.39 series)

The  STABLE main engine is libopensync. The UNSTABLE main engine is libopensync1.

The STABLE plugins are libopensync-plugin-(suffix).
The UNSTABLE plugins are opensync-plugin-(suffix).
 (suffix) is, for both versions:
      Suffix        Syncs to and from
    -evolution2         Evolution
    --file              files on the computer
    -gnokii             older non-OBEX Nokia phones
    -kdepim             KDE3/4 PIMs (kontact, kaddress)
    -syncml             OBEX supporting platforms
    -python-module      Allows python plugins to be used
    -google-calendar    Google calendar
    -gpe                GPE handhelds
    -irmc               IrMC (Sony Ericsson, Siemens) handhelds
    -moto               Motorola handhelds
    -opie               Opie/OpenZaurus handhelds
    -palm               Palm devices
    -sunbird            Mozilla Sunbird calendar

Media
The architecture is designed to be implemented on both bluetooth and USB connections.

http://en.opensuse.org/OpenSync/SyncML-OBEX-Client
In openSUSE 10.2 Beta 2 there is no permission for the desktop user to access the USB raw interface by default. When we receive lots of USB Products and Vendor IDs of mobile phones, from the community then we can provide a hal-resmgr fdi file which grants access to the USB RAW interface of your mobile phone.

This implies that except for testing, syncml-obex-client does not function on USB.

http://wiki.wireshark.org/CaptureSetup/USB:
This page is about capturing raw USB traffic, e.g. the packets a USB mouse will generate on the Universal Serial Bus.
To dump USB traffic on Linux, you need the usbmon module. Load it with the command
      modprobe usbmon

Implementation: Sets, Groups, and Members
http://en.opensuse.org/OpenSync
Implementation requires establishing a synchronization set, containing several groups. Each group contains several members.

Establishing the Set
The set is established by the existence of a group and its configuration. The set is identified by a field common to all the group and member configuration files. The most common set for Nokia devices is PC Suite

Adding Groups

Groups are created by the command
    msynctool --addgroup $groupname
    The group name can be any single alphanumeric word, e.g., nokia2evo, nokia2file, and so forth.

    Creating a group creates two subdirectories
        ~/.opensync/engines
        ~/.opensync/groupn
    where n is the next sequential number 1...n that has not previously been used for a group.

Adding Members
Members are added to the group by the command
    msynctool --addmember $groupname $membername
    The member name must be the name of the function in the desired plugin:

      Plugin        Membername
    -evolution2    evo2-sync
    --file         file-sync
    -gnokii        gnokii-sync
    -kdepim        kdepim-sync
    -syncml        syncml-obex-client Currently only Bluetooth?
                   syncml-http-server
    -python-module Allows python plugins to be used
    -google-calendar    google-calendar-sync
    -gpe           gpe-sync
    -irmc          irmc-sync
    -moto          moto-sync
    -opie          opie-sync
    -palm          palm-sync
    -sunbird       sunbird-sync

    Adding a member creates a subdirectory
        ~/.opensync/groupn/m
    where m is the next sequential number 1...n that has not previously been used for a member.

Viable group membership include:
 

    nokia2file           
        file-sync
        syncml-obex-client

    nokia2evo
        evo2-sync
        syncml-obex-client


Configuration
For each group configure each client by invoking
     Configure client 2 syncml-obex-client:
     msynctool --configure $groupname $membernumber

    This creates the configuration file and opens it in vi.

    For  some members nothing needs to be done, so just issue the vi command:

        :q[Enter]

    For other members much needs to be done but is done so much more
    easily in kate or some other GUI text editor so just quit:

        :q[Enter]

    then open the file in your favorite editor.

    The file to open is:

        /home/$user/.opensync/$groupnumber/$membernumber/syncmember.conf

    where

     $user is your user name,  
     $groupnumber is the sequential number for the group, and
     $membernumber is the sequential number for the member, obtained from the -addgroup and -addmember actions described above.


Testing
Testing involves giving commands and recording the results.

    syncml-obex-client
    http://en.opensuse.org/OpenSync/SyncML-OBEX-Client#Testcase_Basics
        This URL discusses a number of tests. Essentially they are setting the parameters of the syncml-obex-client configuration file and testing its response. All are invoked with the following command:

        syncml-obex-client --$testtype [$test parameters]

            where $testtype [$test parameters] can be any of the following:

--sync $type $database   Set data types to be synched
--identifer $name        Set syncronization set identifier
--wbxml                  Sets use of wbxml format 
                         (WAP Binary XML instead of 
                         plain XML)
 -u             With no id it will list all available
                interfaces
                With id it will ????
 -b             Bluetooth configuration

         syncml-obex-client --sync $type $database

        where:
            * type: stands for the mimetype -
                  o text/x-vcard - for contacts
                  o text/x-vcalendar - for events
                  o text/plain - for notes

            * database: is the name of the database in the device which stores the entries. Known database names:
                  o contacts
                  o calendar
                  o notes
                  o tasks
                  o agenda (on some Sony Ericsson, for W800i both calendar as well as agenda work)

    hcitool
        hcitool is a tool for testing bluetooth connections. It currently has only one option:
            hcitool scan
                Scans for Bluetooth devices and list the name of the device and the MAC address.
                Ensure your Bluetooth is enable on your mobile phone and is discoverable.

    sdptool
        sdptool is a tool for exploring Bluetooth connections. It currently has only one option:
            sdptool browse
                returns the Bluetooth service of the device and their channel numbers.
                The Nokia N8 returns a very long list of available Bluetooth services. The literature
                is unclear on which channel to use. This source suggests using the channel for
                    SyncMLClient         6
                 while others suggest
                    SyncMLServer         10
                Also plausible are
                    OBEX File Transfer    7
                    OBEX PC Suite Services    8
                So further explanation or testing is required to resolve this parameter.

================
Next, what I've gleaned as a step-by-step installation process, assuming you can get past the USB and bluetooth issues that I'm having on OpenSuSE 11.3.