Over the last couple of years while using Linux, I've slowly become better at what could loosely be described as "hacking".
I mainly focus on stuff that is Palm related, mainly trying to integrate some of the command line tools available for Linux->Palm connectivity with some well known Linux applications.
Connecting Palm to Linux box with USB bluetooth dongle
I brought a USB bluetooth dongle from Dick Smith recently, & set about getting my Palm to connect to my Linux box to and allow interent sharing. Proved easier than expected
First lets deal with the Linux side of things! I'm using Ubuntu so your mileage may vary depending on what distribution you are using.
First of all (after plugging in the bluetooth dongle of course) I have a bash script called 'startbluetooth' that creates the persistent bluetooth connection. You also need the whole BlueZ package installed:
#!/bin/bash
killall hcid
killall sdpd
killall dund
hcid
sdpd
dund --listen --persist --msdun call dun
This effectively kills any currently running bluetooth connection, then sets up the persistent bluetooth connection.
I use firestarter as my firewall, so in my 'user-pre' file I have this that allows IP forwarding for bluetooth connections. Just replace the '192.168.1.0/24' & '192.168.1.4' for your internal network settings. Also once connection is enabled I have to go into the preferences setting in Firestarter & "Enable Internet connection sharing" for ppp0 (that is created when bluetooth connection is made):
# Allow IP fowarding for bluetooth connections
$IPT -F
$IPT -t nat -F
$IPT -t mangle -F
$IPT -t nat -A POSTROUTING -i $IF -o $INIF -s 192.168.1.0/24 -j SNAT --to
192.168.1.4
echo 1 > /proc/sys/net/ipv4/ip_forward
$IPT -A FORWARD -i $IF -o $INIF -m state --state NEW,ESTABLISHED,RELATED -j
ACCEPT
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A INPUT -m state --state NEW -i ! $IF -j ACCEPT
Thats basically it for the Linux side! All you need todo is run your bash script above.
Now for the Palm side! You need to create a Network connection for your bluetooth connection. Here are my settings for my Palm Tungsten T2 :
This is where you put your login & password to your Linux box, choosing "Bluetooth to PC".
Next do your IP settings for your Palm device under "Details...". I found it easier to have a fixed IP address for my Palm:
Remember to add the DNS for your internal network (normally your router).
Here is the last Network config on the Palm under "Script...":
That should be it! Just press "Connect" and you should be good to go! At some stage you have to "pair" the devices up. I found it useful to be logged in Gnome at this point as it has a graphical bluetooth keyring tool. Its great, with that USB bluetooth dongle from Dick Smith it has a very wide range of about 10 metres which covers a large part of my house. The speed is OK (like a 56k4 connection) which is fine for a handheld device. I can SSH to my Linux box locally using TuSSH , I can surf the web - basically do anything from the comfort of my armchair! Ahhhh - pure laziness! :-)
| Back |
Thats all folks at the moment! If I come up with anything else I'II post it here.