Dell Axim X5 Setup

This is a draft document

I will be discussing the setup of my Dell Axim X5 on Ubuntu.

This guide assumes you are using a USB cable for connectivity.

  1. Plug the Axim, powered up, into the USB connector.

    Run ‘dmesg | tail’ which should produce output relating to Pocket PC

  2. If you want internet access on your Pocket PC you will need to obtain the DNS servers you use, this can be done with this little snippet.
    $ cat /etc/resolv.conf | grep "^nameserver" | awk '{ print $2; }' | xargs
  3. Next we need to get some packages.
    $ sudo aptitude install synce-serial synce-dccm

    When configuring synce-serial I used the following values:

    /dev/ttyUSB0
    192.168.43.1
    192.168.43.2
    144.173.6.71 144.173.6.6
  4. Now we should test synce can connect to the device
    $ dccm
    $ sudo synce-serial-start

    With a little luck the connection should appear on your Pocket PC and you are now away. Next we proceed to get the device to auto connect for our user, this is a little more in depth.

  5. I created a collection of scripts which I keep in ~/bin/ that control the Pocket PC connection.
    • ~/bin/pda_connect
      #!/bin/bash
      
      if [ -f $($HOME/bin/pda_disable file) ]; then
      	exit 1;
      fi
      
      dccm > /dev/null
      sudo synce-serial-start > /dev/null
    • ~/bin/pda_disconnect
      #!/bin/bash
      killall dccm > /dev/null
      sleep 2
    • ~/bin/pda_disable
      #!/bin/bash
      FILE="/tmp/${USER}_pda_disable";
      
      if [ "$1" == "file" ]; then
      	echo $FILE;
      else
      	touch $FILE;
      fi
    • ~/bin/pda_enable
      #!/bin/bash
      FILE=$(pda_disable file);
      rm $FILE;
  6. Next, we need to make some adjustments to the sudoers file so that the scripts run without a password prompt. Open the file for editing, you must use the visudo command.

    $ sudo visudo

    To the file add after # Cmnd alias specification:

    Cmnd_Alias	POCKETPC = /usr/bin/synce-serial-start, /usr/bin/synce-serial-abort

    Then add at the end of the file, replacing chris with your own username.

    # chris can start/stop synce
    chris	ALL=NOPASSWD: POCKETPC
  7. Now to tie it all together we modify the udev daemons configuration files so that it automatically connects your device.
    $ sudo nano /etc/udev/rules.d/z10_synce.rules

    It should be filled out like this:

    BUS!="usb", ACTION!="add", KERNEL!="ttyUSB*", GOTO="synce_rules_end"
    SYSFS{idVendor}=="413c", SYSFS{idProduct}=="4001", RUN+="/usr/bin/sudo -H -u chris /home/chris/bin/pda_connect"
    LABEL="synce_rules_end"

Leave a Reply


Content Copyright © 2005-2008 Chris Smith. All Rights Reserved.