~ubuntu-branches/ubuntu/karmic/pilot-link/karmic

« back to all changes in this revision

Viewing changes to doc/README.libusb

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Rousseau
  • Date: 2007-02-14 23:30:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070214233059-znxrekb2mgjr0mgd
Tags: 0.12.2-1
* New upstream release
 - Closes: #410152 "pilot-link: udev rules need updating"
* debian/control: add Build-Depends: libbluetooth2-dev
 - add bluetooth support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
======================================================================
2
2
README.libusb
3
3
Author: David A. Desrosiers
4
 
Date: Sat Aug 26 18:42:25 EDT 2006
 
4
Updated: Sun Feb  4 15:49:15 EST 2007
5
5
======================================================================
6
6
This README will describe in detail, the process and programs necessary
7
7
to get pilot-link 0.12.0 and later working with libusb on Linux and Mac
10
10
Why do I want to use libusb?
11
11
--------------------------------------------------------------------------
12
12
        libusb is an alternative way of communicating with USB devices
13
 
        on Linux, Unix, Mac OS X and Windows machines. 
 
13
        on Linux, Unix, Mac OS X and Windows machines.
14
14
 
15
15
        In the Linux world, Palm devices using USB would require the
16
 
        Linux kernel's "visor" driver, written and maintained by Greg
17
 
        Kroah-Hartman. A lot of work and testing has been put into the
18
 
        visor driver over the years and it is very solid, but making
19
 
        sure that it remains current with released Palm devices can be
20
 
        problematic.
21
 
 
22
 
        The current version of the visor driver allows you to insert it
 
16
        Linux kernel's "visor" module, written and maintained by Greg
 
17
        Kroah-Hartman. 
 
18
 
 
19
        A lot of work and testing has been put into the visor module
 
20
        over the years and it is very solid, but making sure that it
 
21
        remains current with released Palm devices can be problematic,
 
22
        because the devices coming out are always different and some
 
23
        can require special handling.
 
24
 
 
25
        The current version of the visor module allows you to insert it
23
26
        into the kernel namespace with the proper Palm product and
24
 
        vendor values, so modifying the driver's source code and
25
 
        rebuilding it is no longer necessary as it was early on.
 
27
        vendor values at runtime (described in README.usb), so
 
28
        modifying the module's source code and rebuilding it is no
 
29
        longer necessary as it was with earlier versions of the visor
 
30
        module.
26
31
 
27
 
        Using libusb, you no longer have to use the visor driver, and
28
 
        you can talk directly to the device. In short, libusb requires
29
 
        less maintenance overhead, and is MUCH faster to use with
30
 
        current Palm devices.
 
32
        Using libusb, you no longer have to use the visor module, and
 
33
        you can talk "directly" to the device. In short, libusb
 
34
        requires less maintenance overhead, and is MUCH faster to use
 
35
        with current Palm devices (roughly 200% to 600% faster,
 
36
        depending on your Palm's processor speed and the type of
 
37
        records you are syncronizing across. YMMV, of course.).
31
38
 
32
39
 
33
40
Why is visor so slow? Why is libusb so much faster?
34
41
--------------------------------------------------------------------------
35
42
        In testing, syncronizing a Palm device with libusb has been
36
43
        shown to be anywhere from 200% to 600% faster vs. using the
37
 
        kernel visor driver. The kernel visor driver itself is not
38
 
        "slow", there are just more kernel interfaces to pass through,
39
 
        which slows down the communication between kernel and Palm. 
 
44
        kernel visor module. 
 
45
 
 
46
        The kernel visor module itself is not "slow", there are just
 
47
        more kernel interfaces to pass through, which slows down the
 
48
        communication between kernel and Palm.
40
49
 
41
50
        It has never been optimized for speed, and certainly could be,
42
 
        if someone was interested in doing so.
 
51
        if someone was interested in doing so. The primary maintainer
 
52
        is not.
43
53
 
44
54
 
45
55
Does it work with every device?
46
56
--------------------------------------------------------------------------
47
 
        It works with every device I've personally tested it with. Some
48
 
        devices behave very differently with respect to the "timing"
