Freecom FSG-3

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

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

Adding DCHP static mapping support to the FSG-3

The Freecom FSG-3 firmware user interface does not have the ability to set static IP addresses for hosts via DHCP. Luckily, the underlying dnsmasq program does this (and lots more) easily, and even though dnsmasq is in /usr/local/sbin for some reason on the FSG-3, it still reads the default configuration file at /etc/dnsmasq.conf (which Freecom does not use, so the file does not exist by default, and therefore does not get overwritten by the default firmware).

To set static IP addresses for your hosts, just add lines like the following to /etc/dnsmasq.conf:

dhcp-host=00:04:5a:0f:b2:44,nslu2,192.168.1.6,infinite

Freecom FSG-3

Comments Off

Permalink

Adding zoneedit.com dynamic DNS support to the FSG-3

ez-ipupdate already supports the zoneedit service, so all that is required is to add it to the dyndns_show.html web page and ddns init script.

/var/www/admin/content_en/dyndns_show.html changes:

<select name=”ddns_service” style=”width:200px”>
<option value=zoneedit_com>zoneedit.com</option>
<option value=dyndns_org>dyndns.org</option>
<option value=dtdns_com>dtdns.com</option>
<option value=noip_com>no-ip.com</option>
</select>

/etc/init.d/ddns changes:

if [ “$DDNS” = “zoneedit_com” ]; then
/bin/ez-ipupdate -i $EXIF -S zoneedit -u $USER:$PASSWD -h “$HOST” -d -P 300
exit 0
fi

Freecom FSG-3

Comments Off

Permalink