tzwrapper.cc: fixed use of iterator after erase
[barry.git] / doc / www / modem.php
blob70d047eb5888089617681c259232b9e3c23a6de9
1 <? include ("barry.inc"); ?>
3 <? createHeader("Using your BlackBerry as a USB Modem"); ?>
5 <? createSubHeader("Introduction"); ?>
7 <p>The Blackberry has the ability to act like a Hayes compatible modem,
8 complete with AT commands.</p>
10 <p>In order to make use of this feature you will need the Barry command line
11 tools installed on your system. See the <? createLink("install", "Install"); ?>
12 page for more details.</p>
14 <p>You will need three components to connect to the internet:
15 <ul>
16 <li> a working Barry install, version 0.13 or later </li>
17 <li> a working pppd and matching kernel </li>
18 <li> an options file and chatscript for your Blackberry provider </li>
19 </ul>
20 </p>
22 <p>See the <? createLink("desktop", "Barry Desktop"); ?> page for
23 more information on using the GUI to manage the modem.</p>
26 <? createSubHeader("If You Installed Barry's Binary Packages..."); ?>
28 <p>If you installed Barry's binary packages, specifically barry-util,
29 then default ppp options and chat scripts are installed automatically
30 for you. Currently there are scripts available for the following
31 providers:
32 <ul>
33 <li> AT&amp;T Cingular </li>
34 <li> China Mobile </li>
35 <li> Fido </li>
36 <li> KPN Nederland </li>
37 <li> Manitoba's MTS </li>
38 <li> O2 Ireland </li>
39 <li> Optus AU </li>
40 <li> Orange Spain </li>
41 <li> Orange UK </li>
42 <li> Rogers </li>
43 <li> Sprint </li>
44 <li> Telus </li>
45 <li> T-Mobile US </li>
46 <li> Verizon </li>
47 <li> Vodafone AU </li>
48 <li> and a minimalist script for debugging </li>
49 </ul>
50 </p>
52 <p>For example, to run the default Rogers connection script, use the
53 following command as root:</p>
54 <pre>
55 pppd call barry-rogers
56 </pre>
58 <p>If none of the default scripts work, see the Troubleshooting section
59 below.</p>
62 <? createSubHeader("If You Installed Barry From Source..."); ?>
64 <p><b>Configuring PPPD</b></p>
66 <p>Sample configurations are provided in the source tarball, and if you are
67 using a binary package, they should already be installed for you under
68 /etc/ppp/peers and (depending on your system) /etc/chatscripts.</p>
70 <p>Copy the desired options file to /etc/ppp/peers and edit the file,
71 making sure that the paths are referencing the correct files.
72 <ul>
73 <li> <b>pty</b> - must point to the location you installed Barry's
74 pppob program. </li>
75 <li> <b>connect</b> - must use the correct chatscript </li>
76 </ul>
77 </p>
80 <p><b>Establishing a Connection</b></p>
82 <p>If you named your options file "barry-rogers", then to connect to the
83 internet, run:</p>
84 <pre>
85 pppd call barry-rogers
86 </pre>
88 <p>Some systems may provide wrapper scripts for running pppd. For example,
89 Debian uses "pon" and "poff".</p>
93 <? createSubHeader("If Your Device Needs a Password..."); ?>
95 <p>If your device requires a password, you can specify this on the <b>pppob</b>
96 command line. For example, if you are using the <i>barry-rogers</i>
97 PPP script, edit your /etc/ppp/peers/barry-rogers file, so that the
98 <b>pty</b> option says something like this:
99 </p>
100 <pre>
101 pty "/usr/sbin/pppob -P password"
102 </pre>
105 <? createSubHeader("Testing Your Connection"); ?>
107 <p>PPP will display some messages on stdout as it connects. On success,
108 you should see IP address negotiation and the resulting IP address for your
109 machine. PPP will then just wait for network activity.</p>
111 <p>When testing to see if this works, use your web browser. The usual
112 method of using <b>ping</b> does not work reliably, and some providers
113 may have this blocked.</p>
115 <p>Check your routing table to make sure that the new default gateway
116 is there.</p>
117 <pre>
118 /sbin/route -n
119 </pre>
122 <? createSubHeader("Security Concerns"); ?>
124 <p>Depending on your provider, you may or may not have a firewall installed
125 when you connect to the internet through a tethered modem. Keep an eye on
126 your open ports, and remember that connecting to the internet this way
127 may not be the same as the network you are used to.</p>
129 <p>Also keep in mind that if your system is configured to forward packets
130 and you have pppd setup to replace your current default route, and you
131 are still connected to an internal network (say, via ethernet), this could
132 allow outside connections to be routed to your internal network. The
133 default pppd options files installed by Barry do not use the
134 <b>replacedefaultroute</b> setting for this reason. Contact your
135 network administrator for assistance on configuring your mobile
136 network setups.</p>
140 <? createSubHeader("Troubleshooting"); ?>
142 <p>Some devices don't respond to the PPP commands at first, but after
143 the battery is removed and reinserted, modem functionality works. This is
144 likely due to the protocol not being completely understood, but resetting
145 the device in this manner is enough of a workaround to get it working.</p>
147 <p>If you still run into trouble, the first task is to increase debug output
148 and to log it. PPPD supports increased logging if you add the following
149 lines to the options file:</p>
150 <pre>
151 debug
152 nodetach
153 </pre>
155 <p>Barry's <b>pppob</b> program also supports verbose protocol logging.
156 Change your options file and edit the pppob command line. For example,
157 if your pppob is installed in /usr/sbin, set the <b>pty</b> option to:</p>
159 <pre>
160 pty "/usr/sbin/pppob -l /tmp/pppob.log -v"
161 </pre>
163 <p>Be sure to remove these options once you have your connection working,
164 as the above causes your entire internet traffic to be logged to the
165 output file.</p>
167 <p>If your provider is not yet supported by the sample options files,
168 you will need to do a little digging on your own. If you are able to
169 tether your Blackberry using a Windows system, you can duplicate the
170 login information in your chat script.</p>
172 <p>You may also find example configurations for your provider on the
173 various Blackberry forums available online.</p>
175 <p>If you are still having trouble, please send an email to the
176 <a href="http://sourceforge.net/mail/?group_id=153722">mailing list</a>,
177 including:
178 <ul>
179 <li> the version of Barry you are using </li>
180 <li> the output from pppd </li>
181 <li> the log output from pppob </li>
182 <li> the ppp options file and chatscript you used </li>
183 </ul>
184 </p>
186 <p>The logs from pppob can be fairly large, so limit the size to a single
187 run.</p>
190 <? createSubHeader("Connecting via Bluetooth"); ?>
192 <p>If your device has Bluetooth support, it is also possible to tether
193 using Linux's own native Bluetooth serial drivers. There are probably
194 better tutorials on this already on the net, but here are a few notes
195 from Michael Brown to help you get started.</p>
197 <p><b>Bluetooth Config</b></p>
199 <p>Put the following in your /etc/bluetooth/rfcomm.conf file, replacing
200 the X's with your Bluetooth BADDR.</p>
202 <pre>
203 rfcomm0 {
204 bind yes;
205 device XX:XX:XX:XX:XX:XX;
206 channel 1;
207 comment "Blackberry Dialup";
209 </pre>
211 <p><b>PPP Config</b></p>
213 <p>Use the same peer file that you would use for the USB tethering above,
214 but remove the pty line that points to /usr/sbin/pppob. Since you are
215 using the Bluetooth serial port, you don't need pppob. Replace that
216 line with the line of your newly configured rfcomm device. You may
217 also need to specify the baud rate.</p>
219 <pre>
220 /dev/rfcomm0
221 115200
222 </pre>
224 <p><b>Chatscript Config</b></p>
226 <p>No change is required. Use the same chatscript you would use for
227 USB above.</p>
229 <p>Run as usual. For example:</p>
231 <pre>
232 pppd call barry-rogers
233 </pre>