Advanced features
5 July 2003

Remote x-windows

You can create an x-window session that runs the ipaq on my locla screen, or for that matter on a projector:
  • Some fun things you can do with this connection include:
  • Using FTP to transfer files back and forth
  • Using the hosts keyboard/mouse on the iPAQ with x2x
  • Or let the iPAQ manage a screen of its own on your host (there may be better ways to do this, however it worked for me on a SuSE 7.1 system):
  • Start a "naked" X-server on the host: X :1 &
  • This should also work if another server is already running. Usually you can switch screens with Ctrl+Alt+Fx (x=7,8,..)
  • Now give your iPAQ permission to draw on the new screen. Bring up an xterm on the new screen: xterm -display :1
  • Switch to the new screen and do: xhost +
  • Let the iPAQ windowmanager take control over that screen - on the iPAQ enter blackbox -display :1 &
Voila, your iPAQ now has a mouse, keyboard, 1024x768x16bpp... -- source

Running X programs on the iPAQ with display set to the host: xterm -display 192.168.1.100:0

Running X programs on the host with display set to the iPAQ: gimp -display 192.168.1.101:0

Note: For either of the above to work, the X servers need to enable access control to the display. You can do this by running xhost like this: "xhost 192.168.0.2"

Set up hotplug or usbmgr on a debian system

On debian systems, you can use the usbmgr and the hotplug package for setting up USB on the host side.
It turns out the word is "or" -- the two packages conflict, and I have hotplug.  It's probably better to stick with hotplug, even though you're not using it much, as it's aggressively maintained.

Add the following lines to /etc/usbmgr/usbmgr.conf:

vendor 0x49f product 0x505a module usbnet script ipaq_usb
class 0xff subclass 0x0 protocol 0x0 module usbnet script ipaq_usb
Run "update_usbdb /etc/usbmgr/usbmgr.conf".
Add the ipaq_usb script to /etc/usbmgr directory, which looks like this:
#!/bin/sh
IFUP=/sbin/ifup
IFDOWN=/sbin/ifdown
DEV=`grep usb /proc/net/dev | cut -d : -f 1`
for dev in $DEV
do
   case $ACTION in
      add)
        modprobe usbnet
        ifdown usb0
        ifup usb0
        ;;
      remove)
        ifdown usb0
        modprobe -r usbnet
        ;;
   esac
I have no idea if this is a good idea or not. Someone comments you don't need to do modprobe, as usbmgr does this for you.

UsbNet -- see linux 2.4 kernel instruction and linux 2.6 kernel instructions

Bridging

"In familiar 0.6 pre and later, there is /etc/network/interfaces that will allow you to configure the settings for your USB net device. Set everyuthing up in this file, modprobe usb-eth, modprobe usbnet and slap the ipaq in the USB cradle.

On the PC end, I like to use 802.1d bridiging to make my iPaq look like it's on my local LAN. This is possible since the USB networking emulates ethernet. just plug it in, take your primary etherenet device (local LAN) to unnumbered (ifconfig eth0 0.0.0.0 up), add it to a bridge (brctl addbr br0;brctl addif br0 eth0), give the bridge an IP (ip addr add 192.168.0.2 dev), add your default route back in (ip route add default via 192.168.0.1), then finally bring up usb0 as unnumbered and add it to the bridge (ip link set usb0 up;brctl addif br0 usb0). If you have other switches on your network, you may wish to change spanning tree settings to avoid odd things, but this is beyond the scope of this document.

Once you have the bridge set up with your primary LAN device, upon hotplug you only need to set the usb0 link up and add it back into the bridge (ip link set usb0 up;brctl addif br0 usb0) from your hotplug scripts (if you use them)."
Simple, eh? I do have the bridge module. See details.

 

 

top