Inlined Data::QuickZap()
[barry.git] / man / btool.1
blob7d52efde00573ca4635fb6f3f1ac747cf13cef6f
1 .\"                                      Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH BTOOL 1 "November 21, 2008"
6 .\" Please adjust this date whenever revising the manpage.
7 .\"
8 .\" Some roff macros, for reference:
9 .\" .nh        disable hyphenation
10 .\" .hy        enable hyphenation
11 .\" .ad l      left justify
12 .\" .ad b      justify to both left and right margins
13 .\" .nf        disable filling
14 .\" .fi        enable filling
15 .\" .br        insert line break
16 .\" .sp <n>    insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
18 .SH NAME
19 .B btool
20 \- Barry Project's program to interface with BlackBerry handheld
21 .SH SYNOPSIS
22 .B btool
23 [-B busname][-N devname][-c dn][-C dnattr][-d db [-f file][-r#][-R#]-D#]][-h][-l][-L][-m cmd][-M][-p pin][-P password][-s db -f file][-S][-t][-v][-X][-z][-Z]
24 .SH DESCRIPTION
25 .PP
26 .B btool
27 is a program that communicates with a
28 BlackBerry device over USB; there is no intention to support ancient
29 serial-port BlackBerries.
30 Since the protocols used by BlackBerry are not documented
31 by the manufacturer Research In Motion, this program is
32 experimental and you \fBuse at own risk\fP.
33 Be sure your device is backed up by another program
34 if it contains important data.
35 .SH OPTIONS
36 .TP
37 .B \-B busname
38 Specify the USB bus to search for Blackberry devices on.  This is the
39 first number displayed in the output from the lsusb command, such as 002.
40 If the busname is numeric on your system, 2 and 002 are equal.  See
41 also the \-N option, which can be used together with this option
42 to precisely select the device to work with.
43 .TP
44 .B \-c dn
45 Convert address book database to LDIF format, using the
46 specified dn as the baseDN.  Sends LDIF output to stdout.
47 .TP
48 .B \-C dnattr
49 Spcify LDIF attribute name to use when building the FQDN in the dn attribute.
50 Defaults to 'cn'.  If you modify the mapping with the \-m
51 switch, make sure that the new dnattr exists.
52 .TP
53 .B \-d db
54 Load database 'db' FROM device and dump to stdout.
55 Can be used multiple times to fetch more than one database.  See the -t
56 option for a list of device databases.
57 .TP
58 .B \-e epp
59 Override endpoint pair detection.  'epp' is a single string separated
60 by a comma, holding the read,write endpoint pair.
62 Example: -e 83,5
64 Note: Endpoints are specified in hex.  Use the same numbers given by the
65 lsusb -v output.
67 You should never need to use this option, as endpoints are autodetected.
68 .TP
69 .B \-f file
70 Filename to write or read handheld data to/from.  Used in conjunction with
71 the -d and -s options, respectively.
72 .TP
73 .B \-i charset
74 Specifies the iconv charset to use for converting international strings.
75 The Blackberry uses the WINDOWS-1252 charset, which is incompatible with
76 the more common code pages used in Linux.  The most useful charset to use
77 with this option is UTF-8, and is highly recommended.  Any other charset
78 available via 'iconv --list' can be used here too, but may not be
79 successful for some character conversions.
80 .TP
81 .B \-l
82 Lists attached Blackberry devices, and their PIN numbers.
83 .TP
84 .B \-L
85 List Contact field names.  Each name represents a contact field that the
86 Barry library recognizes.  Use these names with the -m option to adjust
87 the LDIF name to field mapping.
88 .TP
89 .B \-m command
90 Map LDIF name to Contact field, or unmap LDIF name.  To map a new or existing
91 LDIF attribute name to a Barry contact field, use the format 'ldif,read,write'
92 where ldif represents the name of the attribute to map, read is the
93 contact field name used to read data from the record, and write is the
94 contact field name used to write data to the record.
96 To unmap an LDIF name, specify the LDIF attribute alone.
98 For example, to map a new LDIF attribute called "strange" to read from
99 FirstName and write to LastName, use:
101 \-m strange,FirstName,LastName
103 The -m option can be specified multiple times to create the desired mapping.
105 .B \-M
106 List current LDIF mapping to stdout.
108 .B \-N devname
109 Specify the USB device name.  This is the second number displayed in the
110 output from the lsusb command, such as 005.  If the device name is numeric
111 on your system, 5 and 005 are equal.  See also the \-B option.
113 .B \-p pin
114 PIN of device to talk with.  Only needed if you have more than one Blackberry
115 connected at once.
117 .B \-P password
118 Simplistic method to specify device password.  In a real application, this
119 would be done using a more secure prompt.
121 .B \-s db
122 Save database 'db' TO device from data loaded from -f file.  See the -t
123 option for a list of device databases.
125 .B \-S
126 Show list of supported database parsers and builders.  Parsers are used
127 when reading data out of the device, and builders are used when writing
128 data to the device.  If a parser is supported, but its associated builder
129 is not, that means you cannot change the database programmatically, such
130 as with the -s option.
132 .B \-t
133 Show device's database table.
135 .B \-T db
136 Show record state table for given database.
138 .B \-v
139 Dump verbose protocol data during operation.
141 .B \-X
142 Reset device.
144 .B \-z
145 Use non-threaded sockets when communicating with the device.  This is
146 the behaviour seen in versions 0.12 and earlier, since threads were
147 not yet supported.  This option, along with -Z, are for debugging
148 and testing.
150 .B \-Z
151 Use a threaded socket router when communicating with the device.
152 This is the default for btool.  This option, along with -Z, are for
153 debugging and testing.
155 .B \-h, \-\-help
156 Show summary of options.
158 .SH DATABASE COMMAND MODIFIERS
159 The following options modify the -d command option above, and can be used
160 multiple times for more than one record.
162 .B \-r #
163 Fetch specific record, given a record index number as seen in the -T state table.
164 Can be used multiple times to fetch specific records from a single database.
166 .B \-R #
167 Same as -r, but also clears the record's dirty flags.
169 .B \-D #
170 Delete the specified record using the index number as seen in the -T state table.
173 .SH AUTHOR
175 .B btool
176 is part of the Barry project.
177 This manual page was written by Ian Darwin and Chris Frey.
178 .SH SEE ALSO
180 http://www.netdirect.ca/software/packages/barry/index.php
182 Especially the caveats, and the call for developers and others
183 to help with the project.