Connecting a Treo650 to a Freecom DataTank 2

  1. Install bluez2-utils from Optware
  2. Install the following kernel modules: bluetooth, hci_usb, l2cap, bnep, rfcomm, hidp
  3. Create /dev/rfcomm0 as follows:
    mknod /dev/rfcomm0 c 216 0
  4. Enable routing from ppp0 to eth1 (don’t do this if you use ppp for your internet connection):
    /etc/init.d # diff -u routing.orig routing
    --- routing.orig        Sat Mar 22 18:57:23 2008
    +++ routing     Sat Mar 22 15:14:29 2008
    @@ -37,6 +37,7 @@
    
            # lo & eth0 always accepted (also if WAN port IP not set)
            /sbin/iptables -A INPUT -i $INIF -j ACCEPT
    +       /sbin/iptables -A INPUT -i ppp0 -j ACCEPT
            /sbin/iptables -A INPUT -i lo -j ACCEPT
    
            # get IP address from WAN port
    @@ -150,6 +151,7 @@
              /sbin/iptables -A FORWARD -j TCPMSS -o $EXIF --clamp-mss-to-pmtu -p tcp --tcp-flags SYN,RST SYN
            fi
            /sbin/iptables -A FORWARD -i $EXIF -o $INIF -m state --state ESTABLISHED,RELATED -j ACCEPT
    +       /sbin/iptables -A FORWARD -i $EXIF -o ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT
    
            grep -q ^proxy_server=checked /etc/master.conf
    @@ -163,6 +165,7 @@
              fi
            else
              /sbin/iptables -A FORWARD -s $SUBNET -i $INIF -j ACCEPT
    +         /sbin/iptables -A FORWARD -s $SUBNET -i ppp0 -j ACCEPT
            fi
    
            # port forwarding
    

  5. Edit /etc/ppp/options as follows:

    noauth
    crtscts
    lock
    local
    proxyarp
    ktune
    192.168.1.XX:192.168.1.YY
    ms-dns 192.168.1.ZZ

    (edit the last two lines to suit your network topology, the first IP address
    is your gateway device, the second IP address will be assigned to the client,
    and the third IP address is your DNS server)
  6. Add the following line to /etc/dnsmasq.conf:
    interface=eth0,ppp0

Freecom FSG-3
NSLU2-Linux

Comments Off

Permalink

Five new NSLU2 firmware releases in five days

In the last five days, we have made five new NSLU2 firmware releases:

2007-12-31 - Unslung 6.10-beta Release
2007-12-30 - SlugOS 4.8-beta Release
2007-12-29 - OpenWrt/NSLU2 Kamikaze 7.09 Release
2007-12-28 - Angstrom/NSLU2 2007.12 Release
2007-12-27 - Debian/NSLU2 Stable 4.0r2 Release

All of these new releases are available at

http://www.slug-firmware.net/

See http://article.gmane.org/gmane.comp.misc.nslu2.linux/20610 for
an explanation of the pros and cons of each different firmware
distribution, and the installable packages available for each.

Thanks to everyone in the NSLU2-Linux, OpenWrt, Angstrom, OpenEmbedded
and Debian projects who contributed to these releases.

Remember, if you find any of the firmware or packages that the
NLSU2-Linux project provides useful, feel free to make a donation to
the project at

http://www.nslu2-linux.org/wiki/Main/Donate

We are currently in need of about $500 to buy a RAID controller card
and some disks for our autobuild machine to support all this new
firmware with up-to-date package feeds …

Freecom FSG-3
NSLU2-Linux
OpenMoko
OpenWRT

Comments Off

Permalink

Android Internals

Here are some links to various pieces of information (not published by Google) about the internals of the new Android OS:

http://benno.id.au/blog/2007/11/13/android-under-the-hood
http://benno.id.au/blog/2007/11/13/android-native-apps

A script to list the contents of the root filesystem: http://pastebin.ca/771989
(Yes, this is almost unreadable perl, and the regexps were created by trial and error until there were no more unmatched lines.)

The output of that script: http://pastebin.ca/771988

http://benno.id.au/blog/2007/11/14/android-filesystems
http://benno.id.au/blog/2007/11/14/android-busybox

Graphical console programming: http://groups.google.com/group/android-developers/msg/ace258af92fff692?dmode=source

Dynamic linking: http://groups.google.com/group/android-developers/msg/3d68334a74a9bab2?dmode=source

DEX format documentation: http://groups.google.com/group/android-developers/msg/d150de1d97f829be?dmode=source

Dalvik VM benchmarking vs native code: http://groups.google.com/group/android-developers/msg/69729d17c013452f?dmode=source

Android

Comments Off

Permalink

Setting the OpenMoko timezone

If you want to set the timezone on your phone correctly, do the following:

  1. ipkg install tzdata
  2. ipkg install your desired tzdata-* packages.  For instance, I use “tzdata-australia“.
  3. Enable your desired timezone by symlinking it to “/etc/localtime“.  Adjust the following example command line for your locality.
    • ln -s /usr/share/zoneinfo/Australia/Adelaide /etc/localtime
  4. The “date” command should now show the correct time for your timezone.  If it is not correct, then install the “ntpclient” package, and use it to set your clock.