49
 
        between the point where you hit HotSync and the time libusb
50
 
        recognizes it on the bus, but everything I've used with it
51
 
        seems to work. 
 
57
        It works with every device I've personally tested it with,
 
58
        which isn't saying much. This includes an m505, T2, T3, Treo650
 
59
        and Treo680 device. They all work over libusb without too much
 
60
        trouble at all.
 
61
 
 
62
        Some devices behave very differently with respect to the
 
63
        "timing" between the point where you hit HotSync and the time
 
64
        libusb recognizes it on the bus, but everything I've used with
 
65
        it seems to work once I get a feel for the right timing.
52
66
 
53
67
        Does that mean it will work with every device?  No. We need
54
 
        testers to make sure it works reliably.
 
68
        testers to make sure it works reliably. 
 
69
 
 
70
        If you have a device that doesn't work with libusb, we want to
 
71
        know about it.
55
72
 
56
73
 
57
74
How do I use libusb, assuming I have all the pieces?
58
75
--------------------------------------------------------------------------
59
76
        Simply pass the port of 'usb:' (without the quotes) as the port
60
 
        designation when using any userland conduit found in
61
 
        pilot-link.  Some examples of that are:
 
77
        designation when using any pilot-link or GUI conduits or tools.
 
78
        Some examples of that are:
62
79
 
63
80
           pilot-xfer -p usb: -b $HOME/Palm/backups
64
81
 
69
86
        The same syntax applies when running pilot-link on Mac OS X
70
87
        machines.
71
88
 
 
89
        When you configure J-Pilot, gnome-pilot or KPilot, the port
 
90
        designation of 'usb:' is still the same.
 
91
 
72
92
 
73
93
What are these "pieces" I need?
74
94
--------------------------------------------------------------------------
75
95
        Now things get really interesting. 
76
96
 
77
97
        Below are the necessary programs and versions you'll need.
78
 
        These are the MINIMUM versions you can use.  
79
98
 
80
 
        Anything earlier than these versions WILL NOT work.
 
99
        These are the MINIMUM versions you can use. Anything earlier
 
100
        than these versions WILL NOT work, and will likely cause other
 
101
        problems.
81
102
 
82
103
        - pilot-link....: 0.12.0
83
104
        - libusb........: 0.1
87
108
 
88
109
        You'll also need the 60-libpisock.rules file included in the
89
110
        latest pilot-link release. A copy of the current file can be
90
 
        found at the following URL:
91
 
 
92
 
                http://code.pilot-link.org/60-libpisock.rules
93
 
 
94
 
        Let's go through each program and see what we need here:
 
111
        found at the following URL, and will always be updated to
 
112
        reflect the latest changes or additions:
 
113
 
 
114
                http://cvs.pilot-link.org/index.cgi/doc/60-libpisock.rules
 
115
 
 
116
        Let's go through each item above and see what we need here:
95
117
 
96
118
        pilot-link
97
119
        ---------------------------------------------------
98
120
                First, you'll need to grab a copy of the latest release
99
 
                of pilot-link 0.12.0 or later. libusb does not work
100
 
                with pilot-link v0.11.8, and there's no code in
101
 
                pilot-link 0.11.8 to use libusb, so you can't use that
102
 
                version or anything earlier than that.  
103
 
 
104
 
                You MUST use 0.12.0 or later to use libusb.
 
121
                of pilot-link 0.12.0 or later. libusb does NOT work
 
122
                with pilot-link v0.11.8 or previous versions. There is
 
123
                no code in pilot-link 0.11.8 to use libusb, so you
 
124
                can't use that version or anything earlier than that.
 
125
 
 
126
                You MUST use 0.12.0 or later to use libusb. Stick with
 
127
                the latest public release (and not CVS versions) and
 
128
                you'll be fine. 
 
129
 
 
130
                CVS versions tend to include some unstable code being
 
131
                put there for other developers to test, and may
 
132
                sometimes break, so its best to stick with a public,
 
133
                released version.
105
134
 
106
135
        libusb
107
136
        ---------------------------------------------------
108
137
                libusb should be a part of your current Linux or
