Gnome (Evolution)/Palm Sync + Shared Internet via Bluetooth

This is a simple guide to getting a Palm handheld and Linux (Debian Etch) syncing over bluetooth1). Please ensure all packages mentioned in my setup are installed.

Step 1: Ensure the Bluetooth Device Works

The easiest way to ensure that your bluetooth device works is to ensure that the gnome-bluetooth package is installed and then plug in or otherwise initialize the device! A little bluetooth icon should appear in your Gnome taskbar. Once that is the case you can go on to the next step.

Step 2: Edit Config files

  • Next edit the /etc/default/bluetooth file:

Find the section that says:

DUND_ENABLED=0

and replace it with:

DUND_ENABLED=1

then find the part that says:

DUND_OPTIONS=""

and replace it with:

DUND_OPTIONS="--listen --persist --msdun call mypdadund"
  • Now we have to create a dial-up script called mypdadund in the /etc/ppp/peers folder. So using your favorite text editor edit a file called /etc/ppp/peers/mypdadund. I like nano so I would issue this command at the terminal: “nano /etc/ppp/peers/mypdadund”. Any text editor should work just fine however gedit will do the trick just as well.

In that file you’ll need to put something like this:

115200
192.168.1.1:192.168.1.2
local
ms-dns <ip of your DNS>
noauth
debug

The first ip address 192.168.1.1 is that of your computer and the second 192.168.1.2 is that of your pda. You can change these to whatever suites you. The ms-dns needs to be your dns ip. You can get your dns ip from the /etc/resolv.conf file. There are normally two ips in that file: use either.

:!: THE FOLLOWING STEP IS IMPORTANT: Evolution refused to sync until I made this edit.

Ensure that you turn on bluetooth on your palm then issue this command at the terminal:

hcitool scan

You should get an output that looks like this:

Scanning ...
         ##:##:##:##:##:##       PDA_NAME
  • Next note the above output and with it edit the /etc/bluetooth/rfcomm.conf thus:
rfcomm0 {
#	# Automatically bind the device at startup
	bind no;
#
#	# Bluetooth address of the device
	device ##:##:##:##:##:##;
#
#	# RFCOMM channel for the connection
	channel	1;
#
#	# Description of the connection
	comment "PDA_NAME";
}
  • Now restart the bluetooth subsystem:
# /etc/init.d/bluetooth restart

Step 3: Configure the Palm

Now we will configure the palm for syncing with the following steps2):

Pair the Palm and Your PC

On the Palm go to the Bluetooth application and turn on bluetooth if it isn’t already on. Then go to Setup Devices > Trusted Devices > Add Device. You should see your computer listed. Select it and click OK. You should then be prompted for a PIN. Enter the pin. A bubble should then pop up in your Gnome taskbar asking you to approve pairing click the bubble and enter the same PIN. The Palm and the computer should now be paired. Click Done twice to return to the main Bluetooth application.

Create a new connection

  • Open the Prefs application.
  • Select Connection > New.
  • Enter a Name (for example, Bluetooth to PC), Connect to PC, Via Bluetooth.
  • Select the Device field, select your trusted PC, and click OK.
  • Click on Details and set the speed to 115,200 and leave the Flow Ctl at Automatic.
  • Click OK twice to save your settings and click Done.

Create a new network

  • Open the Prefs application.
  • Select Network.
  • Select Menu > Service > New.
  • Enter a Name (for example, Unix).
  • Enter your Connection (for example, Bluetooth to PC) and don’t set the User Name or Password.
  • Select Details > Script then select End from the dropdown menu.
  • Click on OK.
  • Click Connect to test your connection. You should see a popup that displays the following messages in turn: Initializing, Signing On, Established. Then click on Disconnect.
  • Click Done.

Configure the HotSync application

  • Open the HotSync application.
  • Select Options > Modem Sync Prefs > Network and click OK.
  • Select Options > LANSync Prefs > LANSync and click OK.
  • Go to the Options > Primary PC Setup screen.
  • Enter your Primary PC Address (as per /etc/ppp/peers/mypdadund above i.e: 192.168.1.1).
  • Leave the Primary PC Name field blank as an entry may actually cause problems due to failed DNS lookups.
  • Go to the Options > Connection Setup screen.
  • Select the Bluetooth connection that was created in the pairing process above, and click OK.
  • Select Modem (above the HotSync button).
  • Click on Select Service and choose the Service you created (for example, Unix).

Step 4: Sync

And now the moment of truth! Open Evolution and click Edit > Synchronization Options to start the sync wizard:

  • Enter your sync ID or let the wizard discover it for you.
  • For your connection/device settings select “Network”.
  • Click next, then ensure bluetooth is active on your palm and press the Hotsync icon on your palm screen.

If all went well you should hear the familiar Palm “sync song”.

Notes

Pilot Applet

If you right click on your Gnome panel and click “Add to Panel...” and scroll down a bit you should see an applet called “Pilot Applet” you may add it to your panel for convenience. With this applet you can know the status of your Hotsync link and you can manage your settings (conduits etc.) without having to open Evolution.

:!: With this applet you can also install .prc and .pdb files to your palm by simply dragging the desired file from nautilus browser to the icon. The File conduit has to be enabled for this functionality.

Browse the Net with Your Palm

If you’d like to browse the net with your PDA via your bluetooth connection just create a script call it whatever you like such as btpalmnet and place something like this in it:

# This will temporarily enable ipforwarding and share internet with a Palm via local internet connection

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT
iptables -A FORWARD -o ppp0 -i eth0 -j ACCEPT

If necessary change eth0 to whatever your primary internet interface is. Also in the line that reads “iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE” the 192.168.1.0/24 value is based on the ips you entered in the /etc/ppp/peers/mypdadund here.

So in this example 192.168.1.0/24 is used because the ips in the /etc/ppp/peers/mypdadund file were 192.168.1.1:192.168.1.2 i.e: 192.168.1.1 and 192.168.1.2. If those ips were for example 192.168.77.1:192.168.77.2 i.e: 192.168.77.1 and 192.168.77.2 then our script would have “iptables -t nat -A POSTROUTING -s 192.168.77.0/24 -j MASQUERADE”. Got that? Hope so.

Once you’ve saved the script make sure it is executable by you (chmod 744). Then execute it as root to allow browsing from your Palm. On the Palm ensure bluetooth is on:

  • open WebPro
  • then click the option drop down
  • then click “Connect” under “Page”

You should see the dialog say “Initializing Unix” then “Signing On” then “Established”. Then enter wiki.qays.org in the address bar and click “Go”. :-)

More Help

If you need help feel free to send me an email: admin_at_qays.org replacing the _at_ with @ of course :-)

 
debianhowto/gnomepalmbt.txt · Last modified: 2008/02/02 18:17 by qays
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki