个人工具

“UbuntuHelp:PalmBluetoothHowto”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/PalmBluetoothHowto}} {{Languages|UbuntuHelp:PalmBluetoothHowto}} == Palm Bluetooth Howto == === Share your Internet connection with your Palm devi...)
 
第6行: 第6行:
 
* I assume you already know how to activate Bluetooth on your Palm, and how to setup a connection. You might want to read this page http://howto.pilot-link.org/bluesync/e.html in order to verify that your Palm is correctly setup.
 
* I assume you already know how to activate Bluetooth on your Palm, and how to setup a connection. You might want to read this page http://howto.pilot-link.org/bluesync/e.html in order to verify that your Palm is correctly setup.
 
* Palm devices come with a software that lets you synchronize your Outlook Inbox with your Versa``Mail account. Neat, right? But what if you use Linux? You need to setup Evolution, Kmail, Thunderbird... in order to leave your messages in the server. That way, you will be able to check your emails in your favorite email client and in your Palm.
 
* Palm devices come with a software that lets you synchronize your Outlook Inbox with your Versa``Mail account. Neat, right? But what if you use Linux? You need to setup Evolution, Kmail, Thunderbird... in order to leave your messages in the server. That way, you will be able to check your emails in your favorite email client and in your Palm.
 
 
Just follow these steps:
 
Just follow these steps:
 
+
1.#1  
*#1  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /etc/bluetooth/hcid.conf
 
gksudo gedit /etc/bluetooth/hcid.conf
第19行: 第17行:
 
In line 64 and 65 make sure that 'auth enable' and 'encrypt enable' are commented.
 
In line 64 and 65 make sure that 'auth enable' and 'encrypt enable' are commented.
 
Save the document and close.
 
Save the document and close.
*#2  
+
1.#2  
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /etc/bluetooth/pin
 
gksudo gedit /etc/bluetooth/pin
 
</nowiki></pre>
 
</nowiki></pre>
 
Change '1234' by a new password, save and close.
 
Change '1234' by a new password, save and close.
 
+
1.#3  
*#3  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo nano /proc/sys/net/ipv4/ip_forward
 
sudo nano /proc/sys/net/ipv4/ip_forward
 
</nowiki></pre>
 
</nowiki></pre>
 
Replace 0 by 1 and save (CTRL+X, then press 'Y', press Enter)
 
Replace 0 by 1 and save (CTRL+X, then press 'Y', press Enter)
*#4  
+
1.#4  
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
</nowiki></pre>
 
</nowiki></pre>
*#5  
+
1.#5  
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iptables -A FORWARD -i ppp0 -j ACCEPT
 
sudo iptables -A FORWARD -i ppp0 -j ACCEPT
 
</nowiki></pre>
 
</nowiki></pre>
*#6  
+
1.#6  
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
 
sudo iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
 
</nowiki></pre>
 
</nowiki></pre>
*#7 Now let's create a new file for your Point-to-Point Protocol (PPP) connection between your Palm and your Computer. Save this file after editing.
+
1.#7 Now let's create a new file for your Point-to-Point Protocol (PPP) connection between your Palm and your Computer. Save this file after editing.
 
<pre><nowiki>
 
<pre><nowiki>
 
cat /etc/resolv.conf
 
cat /etc/resolv.conf
第50行: 第47行:
 
gksudo gedit /etc/ppp/peers/palm
 
gksudo gedit /etc/ppp/peers/palm
 
</nowiki></pre>
 
</nowiki></pre>
 
 
115200
 
115200
 
 
192.168.2.1:192.168.2.2
 
192.168.2.1:192.168.2.2
 
 
local
 
local
 
 
ms-dns 192.168.0.1
 
ms-dns 192.168.0.1
 
 
noauth
 
noauth
 
 
debug
 
debug
 
+
1.#8  
*#8  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
dund --nodetach --listen --persist --msdun call palm
 
dund --nodetach --listen --persist --msdun call palm
第69行: 第59行:
 
This will keep a non-daemonized version of dund running, listening to your connections.
 
This will keep a non-daemonized version of dund running, listening to your connections.
 
Watch how it reports information once you connect your Palm with it.
 
Watch how it reports information once you connect your Palm with it.
 
+
1.#9 Now go to your Palm, click on Bluetooth, select your Bluetooth connection, click on Connect, and watch how the terminal (the one in which you are running dund) starts to output messages, among them the assignation of DNS addresses.
*#9 Now go to your Palm, click on Bluetooth, select your Bluetooth connection, click on Connect, and watch how the terminal (the one in which you are running dund) starts to output messages, among them the assignation of DNS addresses.
+
 
You might want to download Mergic Ping at this URL http://www.mergic.com/vpnDownloads.php in order to ping from your Palm to your DNS machine and to Google, this will verify Internet connectivity.
 
You might want to download Mergic Ping at this URL http://www.mergic.com/vpnDownloads.php in order to ping from your Palm to your DNS machine and to Google, this will verify Internet connectivity.
 
