How to get Quick Sync Button Working


James Mastros <> for all his tips and insights.
Then me :) Andrew Park <>

1. Overview

I will keep this page as a simple HOWTO, please understand. But in the future I might actually provide related kernel code with explanation. :)

The way "quick sync" button works is as follows

  1. "Quick Sync" button is pressed
  2. kernel writes to /dev/vrbuttons (or equivalent)
  3. gbm daemon that polls on /dev/vrbuttons detects the change
  4. gbm spawns a child and executes /etc/gbm/on_sync and exits

2. Requirements

3. Set up

The current version of gbm daemon does not recognize BTN_SYNC (as of Apr 5, 2001). So you will need to get the patch from here.

You must patch gbm, compile it, install it (to your agenda) and then kill off the old gbm and run this version in order to get quick sync working.

The following is what I did to do this

> ls

CVS/ gbm/ gbm.patch syncmanager/

> patch -p0 < gbm.patch

patching file `gbm/gbm.c'

> cd gbm

> ./configure

> make

Then start the PPP session between my agenda and my computer.

> /usr/sbin/pppd /dev/ttyS0 115200 noauth local

> rsync gbm

Then telnet to agenda, so that I can kill off the old gbm and run this new one.

> telnet


\w\$ ps auxww |grep gbm

54 root root S /usr/bin/gbm

84 root root S grep gbm

\w\$ kill -TERM 54

\w\$ cd /home/default

\w\$ ./gbm

This will allow your agenda to recognize BTN_SYNC action. But upon hardboot of your agenda, you must restart gbm. Since this version of gbm is designed to fork a child upon detecting BTN_SYNC and execute /etc/gbm/on_sync, we must create that file. In my case /etc/gbm/on_sync is a shell script as shown below


rsync /home/default/*.dat

You must connect to your agenda and create this file. I used rsync to copy this file from my machine to agenda. Perhaps you could do the same. Then make sure that you are running rsync server on your machine. My computer has rsync module named pc which defaults to /junk/vr3 directory. My /etc/rsyncd.conf looks as follows

      max connections = 1
      log file = /var/log/rsync.log
      pid file = /var/run/
      [pc] path = /junk/VR3/
            comment = Quick Sync Button Test
            read only=false
            uid = vr3
            gid = staff
            use chroot = no

After this quick sync button should start working.

All and any comments would be appreciated and welcomed <>