Note that this technique should work on any OpenEmbedded-based Linux distribution.

    NSLU2-Linux
    OpenMoko

    Comments Off

    Permalink

    Intercepting hotplug on the Freecom FSG-3

    The Freecom FSG-3 wireless storage router has four USB ports, and has support for hotplug built into the kernel.  This makes it ideal for use as a docking station for OpenMoko phones.

    Unfortunately, it does not have the normal hotplug agent scripts that you expect to find on a desktop Linux distribution.

    So you have to roll your own:

    1. Run “mv /sbin/hotplug /sbin/hotplug.freecom
    2. Create a new “/sbin/hotplug” shell script (the following is an example of how to automatically enable USB networking for an OpenMoko phone):
      #!/bin/sh
      
      case $1 in
        ( usb )
          case $PRODUCT/$INTERFACE in
            ( 1457/5122/212/2/6/0 ) # OpenMoko GTA01 cdc-ether
              case $ACTION in
                ( add )
                  ifconfig usb0 192.168.0.200 up
                  ;;
                ( remove )
                  ifconfig usb0 192.168.0.200 down
                  ;;
              esac
              ;;
          esac
          ;;
      esac
      
      /sbin/hotplug.freecom "$@"
      

    3. Run “chmod ugo+x /sbin/hotplug” to ensure that your new hotplug script is executable.
    4. See http://linux-hotplug.sourceforge.net/?selected=usb for the list of environment variables you can use to distinguish different devices.

    Freecom FSG-3
    OpenMoko

    Comments Off

    Permalink

    Replacing dropbear with openssh

    I prefer to use OpenSSH rather than Dropbear on my devices.  The main reason is to get sftp support (which is required by sshfs).  Another reason is to get better support for agent forwarding (which is essential for bouncing from one machine to another without leaving your private keys all over the internet).

    To do this on OpenMoko (or any other OpenEmbedded-based distribution for that matter, for instance SlugOS or Angstrom):

    1. Edit /etc/init.d/dropbear by replacing “DROPBEAR_PORT=22” with “DROPBEAR_PORT=2222” (or any other unused port).
    2. Run “ipkg install -force-depends openssh” to install openssh.
    3. Make sure you have set a root password before rebooting (use “passwd” to set it).
    4. Reboot (dropbear will restart on the new port, and openssh will start on the normal ssh port).
    5. Check that openssh is now serving on port 22 by logging into the device over ssh.
    6. Run “ipkg remove -force-depends dropbear” to remove dropbear.
    7. Then run “ipkg install openssh-sftp” to install support for the sftp protocol which sshfs uses.

    Freecom FSG-3
    NSLU2-Linux
    OpenMoko

    Comments Off

    Permalink

    Debugging gsmd failures on OpenMoko

    If you’re having problems making phone calls on OpenMoko 2007.2, and wish to see what gsmd is doing, then look in /tmp/gsm.log for the gory details …
    Mine fails to register automatically, as documented in http://lists.openmoko.org/pipermail/gsmd-devel/2007-August/000205.html - this seems to be a problem where libmokogsmd2 is not handling a GSMD_NETREG_UNREG_BUSY event correctly.

    Update: this problem with UNREG_BUSY has now been fixed with the patch that I submitted.

    OpenMoko

    Comments Off

    Permalink

    Stopping the OpenMoko startup sound

    OpenMoko 2007.2 makes a very loud startup sound.  To mute it, do the following:

    In /etc/pulse/session, replace:

     load-sample startup /usr/share/openmoko/sounds/startup_openmoko.wav

    with:

     load-sample startup /usr/share/openmoko/sounds/touchscreen_click.wav

    (or any other subdued wav file you wish to upload onto the device).

    Update: The OpenMoko team has sensibly replaced the load startup sound with a much more unintrusive sound.

    OpenMoko

    Comments Off

    Permalink

    Connecting a Treo650 to an OpenEmbedded-based firmware distribution

    The following should work for an NSLU2 running SlugOS or Angstrom, or a device running OpenMoko.

    • Install the required kernel modules for bluetooth
      • ipkg install kernel-module-hci-usb kernel-module-l2cap kernel-module-rfcomm
      • depmod -a
      • ipkg install bluez-utils
    • Edit /etc/default/bluetooth to enable hcid and dund.
    • Change the pin and host settings in /etc/bluetooth/hcid.conf, and make sure that the class is 0×3e0100 (not the default value, which is for a PDA like a Zaurus, not a “Computer” device like the Neo which can accept and route tcp/ip network connections coming in over dund or pand on the bluetooth network)
    • Reboot and test with ‘hciconfig’ with a bluetooth dongle plugged in.
    • Install the required kernel modules for ppp
      • ipkg install kernel-module-ppp-async kernel-module-bsd-comp kernel-module-ppp-deflate
      • depmod -a
      • ipkg install ppp
    • Edit /etc/ppp/options as follows:

      noauth
      crtscts
      lock
      local
      proxyarp
      ktune
      192.168.1.XX:192.168.1.YY
      ms-dns 192.168.1.ZZ

      (edit the last two lines to suit your network topology, the first IP address
      is your gateway device, the second IP address will be assigned to the client,
      and the third IP address is your DNS server)

    NSLU2-Linux
    OpenMoko

    Comments Off

    Permalink

    Using vncserver on the Nokia N800

    There is a VNC Server available for the Nokia N800.

    Some key bindings that I have found:

    • F3
      • Selects the Applications icon in the task navigator
    • F4
      • Opens the menu for the current application
    • F6
      • Toggles full screen mode
    • F7
      • Same as the + button
    • F8
      • Same as the - button
    • F9
      • Selects the application switcher (the >> button in the left hand bottom corner)

    Nokia N800

    Comments Off

    Permalink