New Ideas on your Palm

The two reasons I bought my Palm Tungsten T3 were the bright display, and the ability to listen to Podcasts and other audio content.

The built-in RealOne Player is not really useable. It misses bookmarks, and when operated without the stylus, the volume adjustment is too coarse for headphones. So I switched to Pocket Tunes. Another program you'll need is Card Export, which makes the SD card available as a USB drive under Linux. Hopefully, the next version of pilot-link or gnome-pilot will allow files to be installed on the SD card.

Finally, some MP3 files have to be converted to a different sampling rate, as the Palm does not support the 24 kHz used by Adam Curry. So I extended the mp32ogg script and added the switch --only-resample which will only convert the file if resampling is necessary. Usage example: mp32ogg --delete --only-resample *.mp3 will give you a directory with playable MP3 and OGG files, which can then be installed on the Palm. The modified script can be downloaded here.

23:14, 21 Nov 2004 by Carsten Clasohm Permalink | Comments (0)

Palm Net Access via Bluetooth [groups.google.com]

The next thing I had to try was connecting my Palm to the Internet via Bluetooth, using Fedora Core 3. Thanks to this Usenet posting, it wasn't too hard.

The only Bluetooth adapter I have is in my IBM ThinkPad. It has to be switched on with a hardware button, so I first had to configure the Bluetooth services to be started whenever the device becomes available. After installing the bluez RPM packages, create the script /etc/hotplug/usb/hci_usb:

#!/bin/sh

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
[ -e /var/lock/subsys/bluetooth ] || service bluetooth start
[ -e /var/lock/subsys/dund ] || service dund start

if [ "X$REMOVER" != "X" ]
then
cat >$REMOVER <<EOF
#!/bin/sh

[ -e /var/lock/subsys/dund ] && service dund stop
[ -e /var/lock/subsys/bluetooth ] && service bluetooth stop
EOF
chmod +x $REMOVER
fi
fi

Because the script is invoked for multiple devices, it has to check if the bluetooth and dund services are running or not. This only works if the bluetooth service is not started when the system boots, so we have to disable it:

service dund stop
service bluetooth stop
chkconfig dund off
chkconfig bluetooth off

As described in Blumf's posting, create /etc/ppp/peers/dun:

noauth
local
debug
115200
noipdefault
noipx
idle 0
ms-dns <DNS-SERVER-IP>
netmask 255.255.255.0

If you don't have a local DNS server, copy an IP address from /etc/resolv.conf after establishing your usual Internet connection.

In /etc/ppp/options.rfcomm1, the IP addresses of the PC and the Palm are given:

<PC_IP_ADDRESS>:<PALM_IP_ADDRESS>

In my network, I set the Palm IP address to 192.168.2.1.

Modify /etc/sysconfig/dund:

DUNDARGS='--listen --channel 1 call dun'

You also need to enable IP forwarding and masquerading. In /etc/sysctl.conf, set net.ipv4.ip_forward to "1". Run echo 1 >/proc/sys/net/ipv4/ip_forward to activate forwarding without a reboot.

In /etc/sysconfig/iptables, add these lines:

*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT

For this to take effect, you have to run service iptables start.

On the Palm side, just follow Blumf's instructions:

  1. In prefs/Bluetooth add your PC to the trusted device list. Pass key is found in /etc/bluetooth/pin, default is "BlueZ".
  2. In prefs/Connection create a new entry. (Connect to: PC, Via: Bluetooth, Device $YOUR_PC)
  3. In prefs/Network create a new service. (Username/password same as your normal linux login, Connection to whatever you created in the previous step, no need to change details)
  4. Tap 'Connect', if all's well you should see the palm connecting. Check the end of /var/log/messages to see the ppp log.
  5. Tap 'Disconnect'.

16:16, 14 Nov 2004 by Carsten Clasohm Permalink | Comments (0)

USB Palm and Fedora Core 3 [docs.fedoraproject.org]

If you want to synchronize a USB Palm under Fedora Core 3, and don't want to spend hours reading about udev and hotplug, here's how to do it.

The problem with USB syncing a Palm under Fedore Core 3 is that the device file will not be created until you press the Hotsync button. And when it is created, it is only accessible by root.

This can be fixed by creating /etc/udev/rules.d/10-visor.rules with this content:

BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[13579]", SYMLINK+="pilot"

For detailed information on writing udev rules, see Daniel Drake's excellent document. To create the above rule, I pressed the Hotsync button, looked for the newest symlink in /sys/bus/usb/devices, and then examined the product file in the directory to which the symlink pointed. Because the product string had a trailing space on my computer, I added the "*" at the end. The check for the kernel device name "ttyUSB[13579]" is necessary because I use Card Export II, which lets me access the Palm's memory card as a USB drive. Card Export II also identifies itself as a "Palm Handheld" product, but with a different kernel device name. Tim Harper suggested to use "[13579]" in the device name. This is important because udev creates two subsequent, but more or less random ttyUSB devices, and only the one with the odd number works.

A simpler rule would match the kernel device name with KERNEL="ttyUSB1", but that would break if ttyUSB1 is occupied by some other toy when the Palm is connected.

As pointed out in the comments, it is not necessary to create a file in /etc/udev/permissions.d, because the configuration in /etc/security/console.perms takes care of setting the right permissions, once we have created the symlink /dev/pilot.

The rules.d file must have the given name so it is loaded before the default 50-udev.rules. Restarting udevd is not necessary for these changes to take effect.

If you use pilot-xfer to access your Palm, the following script allows you start it before pressing the Hotsync button.

#!/bin/sh

until [ -e /dev/pilot ]; do sleep 1; done
exec /usr/bin/pilot-xfer "$@"

13:10, 14 Nov 2004 by Carsten Clasohm Permalink | Comments (48)

RSS

Archive

October 2008
S M T W T F S
     
10  11 
12  13  14  15  16  17  18 
19  20  21  22  23  24  25 
26  27  28  29  30  31   
September 2008
July 2008
June 2007
May 2007
March 2007
January 2007
December 2006
September 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
January 2005
December 2004
November 2004
October 2004

Blog Categories

Hiking (5)
Desktop Linux (28)
Server Linux (5)
Palm (3)
Photography (5)
Politics (2)
Web Applications (15)

Notifications

Request notifications

Syndication Feed

RSS

Recent Comments

  1. Anonymous Visitor: AT&T U.S.
  2. Anonymous Visitor: All went well under CentOS 5.0 in Croatia (VIP network)
  3. Anonymous Visitor: tmp crypt not necessary
  4. Anonymous Visitor: Great article
  5. Anonymous Visitor: So it's not a Virus...
  6. Anonymous Visitor: Thanks! Helps also on Windows!
  7. Anonymous Visitor: Thank you
  8. Anonymous Visitor: Economic Incentives
  9. Anonymous Visitor: thank you
  10. B G: Why are multiple device files created for one Treo 650 device on F7?