Tarball tree for barry-0.17.0.tar.bz2
[barry.git] / doc / www / modem.html
blob44d57d712bfc6069a0c879d32173eaba418ad3dc
1 <html>
3 <head>
4 <title>Barry Documentation</title>
5 <link rel="stylesheet" type="text/css" href="default.css">
7 </head>
9 <body>
12 <div class='pageHeader'>Using your BlackBerry as a USB Modem</div><img src='nothing.jpg' width='100%' height='5' alt=''><br><div class='linearNav'>
13 <div class="subHeader">Introduction</div>
14 <p>The Blackberry has the ability to act like a Hayes compatible modem,
15 complete with AT commands.</p>
17 <p>In order to make use of this feature you will need the Barry command line
18 tools installed on your system. See the <a href="install.html">Install</a>
19 page for more details.</p>
21 <p>You will need three components to connect to the internet:
22 <ul>
23 <li> a working Barry install, version 0.13 or later </li>
24 <li> a working pppd and matching kernel </li>
25 <li> an options file and chatscript for your Blackberry provider </li>
26 </ul>
27 </p>
30 <div class="subHeader">If You Installed Barry's Binary Packages...</div>
31 <p>If you installed Barry's binary packages, specifically barry-util,
32 then default ppp options and chat scripts are installed automatically
33 for you. Currently there are scripts available for the following
34 providers:
35 <ul>
36 <li> AT&amp;T Cingular </li>
37 <li> China Mobile </li>
38 <li> Fido </li>
39 <li> KPN Nederland </li>
40 <li> O2 Ireland </li>
41 <li> Optus AU </li>
42 <li> Orange Spain </li>
43 <li> Rogers </li>
44 <li> Sprint </li>
45 <li> Telus </li>
46 <li> T-Mobile US </li>
47 <li> Verizon </li>
48 <li> Vodafone AU </li>
49 <li> and a minimalist script for debugging </li>
50 </ul>
51 </p>
53 <p>For example, to run the default Rogers connection script, use the
54 following command as root:</p>
55 <pre>
56 pppd call barry-rogers
57 </pre>
59 <p>If none of the default scripts work, see the Troubleshooting section
60 below.</p>
63 <div class="subHeader">If You Installed Barry From Source...</div>
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 <div class="subHeader">If Your Device Needs a Password...</div>
94 <p>If your device requires a password, you can specify this on the <b>pppob</b>
95 command line. For example, if you are using the <i>barry-rogers</i>
96 PPP script, edit your /etc/ppp/peers/barry-rogers file, so that the
97 <b>pty</b> option says something like this:
98 </p>
99 <pre>
100 pty "/usr/sbin/pppob -P password"
101 </pre>
104 <div class="subHeader">Testing Your Connection</div>
105 <p>PPP will display some messages on stdout as it connects. On success,
106 you should see IP address negotiation and the resulting IP address for your
107 machine. PPP will then just wait for network activity.</p>
109 <p>When testing to see if this works, use your web browser. The usual
110 method of using <b>ping</b> does not work reliably, and some providers
111 may have this blocked.</p>
113 <p>Check your routing table to make sure that the new default gateway
114 is there.</p>
115 <pre>
116 /sbin/route -n
117 </pre>
120 <div class="subHeader">Security Concerns</div>
121 <p>Depending on your provider, you may or may not have a firewall installed
122 when you connect to the internet through a tethered modem. Keep an eye on
123 your open ports, and remember that connecting to the internet this way
124 may not be the same as the network you are used to.</p>
126 <p>Also keep in mind that if your system is configured to forward packets
127 and you have pppd setup to replace your current default route, and you
128 are still connected to an internal network (say, via ethernet), this could
129 allow outside connections to be routed to your internal network. The
130 default pppd options files installed by Barry do not use the
131 <b>replacedefaultroute</b> setting for this reason. Contact your
132 network administrator for assistance on configuring your mobile
133 network setups.</p>
137 <div class="subHeader">Troubleshooting</div>
138 <p>Some devices don't respond to the PPP commands at first, but after
139 the battery is removed and reinserted, modem functionality works. This is
140 likely due to the protocol not being completely understood, but resetting
141 the device in this manner is enough of a workaround to get it working.</p>
143 <p>If you still run into trouble, the first task is to increase debug output
144 and to log it. PPPD supports increased logging if you add the following
145 lines to the options file:</p>
146 <pre>
147 debug
148 nodetach
149 </pre>
151 <p>Barry's <b>pppob</b> program also supports verbose protocol logging.
152 Change your options file and edit the pppob command line. For example,
153 if your pppob is installed in /usr/sbin, set the <b>pty</b> option to:</p>
155 <pre>
156 pty "/usr/sbin/pppob -l /tmp/pppob.log -v"
157 </pre>
159 <p>Be sure to remove these options once you have your connection working,
160 as the above causes your entire internet traffic to be logged to the
161 output file.</p>
163 <p>If your provider is not yet supported by the sample options files,
164 you will need to do a little digging on your own. If you are able to
165 tether your Blackberry using a Windows system, you can duplicate the
166 login information in your chat script.</p>
168 <p>You may also find example configurations for your provider on the
169 various Blackberry forums available online.</p>
171 <p>If you are still having trouble, please send an email to the
172 <a href="http://sourceforge.net/mail/?group_id=153722">mailing list</a>,
173 including:
174 <ul>
175 <li> the version of Barry you are using </li>
176 <li> the output from pppd </li>
177 <li> the log output from pppob </li>
178 <li> the ppp options file and chatscript you used </li>
179 </ul>
180 </p>
182 <p>The logs from pppob can be fairly large, so limit the size to a single
183 run.</p>
186 <div class="subHeader">Connecting via Bluetooth</div>
187 <p>If your device has Bluetooth support, it is also possible to tether
188 using Linux's own native Bluetooth serial drivers. There are probably
189 better tutorials on this already on the net, but here are a few notes
190 from Michael Brown to help you get started.</p>
192 <p><b>Bluetooth Config</b></p>
194 <p>Put the following in your /etc/bluetooth/rfcomm.conf file, replacing
195 the X's with your Bluetooth BADDR.</p>
197 <pre>
198 rfcomm0 {
199 bind yes;
200 device XX:XX:XX:XX:XX:XX;
201 channel 1;
202 comment "Blackberry Dialup";
204 </pre>
206 <p><b>PPP Config</b></p>
208 <p>Use the same peer file that you would use for the USB tethering above,
209 but remove the pty line that points to /usr/sbin/pppob. Since you are
210 using the Bluetooth serial port, you don't need pppob. Replace that
211 line with the line of your newly configured rfcomm device. You may
212 also need to specify the baud rate.</p>
214 <pre>
215 /dev/rfcomm0
216 115200
217 </pre>
219 <p><b>Chatscript Config</b></p>
221 <p>No change is required. Use the same chatscript you would use for
222 USB above.</p>
224 <p>Run as usual. For example:</p>
226 <pre>
227 pppd call barry-rogers
228 </pre>
231 <div class="Copyright">Copyright &copy; 2011 - Net Direct Inc.</div>
233 </body>
234 </html>