109
138
                FreeBSD distribution. If it isn't, you can install it
110
139
                with the standard Linux package management tools for
111
 
                your distribution.
 
140
                your distribution (apt-get, yast2, yum, etc.) 
112
141
 
113
142
                On Debian, this is as simple as: 
114
143
 
123
152
                   yum install libusb libusb libusb-devel
124
153
 
125
154
                Other distributions may vary, but the package names
126
 
                should be similar.
 
155
                should be similar. 
 
156
 
 
157
                Remember, you'll want version 0.1 or later, and make
 
158
                sure you use the one supplied with your distribution.
 
159
                Don't try to build and install your own version from
 
160
                source, unless your distribution uses that method
 
161
                (FreeBSD, Gentoo, LFS)
127
162
 
128
163
        udev
129
164
        ---------------------------------------------------
136
171
                LEAST 0.70 or later. Anything earlier will cause
137
172
                problems, and we cannot support it.
138
173
 
 
174
                BIG FAT WARNING: Do not... I repeat, do NOT try to
 
175
                build and install udev from source. The documentation
 
176
                that comes with it warns against it, and it WILL break
 
177
                things. Don't do it. Use your distributions package for
 
178
                it and you'll be fine.
 
179
 
139
180
 
140
181
How do I configure these pieces on Linux?
141
182
--------------------------------------------------------------------------
142
183
        Easy!
143
184
 
144
185
        Assuming you have all of the prerequisites above, and have
145
 
        compiled (but NOT installed) pilot-link 0.12.0 against libusb,
146
 
        and that it reported a successful libusb implementation at
147
 
        configure time, you can proceed.
 
186
        compiled (but NOT installed!) pilot-link 0.12.0 against libusb
 