(You can refer to http://www.newt.com/debian/treo650.html for information on how to set up a Treo 650 with a Bluetooth connection and connect with it. Follow the sections "Create a new connection" and "Create a new network".)
 
(You can refer to http://www.newt.com/debian/treo650.html for information on how to set up a Treo 650 with a Bluetooth connection and connect with it. Follow the sections "Create a new connection" and "Create a new network".)
 
+
1.#10 You might want to create a new shell script and let it run automatically every time Ubuntu starts. That way all you will have to do, in order to share your Internet connection with your palm, will be to click on the 'Connect' Bluetooth icon of your handheld.
*#10 You might want to create a new shell script and let it run automatically every time Ubuntu starts. That way all you will have to do, in order to share your Internet connection with your palm, will be to click on the 'Connect' Bluetooth icon of your handheld.
+
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /etc/init.d/start_bluetooth.sh
 
gksudo gedit /etc/init.d/start_bluetooth.sh
 
</nowiki></pre>
 
</nowiki></pre>
 
 
#!/bin/bash
 
#!/bin/bash
 
 
echo 1 > /proc/sys/net/ipv4/ip_forward
 
echo 1 > /proc/sys/net/ipv4/ip_forward
 
 
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
 
iptables -A FORWARD -i ppp0 -j ACCEPT
 
iptables -A FORWARD -i ppp0 -j ACCEPT
 
 
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
 
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
 
 
killall -v dund
 
killall -v dund
 
 
dund --listen --persist --msdun call palm
 
dund --listen --persist --msdun call palm
 
 
*. Now let's make your new start_bluetooth.sh script load every time the system boots.
 
*. Now let's make your new start_bluetooth.sh script load every time the system boots.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo chmod -v 755 /etc/init.d/start_bluetooth.sh
 
sudo chmod -v 755 /etc/init.d/start_bluetooth.sh
 
</nowiki></pre>
 
</nowiki></pre>
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo ln -sv /etc/init.d/start_bluetooth.sh /etc/rc2.d/S98start_bluetooth
 
sudo ln -sv /etc/init.d/start_bluetooth.sh /etc/rc2.d/S98start_bluetooth
 
</nowiki></pre>
 
</nowiki></pre>
 
 
If you downloaded Mergic Ping, you can ping Google, and your DNS server in order to verify connectivity.
 
If you downloaded Mergic Ping, you can ping Google, and your DNS server in order to verify connectivity.
 
Enjoy!
 
Enjoy!
 
 
-----
 
-----
 
[[UbuntuHelp:[[category:CategoryPDA]]]] [[category:CategoryCleanup]] [[category:CategoryBluetooth]]
 
[[UbuntuHelp:[[category:CategoryPDA]]]] [[category:CategoryCleanup]] [[category:CategoryBluetooth]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月30日 (五) 20:57的版本

Palm Bluetooth Howto

Share your Internet connection with your Palm device via Bluetooth - 10 EASY steps

This page is going to explain you how to connect your Palm OS device to your (K)Ubuntu via Bluetooth, and share your Internet connection. The following things are important:

  • I assume you already know how to activate Bluetooth on your Palm, and how to setup a connection. You might want to read this page http://howto.pilot-link.org/bluesync/e.html in order to verify that your Palm is correctly setup.
  • Palm devices come with a software that lets you synchronize your Outlook Inbox with your Versa``Mail account. Neat, right? But what if you use Linux? You need to setup Evolution, Kmail, Thunderbird... in order to leave your messages in the server. That way, you will be able to check your emails in your favorite email client and in your Palm.

Just follow these steps: 1.#1

gksudo gedit /etc/bluetooth/hcid.conf

search for 'name "%h-%d"' in line 37 and change it to whatever you like example: name "ubuntu"; In line 17 make sure that 'security' is set to 'auto'. In line 64 and 65 make sure that 'auth enable' and 'encrypt enable' are commented. Save the document and close. 1.#2

gksudo gedit /etc/bluetooth/pin

Change '1234' by a new password, save and close. 1.#3

sudo nano /proc/sys/net/ipv4/ip_forward

Replace 0 by 1 and save (CTRL+X, then press 'Y', press Enter) 1.#4

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

1.#5

sudo iptables -A FORWARD -i ppp0 -j ACCEPT

1.#6

sudo iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

1.#7 Now let's create a new file for your Point-to-Point Protocol (PPP) connection between your Palm and your Computer. Save this file after editing.

cat /etc/resolv.conf

Find out your current Domain Name Server (DNS), make sure to enter the correct values instead of ms-dns 192.168.0.1

gksudo gedit /etc/ppp/peers/palm

115200 192.168.2.1:192.168.2.2 local ms-dns 192.168.0.1 noauth debug 1.#8

dund --nodetach --listen --persist --msdun call palm

This will keep a non-daemonized version of dund running, listening to your connections. Watch how it reports information once you connect your Palm with it. 1.#9 Now go to your Palm, click on Bluetooth, select your Bluetooth connection, click on Connect, and watch how the terminal (the one in which you are running dund) starts to output messages, among them the assignation of DNS addresses. You might want to download Mergic Ping at this URL http://www.mergic.com/vpnDownloads.php in order to ping from your Palm to your DNS machine and to Google, this will verify Internet connectivity. (You can refer to http://www.newt.com/debian/treo650.html for information on how to set up a Treo 650 with a Bluetooth connection and connect with it. Follow the sections "Create a new connection" and "Create a new network".) 1.#10 You might want to create a new shell script and let it run automatically every time Ubuntu starts. That way all you will have to do, in order to share your Internet connection with your palm, will be to click on the 'Connect' Bluetooth icon of your handheld.

gksudo gedit /etc/init.d/start_bluetooth.sh
  1. !/bin/bash

echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i ppp0 -j ACCEPT iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT killall -v dund dund --listen --persist --msdun call palm

  • . Now let's make your new start_bluetooth.sh script load every time the system boots.
sudo chmod -v 755 /etc/init.d/start_bluetooth.sh
sudo ln -sv /etc/init.d/start_bluetooth.sh /etc/rc2.d/S98start_bluetooth

If you downloaded Mergic Ping, you can ping Google, and your DNS server in order to verify connectivity. Enjoy!


[[UbuntuHelp:]]