lib: tweaked tarfile.cc so it skips all directory names
[barry.git] / doc / www / modem.php
blob219c5bc81acf92c6ccdbf70628b51779ad24ca94
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>
23 <? createSubHeader("If You Installed Barry's Binary Packages..."); ?>
25 <p>If you installed Barry's binary packages, specifically barry-util,
26 then default ppp options and chat scripts are installed automatically
27 for you. Currently there are scripts available for the following
28 providers:
29 <ul>
30 <li> AT&amp;T Cingular </li>
31 <li> China Mobile </li>
32 <li> KPN Nederland </li>
33 <li> O2 Ireland </li>
34 <li> Rogers </li>
35 <li> Sprint </li>
36 <li> T-Mobile US </li>
37 <li> Verizon </li>
38 </ul>
39 </p>
41 <p>For example, to run the default Rogers connection script, use the
42 following command as root:</p>
43 <pre>
44 pppd call barry-rogers
45 </pre>
47 <p>If none of the default scripts work, see the Troubleshooting section
48 below.</p>
51 <? createSubHeader("If You Installed Barry From Source..."); ?>
53 <p><b>Configuring PPPD</b></p>
55 <p>Sample configurations are provided in the source tarball, and if you are
56 using a binary package, they should already be installed for you under
57 /etc/ppp/peers and (depending on your system) /etc/chatscripts.</p>
59 <p>Copy the desired options file to /etc/ppp/peers and edit the file,
60 making sure that the paths are referencing the correct files.
61 <ul>
62 <li> <b>pty</b> - must point to the location you installed Barry's
63 pppob program. </li>
64 <li> <b>connect</b> - must use the correct chatscript </li>
65 </ul>
66 </p>
69 <p><b>Establishing a Connection</b></p>
71 <p>If you named your options file "barry-rogers", then to connect to the
72 internet, run:</p>
73 <pre>
74 pppd call barry-rogers
75 </pre>
77 <p>Some systems may provide wrapper scripts for running pppd. For example,
78 Debian uses "pon" and "poff".</p>
82 <? createSubHeader("If Your Device Needs a Password..."); ?>
84 <p>If your device requires a password, you can specify this on the <b>pppob</b>
85 command line. For example, if you are using the <i>barry-rogers</i>
86 PPP script, edit your /etc/ppp/peers/barry-rogers file, so that the
87 <b>pty</b> option says something like this:
88 </p>
89 <pre>
90 pty "/usr/sbin/pppob -P password"
91 </pre>
94 <? createSubHeader("Testing Your Connection"); ?>
96 <p>PPP will display some messages on stdout as it connects. On success,
97 you should see IP address negotiation and the resulting IP address for your
98 machine. PPP will then just wait for network activity.</p>
100 <p>When testing to see if this works, use your web browser. The usual
101 method of using <b>ping</b> does not work reliably, and some providers
102 may have this blocked.</p>
104 <p>Check your routing table to make sure that the new default gateway
105 is there.</p>
106 <pre>
107 /sbin/route -n
108 </pre>
111 <? createSubHeader("Security Concerns"); ?>
113 <p>Depending on your provider, you may or may not have a firewall installed
114 when you connect to the internet through a tethered modem. Keep an eye on
115 your open ports, and remember that connecting to the internet this way
116 may not be the same as the network you are used to.</p>
118 <p>Also keep in mind that if your system is configured to forward packets
119 and you have pppd setup to replace your current default route, and you
120 are still connected to an internal network (say, via ethernet), this could
121 allow outside connections to be routed to your internal network. The
122 default pppd options files installed by Barry do not use the
123 <b>replacedefaultroute</b> setting for this reason. Contact your
124 network administrator for assistance on configuring your mobile
125 network setups.</p>
129 <? createSubHeader("Troubleshooting"); ?>
131 <p>Some devices don't respond to the PPP commands at first, but after
132 the battery is removed and reinserted, modem functionality works. This is
133 likely due to the protocol not being completely understood, but resetting
134 the device in this manner is enough of a workaround to get it working.</p>
136 <p>If you still run into trouble, the first task is to increase debug output
137 and to log it. PPPD supports increased logging if you add the following
138 lines to the options file:</p>
139 <pre>
140 debug
141 nodetach
142 </pre>
144 <p>Barry's <b>pppob</b> program also supports verbose protocol logging.
145 Change your options file and edit the pppob command line. For example,
146 if your pppob is installed in /usr/sbin, set the <b>pty</b> option to:</p>
148 <pre>
149 pty "/usr/sbin/pppob -l /tmp/pppob.log -v"
150 </pre>
152 <p>Be sure to remove these options once you have your connection working,
153 as the above causes your entire internet traffic to be logged to the
154 output file.</p>
156 <p>If your provider is not yet supported by the sample options files,
157 you will need to do a little digging on your own. If you are able to
158 tether your Blackberry using a Windows system, you can duplicate the
159 login information in your chat script.</p>
161 <p>You may also find example configurations for your provider on the
162 various Blackberry forums available online.</p>
164 <p>If you are still having trouble, please send an email to the
165 <a href="http://sourceforge.net/mail/?group_id=153722">mailing list</a>,
166 including:
167 <ul>
168 <li> the version of Barry you are using </li>
169 <li> the output from pppd </li>
170 <li> the log output from pppob </li>
171 <li> the ppp options file and chatscript you used </li>
172 </ul>
173 </p>
175 <p>The logs from pppob can be fairly large, so limit the size to a single
176 run.</p>
179 <? createSubHeader("Connecting via Bluetooth"); ?>
181 <p>If your device has Bluetooth support, it is also possible to tether
182 using Linux's own native Bluetooth serial drivers. There are probably
183 better tutorials on this already on the net, but here are a few notes
184 from Michael Brown to help you get started.</p>
186 <p><b>Bluetooth Config</b></p>
188 <p>Put the following in your /etc/bluetooth/rfcomm.conf file, replacing
189 the X's with your Bluetooth BADDR.</p>
191 <pre>
192 rfcomm0 {
193 bind yes;
194 device XX:XX:XX:XX:XX:XX;
195 channel 1;
196 comment "Blackberry Dialup";
198 </pre>
200 <p><b>PPP Config</b></p>
202 <p>Use the same peer file that you would use for the USB tethering above,
203 but remove the pty line that points to /usr/sbin/pppob. Since you are
204 using the Bluetooth serial port, you don't need pppob. Replace that
205 line with the line of your newly configured rfcomm device. You may
206 also need to specify the baud rate.</p>
208 <pre>
209 /dev/rfcomm0
210 115200
211 </pre>
213 <p><b>Chatscript Config</b></p>
215 <p>No change is required. Use the same chatscript you would use for
216 USB above.</p>
218 <p>Run as usual. For example:</p>
220 <pre>
221 pppd call barry-rogers
222 </pre>