https://wiki.archlinux.org/api.php?action=feedcontributions&user=Usv&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:10:19ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=46508Bluetooth GPRS Howto2008-07-27T10:11:27Z<p>Usv: added switch to speicfy bt address</p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
<br />
This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you haven't): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search --bdaddr 00:19:79:89:13:8E DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. Check also that you are reading the right results; the bluetooth hardware address must match your phone's.</li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/bluetooth/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. It should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (substitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immediately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
<li>Now you need scripts to actually use the phone's modem and call your ISP. My ISP is the Finnish saunalahti, mainly because of it's predefined fee for unlimited data access. You must substitute saunalahti for your ISP accordingly through the rest of the document. First we edit the modem setup script for my isp. I'm using script named /etc/ppp/peers/saunalahti and having the following content: <pre>show-password <br />
noauth<br />
/dev/rfcomm0<br />
115200<br />
connect /etc/ppp/peers/saunalahti-connect<br />
disconnect /etc/ppp/peers/saunalahti-disconnect<br />
defaultroute<br />
#replacedefaultroute<br />
noipdefault <br />
#nodetach<br />
usepeerdns<br />
crtscts<br />
local<br />
ipcp-accept-local<br />
#lcp-echo-interval 0<br />
maxfail 10<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
#lcp-max-configure 0<br />
#lcp-max-failure 10000<br />
#lcp-max-terminate 0<br />
#lcp-restart 30000 <br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
linkname saunalahti<br />
mtu 1500<br />
mru 1500</pre> Some remarks: You should possibly first uncomment the nodetach-option, so you can track, whether the call succeeds. Without the option you just get no confirmation. The lines starting with "connect" and "disconnect" are locations for connect and disconnect chat scripts. Chat scripts are used to "talk" with the modem. Lets take a look at them next. </li><br />
<li>Now, we edit the connect script. Mine is at /etc/ppp/peers/saunalahti-connect and is like the following: <pre>#!/bin/sh<br />
exec chat \<br />
TIMEOUT 5 \<br />
ECHO ON \<br />
ABORT '\nBUSY\r' \<br />
ABORT '\nERROR\r' \<br />
ABORT '\nNO ANSWER\r' \<br />
ABORT '\nNO CARRIER\r' \<br />
ABORT '\nNO DIALTONE\r' \<br />
ABORT '\nRINGING\r\n\r\nRINGING\r' \<br />
'' \rAT \<br />
TIMEOUT 12 \<br />
SAY "Press CTRL-C to close the connection at any stage!" \<br />
SAY "\ndefining PDP context...\n" \<br />
OK ATH \<br />
OK ATE1 \<br />
OK 'AT+CGDCONT=1,"IP","internet.saunalahti","",0,0' \<br />
OK ATD*99# \<br />
TIMEOUT 22 \<br />
SAY "\nwaiting for connect...\n" \<br />
CONNECT "" \<br />
SAY "\nConnected." \<br />
SAY "\nIf the following ppp negotiations fail,\n" \<br />
SAY "try restarting the phone.\n"</pre>Also some remarks about these: In the place of internet.saunalahti you should have your mobile operators access point name. That can be checked from Settings->Connection->Access points . Hilight the Internet access point and select edit. Go down to section "Access point name". There you have it. One more thing. The modem command "ATD*99#"'s number "*99#" is a special number (at least in Nokia phones) which is used to "call to Internet access point". Pretty clever I'd say; no fiddling around with actual numbers, let the phone handle everything behind the scenes.</li><br />
<li>Edit the disconnect script (mine's is in /etc/ppp/peers/saunalahti-disconnect). You should have something like this: <pre>#!/bin/sh<br />
exec /usr/sbin/chat -V -s -S \<br />
ABORT "BUSY" \<br />
ABORT "ERROR" \<br />
ABORT "NO DIALTONE" \<br />
SAY "\nSending break to the modem\n" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
SAY "\nPDP context detached\n"</pre></li><br />
<li>Set executable atribute for files saunalahti-connect and saunalahti-disconnect<pre>chmod +x /etc/ppp/peers/saunalahti*connect</pre></li><br />
<li>Ok, you have completely set up bluetooth + gprs connection. Yay! Next thing to do is to test it. If you let the "nodetach" option uncommented in section 12, running (again, substitute yourisp for, well your ISP :) <pre>pon yourisp</pre> should return something like this: <pre>Press CTRL-C to close the connection at any stage!<br />
defining PDP context...<br />
rAT<br />
OK<br />
ATH<br />
OK<br />
ATE1<br />
OK<br />
AT+CGDCONT=1,"IP","internet.saunalahti","",0,0<br />
OK<br />
waiting for connect...<br />
<br />
ATD*99#<br />
CONNECT<br />
Connected.<br />
If the following ppp negotiations fail,<br />
try restarting the phone.<br />
<br />
Serial connection established.<br />
Using interface ppp0<br />
Connect: ppp0 <--> /dev/rfcomm0<br />
kernel does not support PPP filtering<br />
Cannot determine ethernet address for proxy ARP<br />
local IP address 85.77.231.188<br />
remote IP address 10.6.6.6<br />
primary DNS address 195.197.54.100<br />
secondary DNS address 195.74.0.47</pre> If the output is something similar, you have a working connection . If this is the case, you can press ctrl-c to abort the connection and uncomment the "nodetach" option from section 12. Later when you want connection, you can just run <pre>pon yourisp</pre> and when disconnecting <pre>poff yourisp</pre>.<br />
<li>Add "dbus bluetooth" to the DAEMONS section in /etc/rc.conf so you can connect more easily after reboot.</li><br />
<li>All done, enjoy!</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=40004Bluetooth GPRS Howto2008-04-20T22:53:33Z<p>Usv: added connect script location</p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
<br />
This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you haven't): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. Check also that you are reading the right results; the bluetooth hardware address must match your phone's.</li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/bluetooth/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. It should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (substitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immediately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
<li>Now you need scripts to actually use the phone's modem and call your ISP. My ISP is the Finnish saunalahti, mainly because of it's predefined fee for unlimited data access. You must substitute saunalahti for your ISP accordingly through the rest of the document. First we edit the modem setup script for my isp. I'm using script named /etc/ppp/peers/saunalahti and having the following content: <pre>show-password <br />
noauth<br />
/dev/rfcomm0<br />
115200<br />
connect /etc/ppp/peers/saunalahti-connect<br />
disconnect /etc/ppp/peers/saunalahti-disconnect<br />
defaultroute<br />
#replacedefaultroute<br />
noipdefault <br />
#nodetach<br />
usepeerdns<br />
crtscts<br />
local<br />
ipcp-accept-local<br />
#lcp-echo-interval 0<br />
maxfail 10<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
#lcp-max-configure 0<br />
#lcp-max-failure 10000<br />
#lcp-max-terminate 0<br />
#lcp-restart 30000 <br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
linkname saunalahti<br />
mtu 1500<br />
mru 1500</pre> Some remarks: You should possibly first uncomment the nodetach-option, so you can track, whether the call succeeds. Without the option you just get no confirmation. The lines starting with "connect" and "disconnect" are locations for connect and disconnect chat scripts. Chat scripts are used to "talk" with the modem. Lets take a look at them next. </li><br />
<li>Now, we edit the connect script. Mine is at /etc/ppp/peers/saunalahti-connect and is like the following: <pre>#!/bin/sh<br />
exec chat \<br />
TIMEOUT 5 \<br />
ECHO ON \<br />
ABORT '\nBUSY\r' \<br />
ABORT '\nERROR\r' \<br />
ABORT '\nNO ANSWER\r' \<br />
ABORT '\nNO CARRIER\r' \<br />
ABORT '\nNO DIALTONE\r' \<br />
ABORT '\nRINGING\r\n\r\nRINGING\r' \<br />
'' \rAT \<br />
TIMEOUT 12 \<br />
SAY "Press CTRL-C to close the connection at any stage!" \<br />
SAY "\ndefining PDP context...\n" \<br />
OK ATH \<br />
OK ATE1 \<br />
OK 'AT+CGDCONT=1,"IP","internet.saunalahti","",0,0' \<br />
OK ATD*99# \<br />
TIMEOUT 22 \<br />
SAY "\nwaiting for connect...\n" \<br />
CONNECT "" \<br />
SAY "\nConnected." \<br />
SAY "\nIf the following ppp negotiations fail,\n" \<br />
SAY "try restarting the phone.\n"</pre>Also some remarks about these: In the place of internet.saunalahti you should have your mobile operators access point name. That can be checked from Settings->Connection->Access points . Hilight the Internet access point and select edit. Go down to section "Access point name". There you have it. One more thing. The modem command "ATD*99#"'s number "*99#" is a special number (at least in Nokia phones) which is used to "call to Internet access point". Pretty clever I'd say; no fiddling around with actual numbers, let the phone handle everything behind the scenes.</li><br />
<li>Edit the disconnect script (mine's is in /etc/ppp/peers/saunalahti-disconnect). You should have something like this: <pre>#!/bin/sh<br />
exec /usr/sbin/chat -V -s -S \<br />
ABORT "BUSY" \<br />
ABORT "ERROR" \<br />
ABORT "NO DIALTONE" \<br />
SAY "\nSending break to the modem\n" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
SAY "\nPDP context detached\n"</pre></li><br />
<li>Ok, you have completely set up bluetooth + gprs connection. Yay! Next thing to do is to test it. If you let the "nodetach" option uncommented in section 12, running (again, substitute yourisp for, well your ISP :) <pre>pon yourisp</pre> should return something like this: <pre>Press CTRL-C to close the connection at any stage!<br />
defining PDP context...<br />
rAT<br />
OK<br />
ATH<br />
OK<br />
ATE1<br />
OK<br />
AT+CGDCONT=1,"IP","internet.saunalahti","",0,0<br />
OK<br />
waiting for connect...<br />
<br />
ATD*99#<br />
CONNECT<br />
Connected.<br />
If the following ppp negotiations fail,<br />
try restarting the phone.<br />
<br />
Serial connection established.<br />
Using interface ppp0<br />
Connect: ppp0 <--> /dev/rfcomm0<br />
kernel does not support PPP filtering<br />
Cannot determine ethernet address for proxy ARP<br />
local IP address 85.77.231.188<br />
remote IP address 10.6.6.6<br />
primary DNS address 195.197.54.100<br />
secondary DNS address 195.74.0.47</pre> If the output is something similar, you have a working connection . If this is the case, you can press ctrl-c to abort the connection and uncomment the "nodetach" option from section 12. Later when you want connection, you can just run <pre>pon yourisp</pre> and when disconnecting <pre>poff yourisp</pre>.<br />
<li>Add "dbus bluetooth" to the DAEMONS section in /etc/rc.conf so you can connect more easily after reboot.</li><br />
<li>All done, enjoy!</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=40002Bluetooth GPRS Howto2008-04-20T22:20:50Z<p>Usv: fixed typo</p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
<br />
This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you haven't): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. Check also that you are reading the right results; the bluetooth hardware address must match your phone's.</li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/bluetooth/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. It should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (substitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immediately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
<li>Now you need scripts to actually use the phone's modem and call your ISP. My ISP is the Finnish saunalahti, mainly because of it's predefined fee for unlimited data access. You must substitute saunalahti for your ISP accordingly through the rest of the document. First we edit the modem setup script for my isp. I'm using script named /etc/ppp/peers/saunalahti and having the following content: <pre>show-password <br />
noauth<br />
/dev/rfcomm0<br />
115200<br />
connect /etc/ppp/peers/saunalahti-connect<br />
disconnect /etc/ppp/peers/saunalahti-disconnect<br />
defaultroute<br />
#replacedefaultroute<br />
noipdefault <br />
#nodetach<br />
usepeerdns<br />
crtscts<br />
local<br />
ipcp-accept-local<br />
#lcp-echo-interval 0<br />
maxfail 10<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
#lcp-max-configure 0<br />
#lcp-max-failure 10000<br />
#lcp-max-terminate 0<br />
#lcp-restart 30000 <br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
linkname saunalahti<br />
mtu 1500<br />
mru 1500</pre> Some remarks: You should possibly first uncomment the nodetach-option, so you can track, whether the call succeeds. Without the option you just get no confirmation. The lines starting with "connect" and "disconnect" are locations for connect and disconnect chat scripts. Chat scripts are used to "talk" with the modem. Lets take a look at them next. </li><br />
<li>Now, we edit the connect script. Mine is as the following: <pre>#!/bin/sh<br />
exec chat \<br />
TIMEOUT 5 \<br />
ECHO ON \<br />
ABORT '\nBUSY\r' \<br />
ABORT '\nERROR\r' \<br />
ABORT '\nNO ANSWER\r' \<br />
ABORT '\nNO CARRIER\r' \<br />
ABORT '\nNO DIALTONE\r' \<br />
ABORT '\nRINGING\r\n\r\nRINGING\r' \<br />
'' \rAT \<br />
TIMEOUT 12 \<br />
SAY "Press CTRL-C to close the connection at any stage!" \<br />
SAY "\ndefining PDP context...\n" \<br />
OK ATH \<br />
OK ATE1 \<br />
OK 'AT+CGDCONT=1,"IP","internet.saunalahti","",0,0' \<br />
OK ATD*99# \<br />
TIMEOUT 22 \<br />
SAY "\nwaiting for connect...\n" \<br />
CONNECT "" \<br />
SAY "\nConnected." \<br />
SAY "\nIf the following ppp negotiations fail,\n" \<br />
SAY "try restarting the phone.\n"</pre>Also some remarks about these: In the place of internet.saunalahti you should have your mobile operators access point name. That can be checked from Settings->Connection->Access points . Hilight the Internet access point and select edit. Go down to section "Access point name". There you have it. One more thing. The modem command "ATD*99#"'s number "*99#" is a special number (at least in Nokia phones) which is used to "call to Internet access point". Pretty clever I'd say; no fiddling around with actual numbers, let the phone handle everything behind the scenes.</li><br />
<li>Edit the disconnect script (mine's is in /etc/ppp/peers/saunalahti-disconnect). You should have something like this: <pre>#!/bin/sh<br />
exec /usr/sbin/chat -V -s -S \<br />
ABORT "BUSY" \<br />
ABORT "ERROR" \<br />
ABORT "NO DIALTONE" \<br />
SAY "\nSending break to the modem\n" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
SAY "\nPDP context detached\n"</pre></li><br />
<li>Ok, you have completely set up bluetooth + gprs connection. Yay! Next thing to do is to test it. If you let the "nodetach" option uncommented in section 12, running (again, substitute yourisp for, well your ISP :) <pre>pon yourisp</pre> should return something like this: <pre>Press CTRL-C to close the connection at any stage!<br />
defining PDP context...<br />
rAT<br />
OK<br />
ATH<br />
OK<br />
ATE1<br />
OK<br />
AT+CGDCONT=1,"IP","internet.saunalahti","",0,0<br />
OK<br />
waiting for connect...<br />
<br />
ATD*99#<br />
CONNECT<br />
Connected.<br />
If the following ppp negotiations fail,<br />
try restarting the phone.<br />
<br />
Serial connection established.<br />
Using interface ppp0<br />
Connect: ppp0 <--> /dev/rfcomm0<br />
kernel does not support PPP filtering<br />
Cannot determine ethernet address for proxy ARP<br />
local IP address 85.77.231.188<br />
remote IP address 10.6.6.6<br />
primary DNS address 195.197.54.100<br />
secondary DNS address 195.74.0.47</pre> If the output is something similar, you have a working connection . If this is the case, you can press ctrl-c to abort the connection and uncomment the "nodetach" option from section 12. Later when you want connection, you can just run <pre>pon yourisp</pre> and when disconnecting <pre>poff yourisp</pre>.<br />
<li>Add "dbus bluetooth" to the DAEMONS section in /etc/rc.conf so you can connect more easily after reboot.</li><br />
<li>All done, enjoy!</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=29616Sharing ppp connection with wlan interface2007-09-20T12:14:54Z<p>Usv: fixed interface name</p>
<hr />
<div>[[Category:Networking (English)]]<br />
<br />
==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# The iptables program which is used to manipulate how data is passed through your machine from your clients and back (package iptables)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using [[Bluetooth_GPRS_Howto|bluetooth+gprs]] to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
<br />
<ol><br />
<li>Set the ppp connection up.</li><br />
<li>Set the wlan connection up. Choose ssid and select ad-hoc as network type. In the following I'm assuming that you are using interface named wlan0 . Set the wlan interface up address for example 192.168.0.254 . Setting up the interface is usually done by running the iwconfig program as root, with syntax like: <pre>iwconfig wlan0 essid "My_Free_Wlan" mode Ad-Hoc</pre> After that you can assign an ip address to the interface as usual, by running (again, as root): <pre>ifconfig wlan0 192.168.0.254</pre> Please note that different wlan cards may be configured differently and one should adapt this documentation accordingly.<br />
<li>Set the kernel to router mode. This is done by running as root: <pre>echo 1 > /proc/sys/net/ipv4/ip_forward</pre></li><br />
<li>Configure dnsmasqd. Make the following changes to /etc/dnsmasq.conf (uncomment if necessary): <pre><br />
domain-needed<br />
bogus-priv<br />
interface=wlan0 (or whatever interface your wlan is)<br />
dhcp-range=192.168.0.1,192.168.0.100,12h<br />
</pre></li><br />
<li>Start the dnsmasqd, as root: <pre>/etc/rc.d/dnsmasq start</pre></li><br />
<li>Finally, set firewall to forward connections to and from the Internet for clients connecting to your wlan. This is done by issuing (you guessed it right, as root again): <pre>iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</pre> In the above the ppp0 interface is the used ppp interface, you can substitute it for yours if needed.</li><br />
<li>You are done! Happy surfing</li><br />
</ol><br />
<br />
{{Warnbox|The previous configuration has no security options enabled!<br>If you are using firewall, you should adapt this documentation to suit your needs.<br>Same applies also to setting up keys for wlan interface.}}</div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27713Sharing ppp connection with wlan interface2007-08-11T09:33:21Z<p>Usv: added link to bluetooth gprs howto</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# The iptables program which is used to manipulate how data is passed through your machine from your clients and back (package iptables)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using [[Bluetooth_GPRS_Howto|bluetooth+gprs]] to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
<br />
<ol><br />
<li>Set the ppp connection up.</li><br />
<li>Set the wlan connection up. Choose ssid and select ad-hoc as network type. In the following I'm assuming that you are using interface named wlan0 . Set the wlan interface up address for example 192.168.0.254 . Setting up the interface is usually done by running the iwconfig program as root, with syntax like: <pre>iwconfig wlan0 essid "My_Free_Wlan" mode Ad-Hoc</pre> After that you can assign an ip address to the interface as usual, by running (again, as root): <pre>ifconfig wlan0 192.168.0.254</pre> Please note that different wlan cards may be configured differently and one should adapt this documentation accordingly.<br />
<li>Set the kernel to router mode. This is done by running as root: <pre>echo 1 > /proc/sys/net/ipv4/ip_forward</pre></li><br />
<li>Configure dnsmasqd. Make the following changes to /etc/dnsmasq.conf (uncomment if necessary): <pre><br />
domain-needed<br />
bogus-priv<br />
interface=ra0 (or whatever interface your wlan is)<br />
dhcp-range=192.168.0.1,192.168.0.100,12h<br />
</pre></li><br />
<li>Start the dnsmasqd, as root: <pre>/etc/rc.d/dnsmasq start</pre></li><br />
<li>Finally, set firewall to forward connections to and from the Internet for clients connecting to your wlan. This is done by issuing (you guessed it right, as root again): <pre>iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</pre> In the above the ppp0 interface is the used ppp interface, you can substitute it for yours if needed.</li><br />
<li>You are done! Happy surfing</li><br />
</ol><br />
<br />
{{Warnbox|The previous configuration has no security options enabled!<br>If you are using firewall, you should adapt this documentation to suit your needs.<br>Same applies also to setting up keys for wlan interface.}}</div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27701Bluetooth GPRS Howto2007-08-11T00:54:28Z<p>Usv: ready, I hope</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. Check also that you are reading the right results; the bluetooth hardware address must match your phone's.</li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (subsitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immediately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
<li>Now you need scripts to actually use the phone's modem and call your ISP. My ISP is the Finnish saunalahti, mainly because of it's predefined fee for unlimited data access. You must substitute saunalahti for your ISP accordingly through the rest of the document. First we edit the modem setup script for my isp. I'm using script named /etc/ppp/peers/saunalahti and having the following content: <pre>show-password <br />
noauth<br />
/dev/rfcomm0<br />
115200<br />
connect /etc/ppp/peers/saunalahti-connect<br />
disconnect /etc/ppp/peers/saunalahti-disconnect<br />
defaultroute<br />
#replacedefaultroute<br />
noipdefault <br />
#nodetach<br />
usepeerdns<br />
crtscts<br />
local<br />
ipcp-accept-local<br />
#lcp-echo-interval 0<br />
maxfail 10<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
#lcp-max-configure 0<br />
#lcp-max-failure 10000<br />
#lcp-max-terminate 0<br />
#lcp-restart 30000 <br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
linkname saunalahti<br />
mtu 1500<br />
mru 1500</pre> Some remarks: You should possibly first uncomment the nodetach-option, so you can track, whether the call succeeds. Without the option you just get no confirmation. The lines starting with "connect" and "disconnect" are locations for connect and disconnect chat scripts. Chat scripts are used to "talk" with the modem. Lets take a look at them next. </li><br />
<li>Now, we edit the connect script. Mine is as the following: <pre>#!/bin/sh<br />
exec chat \<br />
TIMEOUT 5 \<br />
ECHO ON \<br />
ABORT '\nBUSY\r' \<br />
ABORT '\nERROR\r' \<br />
ABORT '\nNO ANSWER\r' \<br />
ABORT '\nNO CARRIER\r' \<br />
ABORT '\nNO DIALTONE\r' \<br />
ABORT '\nRINGING\r\n\r\nRINGING\r' \<br />
'' \rAT \<br />
TIMEOUT 12 \<br />
SAY "Press CTRL-C to close the connection at any stage!" \<br />
SAY "\ndefining PDP context...\n" \<br />
OK ATH \<br />
OK ATE1 \<br />
OK 'AT+CGDCONT=1,"IP","internet.saunalahti","",0,0' \<br />
OK ATD*99# \<br />
TIMEOUT 22 \<br />
SAY "\nwaiting for connect...\n" \<br />
CONNECT "" \<br />
SAY "\nConnected." \<br />
SAY "\nIf the following ppp negotiations fail,\n" \<br />
SAY "try restarting the phone.\n"</pre>Also some remarks about these: In the place of internet.saunalahti you should have your mobile operators access point name. That can be checked from Settings->Connection->Access points . Hilight the Internet access point and select edit. Go down to section "Access point name". There you have it. One more thing. The modem command "ATD*99#"'s number "*99#" is a special number (at least in Nokia phones) which is used to "call to Internet access point". Pretty clever I'd say; no fiddling around with actual numbers, let the phone handle everything behind the scenes.</li><br />
<li>Edit the disconnect script (mine's is in /etc/ppp/peers/saunalahti-disconnect). You should have something like this: <pre>#!/bin/sh<br />
exec /usr/sbin/chat -V -s -S \<br />
ABORT "BUSY" \<br />
ABORT "ERROR" \<br />
ABORT "NO DIALTONE" \<br />
SAY "\nSending break to the modem\n" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "\K" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
"" "+++ATH" \<br />
SAY "\nPDP context detached\n"</pre></li><br />
<li>Ok, you have completely set up bluetooth + gprs connection. Yay! Next thing to do is to test it. If you let the "nodetach" option uncommented in section 12, running (again, substitute yourisp for, well your ISP :) <pre>pon yourisp</pre> should return something like this: <pre>Press CTRL-C to close the connection at any stage!<br />
defining PDP context...<br />
rAT<br />
OK<br />
ATH<br />
OK<br />
ATE1<br />
OK<br />
AT+CGDCONT=1,"IP","internet.saunalahti","",0,0<br />
OK<br />
waiting for connect...<br />
<br />
ATD*99#<br />
CONNECT<br />
Connected.<br />
If the following ppp negotiations fail,<br />
try restarting the phone.<br />
<br />
Serial connection established.<br />
Using interface ppp0<br />
Connect: ppp0 <--> /dev/rfcomm0<br />
kernel does not support PPP filtering<br />
Cannot determine ethernet address for proxy ARP<br />
local IP address 85.77.231.188<br />
remote IP address 10.6.6.6<br />
primary DNS address 195.197.54.100<br />
secondary DNS address 195.74.0.47</pre> If the output is something similiar, you have a working connection . If this is the case, you can press ctrl-c to abort the connection and uncomment the "nodetach" option from section 12. Later when you want connection, you can just run <pre>pon yourisp</pre> and when disconnecting <pre>poff yourisp</pre>.<br />
<li>Add "dbus bluetooth" to the DAEMONS section in /etc/rc.conf so you can connect more easily after reboot.</li><br />
<li>All done, enjoy!</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27700Bluetooth GPRS Howto2007-08-11T00:27:14Z<p>Usv: added connect script</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (subsitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immidiately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
<li>Now you need scripts to actually use the phone's modem and call your ISP. My ISP is the Finnish saunalahti, mainly because of it's predefined fee for unlimited data access. You must substitute saunalahti for your ISP accordingly through the rest of the document. First we edit the modem setup script for my isp. I'm using script named /etc/ppp/peers/saunalahti and having the following content: <pre>show-password <br />
noauth<br />
/dev/rfcomm0<br />
115200<br />
connect /etc/ppp/peers/saunalahti-connect<br />
disconnect /etc/ppp/peers/saunalahti-disconnect<br />
defaultroute<br />
#replacedefaultroute<br />
noipdefault <br />
#nodetach<br />
usepeerdns<br />
crtscts<br />
local<br />
ipcp-accept-local<br />
#lcp-echo-interval 0<br />
maxfail 10<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
#lcp-max-configure 0<br />
#lcp-max-failure 10000<br />
#lcp-max-terminate 0<br />
#lcp-restart 30000 <br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
linkname saunalahti<br />
mtu 1500<br />
mru 1500</pre> Some remarks: You should possibly first uncomment the nodetach-option, so you can track, whether the call succeeds. Without the option you just get no confirmation. The lines starting with "connect" and "disconnect" are locations for connect and disconnect chat scripts. Chat scripts are used to "talk" with the modem. Lets take a look at them next. </li><br />
<li>Now, we edit the connect script. Mine is as the following: <pre>#!/bin/sh<br />
exec chat \<br />
TIMEOUT 5 \<br />
ECHO ON \<br />
ABORT '\nBUSY\r' \<br />
ABORT '\nERROR\r' \<br />
ABORT '\nNO ANSWER\r' \<br />
ABORT '\nNO CARRIER\r' \<br />
ABORT '\nNO DIALTONE\r' \<br />
ABORT '\nRINGING\r\n\r\nRINGING\r' \<br />
'' \rAT \<br />
TIMEOUT 12 \<br />
SAY "Press CTRL-C to close the connection at any stage!" \<br />
SAY "\ndefining PDP context...\n" \<br />
OK ATH \<br />
OK ATE1 \<br />
OK 'AT+CGDCONT=1,"IP","internet.saunalahti","",0,0' \<br />
OK ATD*99# \<br />
TIMEOUT 22 \<br />
SAY "\nwaiting for connect...\n" \<br />
CONNECT "" \<br />
SAY "\nConnected." \<br />
SAY "\nIf the following ppp negotiations fail,\n" \<br />
SAY "try restarting the phone.\n"</pre>Also some remarks about these: In the place of internet.saunalahti you should have your mobile operators access point name. That can be checked from Settings->Connection->Access points . Hilight the Internet access point and select edit. Go down to section "Access point name". There you have it. One more thing. The modem command "ATD*99#"'s number "*99#" is a special number (at least in Nokia phones) which is used to "call to Internet access point". Pretty clever I'd say; no fiddling around with actual numbers, let the phone handle everything behind the scenes.</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27699Bluetooth GPRS Howto2007-08-11T00:16:25Z<p>Usv: almost complete</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (subsitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immidiately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
<li>Now you need scripts to actually use the phone's modem and call your ISP. My ISP is the Finnish saunalahti, mainly because of it's predefined fee for unlimited data access. You must substitute saunalahti for your ISP accordingly through the rest of the document. First we edit the modem setup script for my isp. I'm using script named /etc/ppp/peers/saunalahti and having the following content: <pre>show-password <br />
noauth<br />
/dev/rfcomm0<br />
115200<br />
connect /etc/ppp/peers/saunalahti-connect<br />
disconnect /etc/ppp/peers/saunalahti-disconnect<br />
defaultroute<br />
#replacedefaultroute<br />
noipdefault <br />
#nodetach<br />
usepeerdns<br />
crtscts<br />
local<br />
ipcp-accept-local<br />
#lcp-echo-interval 0<br />
maxfail 10<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
#lcp-max-configure 0<br />
#lcp-max-failure 10000<br />
#lcp-max-terminate 0<br />
#lcp-restart 30000 <br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
linkname saunalahti<br />
mtu 1500<br />
mru 1500</pre> Some remarks: You should possibly first uncomment the nodetach-option, so you can track, whether the call succeeds. Without the option you just get no confirmation. The lines starting with "connect" and "disconnect" are locations for connect and disconnect chat scripts. Chat scripts are used to "talk" with the modem. Lets take a look at them next. </li><br />
<br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27698Bluetooth GPRS Howto2007-08-11T00:04:50Z<p>Usv: removed some pics</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (subsitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immidiately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!</li><br />
<li>Edit the bottom of /etc/ppp/ip-up as following: <pre>echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf<br />
chmod a+r /etc/resolv.conf</pre>This change is used to set correct DNS settings after connection.</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27697Bluetooth GPRS Howto2007-08-10T23:29:29Z<p>Usv: section 10 ok</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (subsitute your phone's hardware address and password accordingly) <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> , but don't press enter yet. On another root window, issue<br />
<pre>cat /dev/rfcomm0</pre> and immidiately after that execute the typed passkey-agent command in other window. Situation is like this http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode (http://asuka.fi/u/jpaalija/tmp/passcode_entered.jpg) and press "Ok". If the passkey-agent prints something like <pre>Passkey request for device 00:19:79:89:13:8E<br />
Passkey service has been released</pre> you have no need to hurry anymore as you are almost set.<br />
Next, go to Menu->Connectivity->Bluetooth (http://asuka.fi/u/jpaalija/tmp/bluetooth_menu.jpg), select right for paired devices (http://asuka.fi/u/jpaalija/tmp/bluetooth_paired.jpg), select Options->Set as authorized (http://asuka.fi/u/jpaalija/tmp/bluetooth_set_auth.jpg), confirm (http://asuka.fi/u/jpaalija/tmp/bluetooth_trusted_confirm.jpg) and you are done! (http://asuka.fi/u/jpaalija/tmp/bluetooth_trusted_ok.jpg)</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27696Bluetooth GPRS Howto2007-08-10T23:17:47Z<p>Usv: added mor pic links</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there the needed password setter program command, but don't press enter yet. The situation is like in the following picture: http://asuka.fi/u/jpaalija/tmp/catting_passkey-agent_ready.png . Now, execute the cat command in one window like this: <pre>cat /dev/rfcomm0</pre> Immidiately after that execute the typed passkey-agent command, like this: <pre>passkey-agent 8922 00:19:79:89:13:8E</pre> The phone should now show something like this: http://asuka.fi/u/jpaalija/tmp/passcode_dialog.jpg . Quickly, enter the passcode (http://asuka.fi/u/jpaalija/tmp/passcode_entered.jpg) and press "Ok". Next, go to Menu->Connectivity->Bluetooth (http://asuka.fi/u/jpaalija/tmp/bluetooth_menu.jpg), select right for paired devices(http://asuka.fi/u/jpaalija/tmp/bluetooth_paired.jpg), select Options->Set as authorized (http://asuka.fi/u/jpaalija/tmp/bluetooth_set_auth.jpg), confirm (http://asuka.fi/u/jpaalija/tmp/bluetooth_trusted_confirm.jpg) and you are done! (http://asuka.fi/u/jpaalija/tmp/bluetooth_trusted_ok.jpg)</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27691Bluetooth GPRS Howto2007-08-10T21:09:06Z<p>Usv: even more text</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
<li>Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there the needed password setter program command, but don't press enter yet. The situation is like in the following picture:</li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27690Bluetooth GPRS Howto2007-08-10T20:57:12Z<p>Usv: more text again added</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
<li>Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary): <pre>bind yes;<br />
device 00:19:79:89:13:8E;<br />
channel 3;<br />
comment "GPRS dialup";</pre>Of course, you should use your device address and the appropriate channel.</li><br />
<li>Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started: <pre>RFCOMM_ENABLE="true"</pre></li><br />
<li>Restart the bluetooth service: <pre>/etc/rc.d/bluetooth restart</pre></li><br />
<li>Look, whether the bluetooth device is bound to the phone. ll should look like this: <pre>ll /dev/rfcomm0<br />
crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0</pre></li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27689Bluetooth GPRS Howto2007-08-10T20:47:30Z<p>Usv: even more text added</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<li>Scan, which channel is used for Dial-Up Networking: <pre>sdptool search DUN<br />
Inquiring ...<br />
Searching for DUN on 00:19:79:89:13:8E ...<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x10007<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
Channel: 3<br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding: 0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100<br />
</pre>Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is <strong>not necessarily</strong> 1 and so is the case with my Nokia N70; my phone uses channel 3. </li><br />
<li>Next, edit /etc/bluetooth/hcid.conf . Set the following in options section: <pre>autoinit yes;<br />
security auto;</pre> Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change<br />
the line beginning with name to: <pre>name "BlueZ (%h)";</pre></li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27688Bluetooth GPRS Howto2007-08-10T20:34:42Z<p>Usv: Added more instructions, not ready yet</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.<br />
<br />
==Requirements==<br />
# Linux compatible bluetooth device<br />
# Bluetooth enabled mobile phone - I'm using Nokia N70<br />
<br />
==Instructions==<br />
<ol><br />
<li>Install bluez-utils, bluez-libs and dbus (install also ppp if you havent): <pre>pacman -S bluez-utils bluez-libs dbus</pre></li><br />
<li>Start dbus and bluetooth service: <pre>/etc/rc.d/dbus start<br />
/etc/rc.d/bluetooth start</pre></li><br />
<li>Scan for nearby bluetooth devices: <pre>hcitool scan<br />
Scanning ...<br />
00:19:79:89:13:8E Penpen N70</pre><br />
Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).</li><br />
<br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Bluetooth_GPRS_Howto&diff=27687Bluetooth GPRS Howto2007-08-10T20:13:07Z<p>Usv: Added initial page</p>
<hr />
<div>This Howto will describe, how to set up a GPRS Internet connection using bluetooth dongle and compatible mobile phone.</div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27671Sharing ppp connection with wlan interface2007-08-10T15:59:32Z<p>Usv: Added security warning</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# The iptables program which is used to manipulate how data is passed through your machine from your clients and back (package iptables)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using bluetooth+gprs to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
<br />
<ol><br />
<li>Set the ppp connection up.</li><br />
<li>Set the wlan connection up. Choose ssid and select ad-hoc as network type. In the following I'm assuming that you are using interface named wlan0 . Set the wlan interface up address for example 192.168.0.254 . Setting up the interface is usually done by running the iwconfig program as root, with syntax like: <pre>iwconfig wlan0 essid "My_Free_Wlan" mode Ad-Hoc</pre> After that you can assign an ip address to the interface as usual, by running (again, as root): <pre>ifconfig wlan0 192.168.0.254</pre> Please note that different wlan cards may be configured differently and one should adapt this documentation accordingly.<br />
<li>Set the kernel to router mode. This is done by running as root: <pre>echo 1 > /proc/sys/net/ipv4/ip_forward</pre></li><br />
<li>Configure dnsmasqd. Make the following changes to /etc/dnsmasq.conf (uncomment if necessary): <pre><br />
domain-needed<br />
bogus-priv<br />
interface=ra0 (or whatever interface your wlan is)<br />
dhcp-range=192.168.0.1,192.168.0.100,12h<br />
</pre></li><br />
<li>Start the dnsmasqd, as root: <pre>/etc/rc.d/dnsmasq start</pre></li><br />
<li>Finally, set firewall to forward connections to and from the Internet for clients connecting to your wlan. This is done by issuing (you guessed it right, as root again): <pre>iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</pre> In the above the ppp0 interface is the used ppp interface, you can substitute it for yours if needed.</li><br />
<li>You are done! Happy surfing</li><br />
</ol><br />
<br />
{{Warnbox|The previous configuration has no security options enabled!<br>If you are using firewall, you should adapt this documentation to suit your needs.<br>Same applies also to setting up keys for wlan interface.}}</div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27645Sharing ppp connection with wlan interface2007-08-10T13:20:56Z<p>Usv: Finished</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# The iptables program which is used to manipulate how data is passed through your machine from your clients and back (package iptables)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using bluetooth+gprs to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
<br />
<ol><br />
<li>Set the ppp connection up.</li><br />
<li>Set the wlan connection up. Choose ssid and select ad-hoc as network type. In the following I'm assuming that you are using interface named wlan0 . Set the wlan interface up address for example 192.168.0.254 . Setting up the interface is usually done by running the iwconfig program as root, with syntax like: <pre>iwconfig wlan0 essid "My_Free_Wlan" mode Ad-Hoc</pre> After that you can assign an ip address to the interface as usual, by running (again, as root): <pre>ifconfig wlan0 192.168.0.254</pre> Please note that different wlan cards may be configured differently and one should adapt this documentation accordingly.<br />
<li>Set the kernel to router mode. This is done by running as root: <pre>echo 1 > /proc/sys/net/ipv4/ip_forward</pre></li><br />
<li>Configure dnsmasqd. Make the following changes to /etc/dnsmasq.conf (uncomment if necessary): <pre><br />
domain-needed<br />
bogus-priv<br />
interface=ra0 (or whatever interface your wlan is)<br />
dhcp-range=192.168.0.1,192.168.0.100,12h<br />
</pre></li><br />
<li>Start the dnsmasqd, as root: <pre>/etc/rc.d/dnsmasq start</pre></li><br />
<li>Finally, set firewall to forward connections to and from the Internet for clients connecting to your wlan. This is done by issuing (you guessed it right, as root again): <pre>iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</pre> In the above the ppp0 interface is the used ppp interface, you can substitute it for yours if needed.</li><br />
<li>You are done! Happy surfing<li><br />
</ol></div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27643Sharing ppp connection with wlan interface2007-08-10T12:16:00Z<p>Usv: added some instructions, will add more soon</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using bluetooth+gprs to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
# Set the kernel to router mode. This is done by running as root: <pre>echo 1 > /proc/sys/net/ipv4/ip_forward</pre><br />
# Configure dnsmasqd. Make the following changes to /etc/dnsmasq.conf :<pre>domain-needed bogus-priv interface=ra0 (or whatever interface your wlan is) dhcp-range=192.168.0.1,192.168.0.100,12h</pre></div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27072Sharing ppp connection with wlan interface2007-07-19T18:36:35Z<p>Usv: Separated lists with newline</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using bluetooth+gprs to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
To be written soon :)</div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27071Sharing ppp connection with wlan interface2007-07-19T18:33:08Z<p>Usv: Changed stuff to numbered lists</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
# Programs for configuring your wlan card (package wireless_tools)<br />
# Programs for configuring generic network interface card (package net-tools)<br />
# dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
The following conditions must also have been met:<br />
# You must have a working ppp connection (I'm using bluetooth+gprs to connect to the Internet)<br />
# You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
To be written soon :)</div>Usvhttps://wiki.archlinux.org/index.php?title=Sharing_ppp_connection_with_wlan_interface&diff=27070Sharing ppp connection with wlan interface2007-07-19T18:28:42Z<p>Usv: Started the page, added requirements</p>
<hr />
<div>==Requirements==<br />
The following programs must have been installed in order to share the ppp connection:<br />
1) Programs for configuring your wlan card (package wireless_tools)<br />
2) Programs for configuring generic network interface card (package net-tools)<br />
3) dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)<br />
<br />
The following conditions must also have been met:<br />
1) You must have a working ppp connection (I'm using bluetooth+gprs to connect to the Internet)<br />
2) You must have a working wlan interface card (in terms of "can be used in Linux")<br />
<br />
==Instructions==<br />
To be written soon :)</div>Usv