SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Some notes on running ColdSync as a daemon

$Id: README.daemon,v 2.1 2001/05/24 05:38:06 arensb Exp $

Introduction

ColdSync can be run as a daemon. This allows one-button operation: just plunk your Palm into its cradle and push the HotSync button.

There are three main ways of setting this up, depending on how you want to connect to the Palm:

  • For a serial connection, ColdSync behaves in a getty-like manner. Setting it up is similar to setting up a dumb terminal on a serial line, or incoming PPP.
  • For a USB connection under FreeBSD, you'll need to add an entry to /etc/usbd.conf .
  • To accept incoming connections over the network, you'll need to add an entry to /etc/inetd.conf .

These connection types are not mutually-exclusive. A given machine can support all three simultaneously, including multiple serial connections.

Actually, ColdSync doesn't really run as a standalone daemon. Rather, it allows standard Unix utilities to connect it to a Palm. But I still like the phrase "daemon mode."

Common Setup


For all three connection types, you'll need to set up two configuration files: /usr/local/etc/coldsync.conf and

/usr/local/etc/palms.

The first configuration file, /usr/local/etc/coldsync.conf , is optional, but it's a good idea to set it up anyway. Its format is the same as that of ~/.coldsyncrc, which is described in coldsync(8). This file allows you to specify conduits to run on each Palm at your site. In addition, you can prevent users from running their own conduits on certain database types, or any conduits at all.

The second config file is /usr/local/etc/palms . This file is also described in coldsync(8). It

  • maps Palm devices to users, i.e., it specifies that before syncing a Palm with serial number X, username Y, and userid Z, it should first setuid() to Unix user U.
  • allows you to specify a configuration file to use other than ~user/.coldsyncrc . This allows you to override users' preferences.

Serial Connection


To set up a serial connection, treat ColdSync as you would 'getty'. If you're not sure what this means, the man page for getty(8) should mention a configuration file in /etc that you'll need to edit. Under FreeBSD and other BSD variants, this file is /etc/ttys, though it may be /etc/ttytab or something else on your machine. Under System V derivatives, you'll need to edit /etc/inittab.

  • FreeBSD:

Add a line similar to the following to /etc/ttys:

ttyd0 "/usr/local/bin/coldsync -md -t serial -s" unknown on

Replace "ttyd0" with the appropriate device. If you use /dev/cuaa2 in standalone mode, then you'll need to use "ttyd2" here.

Once this is done, you'll need to

# kill -HUP 1

to tell 'init' to reread /etc/ttys . Watch for

getty repeating too quickly on port ...

messages on the console: this is a sign that ColdSync didn't start up properly. To debug this, try running ColdSync as root the same way as specified in /etc/ttys, with the device as the last argument, e.g.:

# /usr/local/bin/coldsync -md -t serial -s ttyd0

USB Connection


  • Linux:

Under Linux, the connection is done through /dev/ttyUSB<n>, which really behaves like a serial connection. See "Serial Connection", above.

  • FreeBSD:

Under FreeBSD, the 'usbd' daemon can spawn ColdSync. You'll need to add the following entry to /etc/usbd.conf:

        device "Handspring Visor"
                vendor 0x082d
                product 0x0100
                release 0x0100
                attach "/usr/local/bin/coldsync -md -t usb -s ${DEVNAME}"

then kill and restart 'usbd'.

Network Connection


This is by far the flakiest connection type, but you're welcome to play with it.

A network connection allows your machine to accept incoming HotSync requests. A Palm can have a "primary PC." If you sync on some machine other than your primary PC, the host on which you're syncing can forward the connection to your primary PC.

ColdSync can be run from inetd. To set this up, you'll need to edit two files: /etc/services and /etc/inetd.conf .

/etc/services (or /etc/inet/services under Solaris): Add the following two lines:

        netsync-wakeup  14237/udp       # Palm network hotsync wakeup
        netsync         14238/tcp       # Palm network hotsync data

unfortunately, as of this writing, the IANA has not assigned names for these ports, so the names "netsync-wakeup" and "netsync" are made up.

/etc/inetd.conf: Add the following line:

netsync-wakeup dgram udp wait root /usr/local/bin/coldsync coldsync -md -t net -s -

then kill -HUP inetd.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.