Syncing Palm Devices using Bluetooth
From openSUSE
It may be useful to be able to sync your Palm device using Bluetooth, to save you from having to carry around your USB cable with you all the time, etc. The method discussed here has been tested on the following Palm Devices:
- Palm Treo 700p (should be also very similar to the Treo 650)
And on the following openSUSE releases:
- openSUSE 10.2 with current updates running KDE
Contents |
Configuring Bluetooth
Backup default / existing configuration
cp /etc/sysconfig/bluetooth /etc/sysconfig/bluetooth.bk.`date -I` cp /etc/bluetooth/hcid.conf /etc/bluetooth/hcid.conf.bk.`date -I` cp /etc/bluetooth/rfcomm.conf /etc/bluetooth/rfcomm.conf.bk.`date -I`
Configuration
You will next need to edit these configuration files using the examples provided here. It may be possible later to add additional Bluetooth services, etc, but these configurations are known to work, so it would be good to start with them, and then tweak your settings later for testing purposes.
After editing/creating all of the configuration files, you must restart the bluetooth service:
rcbluetooth restart
You may also find the kbluetoothd program comes in handy for checking on the status of bluetooth devices. If you have it enabled, you will want to go into the Configuration menu, and then to Configured Services. Remove the check mark from kbemusedsrv and kbtserialchat to avoid having those interfere with your device communication later.
Example of a working /etc/sysconfig/bluetooth (comments stripped)
START_SERVICES="yes" ALWAYS_STOP_SERVICES="no" HCI_START="yes" HCI_DAEMON="/usr/sbin/hcid" HCI_DAEMON_ARGS=" -s -f /etc/bluetooth/hcid.conf" SDP_START="yes" SDP_DAEMON="/usr/sbin/sdpd" SDP_DAEMON_ARGS="" OPD_START="no" OPD_DAEMON="/usr/bin/opd" OPD_DAEMON_ARGS="--mode OBEX --channel 10 --sdp --daemonize --path /var/lib/bluetooth/opd" RFCOMM_START="yes" RFCOMM_DAEMON="/usr/bin/rfcomm" RFCOMM_DAEMON_ARGS="-f /etc/bluetooth/rfcomm.conf bind all" PAND_START="no" PAND_DAEMON="/usr/bin/pand" PAND_DAEMON_ARGS="--listen --role NAP" DUND_START="yes" DUND_DAEMON="/usr/bin/dund" DUND_DAEMON_ARGS="--listen --persist -s call dun" HID_START="yes" HID_DAEMON="/usr/bin/hidd" HID_DAEMON_ARGS="--server" HID2HCI_START="no" HID2HCI_DAEMON="/usr/sbin/hid2hci" ## ServiceRestart: bluetooth HID2HCI_DAEMON_ARGS="--tohci "
Example of a working /etc/bluetooth/hcid.conf (comments stripped)
Replace xxxx with a pin code of your choosing.
options {
autoinit yes;
security auto;
pairing multi;
passkey "xxxx";
}
device {
name "%h (%d)";
class 0x7e010c;
iscan enable;
pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
}
Example of a working /etc/bluetooth/rfcomm.conf (comments stripped)
Replace 00:00:00:00:00:00 with the correct identification for your Palm device, which can be obtained with the command:
hcitool scan
Once bluetooth is functioning properly.
|
You must have enabled Bluetooth on your Palm Device as well. Go to the Palm main menu, select Bluetooth and then make sure it is set to On. Under Visibility set to Visible or Discoverable is set to Yes. |
rfcomm0 {
bind no;
device 00:00:00:00:00:00;
channel 1;
comment "Palm Device";
}
Configuring your Palm Device
Enable trusted bluetooth and connection to your computer
Go to the Palm main menu, select Bluetooth and then make sure it is set to On. Under Visibility set to Visible or in Discoverable set to Yes.
Then you will want to add the device to your trusted devices:
- Under the Bluetooth application, select Setup Devices and then select Trusted Devices.
- Select Add Device and the Palm device will scan for advertising Bluetooth devices.
- The Palm device should be able to detect your system.
- Select the device, and then select OK.
- You should be prompted to present the passkey. Enter the correct pass key, and select OK.
Steps with nice screenshots for this can be found at : http://howto.pilot-link.org/bluesync/fa.html and http://howto.pilot-link.org/bluesync/fb.html
Configure the network
Go into the Prefs application and select Network. Press the menu key, and select New under the Service menu.
- Enter a name for the service (for this example, we will use home bt.)
- Under Connection, select Edit Connections.
- At the Connection Preferences screen, select New.
- Under Connect to:, select PC.
- Under Via, select Bluetooth.
- Under Device, select Tap to Find.
- Then select the bluetooth connection to your computer, and select OK.
- Select Details and choose 115200bps, and then select OK.
- Select OK to go back to the Connection Preferences screen, make sure your new connection is highlighted, and then select Done.
- Back at the Network Preferences screen, select Details and then select Advanced.
- Remove the check from IP Address Automatic and Query DNS. Manually input a valid DNS server for your network, and the IP address you would like your device to have (this should be a different network than anything your computer is on.) In this example we put 192.168.78.2.
- Select OK two times go go back to the Network Preferences.
Configure PPP Connection
Create a file called /etc/ppp/peers/dun that looks like this (you may need to adjust the network address:
115200 noipdefault proxyarp ktune 192.168.78.254:192.168.78.2 # server : client ms-dns 10.0.0.1 netmask 255.255.255.0 local noauth nodefaultroute noipx debug asyncmap 0
Create a file called /usr/local/bin/palmconnect that looks like this (substitute your outgoing network device for eth0 if needed):
#!/bin/bash killall -9 dund killall -9 pppd /usr/sbin/iptables -t nat -F #dund -s call btpalm echo 1 > /proc/sys/net/ipv4/ip_forward /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
And make it executable:
chmod +x
Run the command
/usr/local/bin/palmconnect
Connect the Palm Device to the Network
On the Palm, back at the Network Preferences screen, make sure your new connection is set active, and then select Connect.
Assuming there are no errors to debug, you should now see an active ppp connection on your computer, and your Palm device should be able to browse the internet (assuming your computer is connected to the Internet).
Sync Palm Via this Network device
http://howto.pilot-link.org/bluesync/gb.html
Test:
pilot-xfer -p net:any -l
Gotchas / Issues
Things to try if it just won't work
- Hard reset the palm device... It seems sometimes the network drivers in PalmOS go borky.
- Reset your computer, pppd has a habit of getting wonky too sometimes
- Beer.
Another option
Using recent versions of pilot-link, works under opensuse 11.0, you can skip the ppp part and just use bluetooth. Just go through the bluetooth security setup described above and then instead of using net:any use bt:.

