-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.usb
94 lines (66 loc) · 2.17 KB
/
README.usb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Some notes on running ColdSync with USB support
$Id$
Linux
=====
WARNING: The support via the visor kernel driver
is somewhat deprecated. Please read README.libusb
for the new-and-improved way.
Linux natively supports USB connection at the kernel
level. The kernel module is called visor.o and will expose
the USB connection as a serial one (namely /dev/ttyUSBx
or /dev/tts/usb/x if you use devfs).
The correct way to use it with coldsync is with a
proper listen serial block, just like this one:
listen serial "linux-usb" {
protocol: net;
device: /dev/ttyUSB1;
}
or this one, if you use devfs:
listen serial "linux-usb-devfs" {
protocol: net;
device: /dev/usb/tts/1;
transient;
}
You can then select the right one with
coldsync --listen linux-usb
or
coldsync --listen linux-usb-devfs
For some Handspring Visor units, you have to use
protocol: full;
in your listen serial block.
Linux USB Hotplugging
=====================
The following two-step technique can be used with USB hotplugging
(http://linux-hotplug.sourceforge.net/?selected=usb) to get coldsync to
run on demand.
Add the following listen block to coldsync.conf:
listen serial "hotplug" {
device: "$(PORT)";
protocol: net;
}
Place the following script at /etc/hotplug/usb/visor:
#!/bin/bash
#
# /etc/hotplug/usb/visor
# launch coldsync when a PalmOS device is attached
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
# the sync port is the second tty defined for the device, although
# supposedly some Sony's might use the first port.
PORT=`/bin/ls /sys/${DEVPATH}/|/bin/grep ttyUSB|/usr/bin/tail -1`
export PORT="/dev/usb/${PORT}"
logger "visor: running coldsync on ${PORT}"
/bin/chmod 666 ${PORT}
/usr/local/bin/coldsync -md -v -n hotplug -l /var/log/coldsync.log
fi
That's it. Should just work, but you might need to twiddle with device
permissions. Works for me with Fedora Core 2/Linux 2.6, YMMV. For Fedora
Core 3 (and probably anything with udev), "/dev/usb" no longer works. Use:
export PORT="/dev/${PORT}"
*BSD
====
ColdSync has native support for USB under *BSD.
You can use it with a listen usb block, like this
one:
listen usb "m505" {
}