187
        (described below, don't worry), and that it reported a
 
188
        successful libusb implementation at configure time, you can
 
189
        proceed.
148
190
 
149
191
        setting up the rules file for udev
150
192
        ---------------------------------------------------
151
193
                We need to configure and restart udev first, and since
152
194
                its the easiest of the pieces, we'll start there.
153
195
 
154
 
                Put the 60-libpisock.rules file in
155
 
                /etc/udev/rules.d/ and restart udev.
 
196
                Put the 60-libpisock.rules file that came with your
 
197
                pilot-link release in '/etc/udev/rules.d/' and restart
 
198
                udev.
156
199
 
157
 
                Check that the file was read by udev by looking at the
158
 
                udev logs in /var/log (if you log, if not, enable
159
 
                logging in /etc/udev/udev.conf and restart udev to
160
 
                verify), or use the following to enable logging at
161
 
                runtime:
 
200
                Check that the file was read and parsed by udev by
 
201
                looking at the udev logs in /var/log (if you log, if
 
202
                not, enable logging in /etc/udev/udev.conf and restart
 
203
                udev to verify), or use the following to enable logging
 
204
                at runtime:
162
205
 
163
206
                        udevcontrol log_priority="debug"
164
207
 
 
208
                Check that it saw the new file and has correctly parsed
 
209
                it.
 
210
 
165
211
        mount the kernel's usbfs
166
212
        ---------------------------------------------------
167
213
                Make sure you have usbfs mounted, which can be found in
176
222
                applications still use /proc/bus/usb, so we'll mount it
177
223
                until that gets deprecated.
178
224
 
179
 
        blacklist the kernel visor driver
 
225
        blacklist the kernel visor module
180
226
        ---------------------------------
181
227
                In order to use libusb, you'll want to make sure the
182
 
                kernel "visor" driver does NOT load when it sees a Palm
183
 
                device connecting to the USB root hub on your system.
 
228
                kernel "visor" module does not automatically load when
 
229
                it sees a Palm device connecting to the USB root hub on
 
230
                your system.
184
231
 
185
232
                udev method (for newer udev versions, no hotplug)
186
233
                -------------------------------------------------
187
234
                If your udev is new enough and you no longer use
188
235
                hotplug, you can use the following process to blacklist
189
 
                the visor driver:
190
 
 
191
 
                Simply add 'blacklist visor' to
192
 
                /etc/modprobe.d/blacklist-palm. If that file doesn't
193
 
                exist, create it.
 
236
                the visor module:
 
237
 
 
238
                Simply add the two words 'blacklist visor' (without
 
239
                quotes) to a new file called:
 
240
 
 
241
                        /etc/modprobe.d/blacklist-palm
 
242
 
 
243
                If that file doesn't exist, create it and put the
 
244
                one-line entry into it.
194
245
 
195
246
                older method (for systems still using hotplug)
196
247
                -------------------------------------------------
197
248
                You can blacklist list by adding 'visor' to the
198
249
                /etc/hotplug/blacklist file to stop hotplug from
199
 
                loading it at connect time. Restart hotplug to re-read
200
 
                the blacklist file.
 
250
                loading it at connect time. 
 
251
 
 
252
                Don't forget to restart hotplug to re-read the
 
253
                blacklist file.
201
254
 
202
255
        pilot-link
203
256
        ---------------------------------------------------
209
262
                  Direct USB support...... : yes, libusb
210
263
 
211
264
                If you do not see that, you are missing some critical
212
 
                build dependency. Check config.log, search for libusb
213
 
                and see what went wrong. Remember, you'll need the
214
 
                libusb headers to build the support into pilot-link for
215
 
                it, not the runtime. This will be a libusb-dev or
216
 
                libusb-devel package on most distributions.
 
265
                build dependency (such as the libusb development
 
266
                package, which includes the necessary header files to
 
267
                provide this support). 
 
268
 
 
269
                Check config.log, search for libusb and see what went
 
270
                wrong. Remember, you'll need the libusb headers to
 
271
                build the support into pilot-link for it, not the
 
272
                runtime. This will be a libusb-dev or libusb-devel
 
273
                package on most distributions.
 
274
 
217
275
 
218
276
How do I configure these pieces on OS X?
219
277
--------------------------------------------------------------------------
258
316
        receive one.
259
317
 
260
318
        That's it. If you get any sort of error or other problem, make
261
 
        sure the visor driver is truly unloaded (rmmod visor, as root),
 
319
        sure the visor module is truly unloaded (rmmod visor, as root),
262
320
        make sure udev and hotplug are restarted, make sure your
263
321
        pilot-link is the right version (built with libusb support),
264
322
        and make sure your .rules file is in the right place for your
281
339
        pilot-link irc channel
282
340
        ------------------------------------------------------
283
341
        We can also be found on irc, at irc.pilot-link.org in the
284
 
        #channel pilot-link
 
342
        channel #pilot-link
285
343
 
286
344
        If your irc client supports SSL, you can point to port 994 on
287
 
        irc.pilot-link.org and have a secured session (no cleartext).
288
 
        If you cannot, use port 6667 for "normal" irc.
 
345
        irc.pilot-link.org and have a secured session (no cleartext). 
 
346
 
 
347
        If you cannot use SSL, use port 6667 for "normal" irc.
289
348
 
290
349
        Lastly, I can be reached directly at desrod@gnu-designs.com if
291
350
        nothing else works for you. Try the mailing lists and irc first
292
 
        though.
 
351
        though, as I might be hard to reach at times.
293
352
 
294
353
 
295
354
Donating to pilot-link
316
375
 
317
376
        Florent Pillet, "fpillet" on irc, for helping fix up libpisock
318
377
        to work on OSX and doing testing on newer devices to work out
319
 
        the various Heisenbergs found in there.
 
378
        the various Heisenbergs found in there. His work has been
 
379
        invaluable over the last year or two with usb, devices and OS X
 
380
        support.
320
381
 
321
382
        Zephania Hull, "Mercury" on irc for spending the time and
322
383
        effort to get libusb worked out on the Linux side. Without his
323
384
        effort, libusb wouldn't be where it is today.
 
385
 
 
386
        Other thanks go to Knghtbird, Nicholas Piper, Adriaan de Groot,
 
387
        John Marshall, Kenneth Albanowski and many others through the
 
388
        years for helping bring this to where it is today. If I've
 
389
        forgotten to mention you, just let me know.
 
390