1BTOOL(1) General Commands Manual BTOOL(1)
2
3
4
6 btool - Barry Project's program to interface with BlackBerry handheld
7
9 btool [-B busname][-N devname][-a db][-c dn][-C dnattr][-d db [-f
10 file][-r#][-R#]-D#]][-h][-i charset][-l][-L][-m cmd][-M][-p pin][-P
11 password][-s db -f file][-S][-t][-v][-V][-X][-z][-Z]
12
14 btool is a program that communicates with a BlackBerry device over USB;
15 there is no intention to support ancient serial-port BlackBerries.
16 Since the protocols used by BlackBerry are not documented by the manu‐
17 facturer Research In Motion, this program is experimental and you use
18 at own risk. Be sure your device is backed up by another program if it
19 contains important data.
20
22 -B busname
23 Specify the USB bus to search for Blackberry devices on. This
24 is the first number displayed in the output from the lsusb com‐
25 mand, such as 002. If the busname is numeric on your system, 2
26 and 002 are equal. See also the -N option, which can be used
27 together with this option to precisely select the device to work
28 with.
29
30 -a db Delete all records from specified database. This can be used
31 multiple times to clear multiple databases.
32
33 -c dn Convert address book database to LDIF format, using the speci‐
34 fied dn as the baseDN. Sends LDIF output to stdout.
35
36 -C dnattr
37 Spcify LDIF attribute name to use when building the FQDN in the
38 dn attribute. Defaults to 'cn'. If you modify the mapping with
39 the -m switch, make sure that the new dnattr exists.
40
41 -d db Load database 'db' FROM device and dump to stdout. Can be used
42 multiple times to fetch more than one database. See the -t
43 option for a list of device databases.
44
45 -e epp Override endpoint pair detection. 'epp' is a single string sep‐
46 arated by a comma, holding the read,write endpoint pair.
47
48 Example: -e 83,5
49
50 Note: Endpoints are specified in hex. Use the same numbers
51 given by the lsusb -v output.
52
53 You should never need to use this option, as endpoints are
54 autodetected.
55
56 -f file
57 Filename to write or read handheld data to/from. Used in con‐
58 junction with the -d and -s options, respectively. Note: the
59 file format of this file is not backward compatible between
60 devel releases.
61
62 -i charset
63 Specifies the iconv charset to use for converting international
64 strings. The Blackberry uses the WINDOWS-1252 charset, which is
65 incompatible with the more common code pages used in Linux. The
66 most useful charset to use with this option is UTF-8, and is
67 highly recommended. Any other charset available via 'iconv
68 --list' can be used here too, but may not be successful for some
69 character conversions.
70
71 -I Sort records before dumping them to stdout. This uses the
72 default library sorting order, which is specific to each data‐
73 base.
74
75 -l Lists attached Blackberry devices, and their PIN numbers.
76
77 -L List Contact field names. Each name represents a contact field
78 that the Barry library recognizes. Use these names with the -m
79 option to adjust the LDIF name to field mapping.
80
81 -m command
82 Map LDIF name to Contact field, or unmap LDIF name. To map a
83 new or existing LDIF attribute name to a Barry contact field,
84 use the format 'ldif,read,write' where ldif represents the name
85 of the attribute to map, read is the contact field name used to
86 read data from the record, and write is the contact field name
87 used to write data to the record.
88
89 To unmap an LDIF name, specify the LDIF attribute alone.
90
91 For example, to map a new LDIF attribute called "strange" to
92 read from FirstName and write to LastName, use:
93
94 -m strange,FirstName,LastName
95
96 The -m option can be specified multiple times to create the
97 desired mapping.
98
99 -M List current LDIF mapping to stdout.
100
101 -N devname
102 Specify the USB device name. This is the second number dis‐
103 played in the output from the lsusb command, such as 005. If
104 the device name is numeric on your system, 5 and 005 are equal.
105 See also the -B option.
106
107 -p pin PIN of device to talk with. Only needed if you have more than
108 one Blackberry connected at once.
109
110 -P password
111 Simplistic method to specify device password. In a real appli‐
112 cation, this would be done using a more secure prompt.
113
114 -s db Save database 'db' TO device from data loaded from -f file. See
115 the -t option for a list of device databases.
116
117 -S Show list of supported database parsers and builders. Parsers
118 are used when reading data out of the device, and builders are
119 used when writing data to the device. If a parser is supported,
120 but its associated builder is not, that means you cannot change
121 the database programmatically, such as with the -s option.
122
123 -t Show device's database table.
124
125 -T db Show record state table for given database.
126
127 -v Dump verbose protocol data during operation.
128
129 -V Enable vformat MIME output where available. Address Book gets
130 printed in vCard format, Calendar in vEvent format, Memos in
131 vJournal, and Tasks in vTodo, etc.
132
133 -X Perform a USB reset on the device. Similar to the breset com‐
134 mand, and does a virtual "replug" of the device.
135
136 -z Use non-threaded sockets when communicating with the device.
137 This is the behaviour seen in versions 0.12 and earlier, since
138 threads were not yet supported. This option, along with -Z, are
139 for debugging and testing.
140
141 -Z Use a threaded socket router when communicating with the device.
142 This is the default for btool. This option, along with -Z, are
143 for debugging and testing.
144
145 -h, --help
146 Show summary of options.
147
148
150 The following options modify the -d command option above, and can be
151 used multiple times for more than one record.
152
153 -r # Fetch specific record, given a record index number as seen in
154 the -T state table. Can be used multiple times to fetch spe‐
155 cific records from a single database.
156
157 -R # Same as -r, but also clears the record's dirty flags.
158
159 -D # Delete the specified record using the index number as seen in
160 the -T state table.
161
162
163
165 btool is part of the Barry project. This manual page was written by
166 Ian Darwin and Chris Frey.
167
169 http://www.netdirect.ca/software/packages/barry
170 Especially the caveats, and the call for developers and others to help
171 with the project.
172
173
174
175
176 December 7, 2010 BTOOL(1)