Bluetooth connection between the Treo 680 and Fedora
The Treo 680 is the latest converged device from Palm, and since it came with BlueTooth support built in, I had to get a BlueTooth USB interface and originally set it up in Fedora Core 5. Note, this should work on Fedora 6, 7, 8, etc.. And other distros with some slight modifications. I'll also note that this was originally set up for a Treo 650, so it should really work with any Palm with Bluetooth.
I used a lot of references around on the net, most of which should be referenced at the bottom of this page. Below is the condensed information needed to get syncing in Fedora specifically, but it certainly should work for any Linux distribution. To be nice, I'll also link what looks to be a decent site for setting this up on Windows as well, http://www.whizoo.com/bt_setup/
Please note that the following will set up a reasonably fast wireless (400kbit) internet connection inside your house. Of course you could set this up at work, etc. I personally have this set up at home so I don't use slow cellular data and I can use all the bandwidth I want and not worry about going over my limit. I also plan to set it up at work sometime for myself but just haven't gotten around to it. Keep in mind this does not magically make your Treo able to use WiFi (802.11) hotspots or access points.
In setting this up, I purchased a cheap BlueTooth USB adaptor off eBay for a total of $20. I'm not sure about compatability with different BlueTooth hardware, the auction I bid on *specifically* said Linux, so I went with that one. At this point in the guide, don't plug your BT adaptor in yet, we need to set a few things up first.
If you're using the default kernel from Fedora, you shouldn't have to touch any
of the following kernel stuff, as they compile all the proper modules in for
you already, nice! Otherwise, if you need to set up your kernel for Bluetooth you can go to the bottom of the page or click here.
Otherwise, the first step is the kernel configuration if you've compiled your own kernel,
and this IS assuming you have USB already set up. If not, there are lots of
information for that on Google or other resources.
My wife loved my Treo so much she had to have one, so we now both have one.
We both share the same bluetooth connection, and I've made notes below where
I've changed things to make that happen. Basically make a second rfcomm
device and change the ppp script so that the Treo can specify its own IP
address, and set the IP on each Treo. It seems to really slow Bluetooth down
to have two devices on it, but it works.
Software required
|
Using yum, install the following packages:
|
After installing the software, it's time to plug in the BlueTooth adaptor
and get some information from it. If you do a tail -f /var/log/messages
with one terminal, you should be able to keep an eye on the kernel messages
to make sure things appear to be progressing properly.
In a shell, run the following command:
hcitool dev
This command will give you some of the hardware information on the Bluetooth
dongle we need, so keep this in mind when you need to fill in hardware
addresses and such below..
Also, do the following command and write down the hardware address of your device, needed below:
hcitool scan
Now that we're sure the BT adaptor is working and we have its hardware address,
we'll create/edit a few files on the system,
if the file doesn't exist, go ahead and create it. Most of the files below
will exist except for /etc/ppp/peers/btpalm. Some of the files I've only
listed the things that need changing, don't replace the entire file with
the contents below when instructed to just edit the existing lines.
Configuration of Fedora
/etc/bluetooth/pin (replace contents, use your own 4 digit pin)
/etc/bluetooth/rfcomm.conf (add at bottom)
/etc/ppp/peers/btpalm (new file)
/etc/sysconfig/pand (replace contents with)
/etc/sysconfig/dund (replace contents with)
|
Now everything is set up on the PC side. From here we'll pair the Treo 650 with the PC, set up the Treo side of the BT connection, and get Networked and Hotsynced!
Configuration of Treo
Create the network connection settings..Prefs->Connection->New
Name: BYSync |
Create the network..
Prefs->Network->New
Service: BTSync |
Make sure the defaults are correct..
Click Details
Idle timeout: 3 minutes |
Set up Hotsync config on the Treo for the above settings..
Launch Hotsync
Menu, Options, select Primary PC Setup... |
Set up Hotsync settings for syncing..
Launch Hotsync
Select Modem |
And the Treo should be configured for connecting!
For right now, to test to see if things are working, on the command line type:
pilot-xfer -p net:any -l
Then click Hotsync on the Palm. If all goes well, pilot-xfer will dump the current
list of applications/databases in your Treo. If you get here, you should be
able to set your hotsync program to sync on the net:any device and it'll work.
One more bit of info here.. If you need to set up Reverse DUN (ie: Connecting to the internet from the Palm using the Linux box as a router) you'll likely need to use the following (or similar) firewall rule. This isn't really specific to this scenario, but rather routing in general:
iptables -t nat -A POSTROUTING -s 192.168.0.200 -o eth0 -j MASQUERADE
Replace the 192.168.0.200 with your Palm's IP address, and eth0 with your network device on the Linux box.
I'll try to fill in more details later.. Good luck!
Kernel configuration
If necessary, you can use the following as a guide to set up Bluetooth in the kernel. Note that the kernel configuration shown below is current as of probably 2.6.19 so it's very likely to have changed since then.
|
Begin by compiling the kernel with support for Bluetooth and PPP, found in Device Drivers > Networking Support:
Now, under Device Drivers > Networking Support > Bluetooth Support, set:
Under Device Drivers > Networking Support > Bluetooth Support > Bluetooth Device Drivers, set:
|
References that helped me get this set up:
|
http://howto.pilot-link.org/bluesync http://www.linuxjournal.com/article/8185 |