Welcome to PalmHeads HTML & the Palm Portal Page Cool Freeware (Mostly...)
Linux & the Palm My Meagre Hacks Tandy 102 "The Model T" Palm/Linux News

My Meagre Hacks

Over the last couple of years while using Linux, I've slowly become better at what could loosely be described as "hacking".

Now DON'T PANIC! - don't get me wrong - I'm not some Linux guru who can cut perl code with my toes blindfolded...just somebody who sometimes at a very low level likes taking someone else's code & modifying it for my own needs. Sometimes I might even improve on the original! *cough*.

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.

Here are my (meagre) hacks:

  1. Sticky Notes Gnome Applet -> Palm - Perl/Tk Script
  2. Modded X-Box, Xebian Linux, SMC Router & Ext 56K4 Serial Modem
  3. Christchurch Address/Map Search Perl Script
  4. Dilbert Perl Script
  5. Pilot-Link read-expenses -> CSV Perl Script
  6. Palm Tungsten W & T2, Palm Bluetooth card, Holux Bluetooth GPS & Handmap
  7. Casio Exilim EX-M20U 2MP Digital Camera and MP3 player with Linux
  8. Tribute to "Thrust" & "HHGTTG". The best computer games ever written!
  9. USB ProDrive with SD/MMC card with Linux
  10. pilot-doc.el - An Emacs LISP extension
  11. Nautilus Scripts
  12. DiddleBug Sketches
  13. Iverson-Gleeson Bent Middle Finger Grip (& other thoughts...)
  14. Happy Hacking Keyboard
  15. Christchurch Bus Timetables for the Palm
  16. -> Connecting Palm to Linux box with USB bluetooth dongle <-
  17. Connecting Sony Ericsson T610 via bluetooth to Linux box
  18. The ZX81 & Linux
  19. Gameboy & Doom for the Palm!
  20. Learning Harmonica using your Palm?
  21. gtd - desktop companion to mobileGTD
  22. All of them

HHGTTG & Douglas Adams at his best! Very sage advice!

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.

Hosted on Apache Powered by MySQL Running PHP & Perl Programmed using Vim & Bluefish Graphics by The GIMP Ubuntu Linux is my Linux distribution Best viewed in Firefox
Hosted by planetNZ.com