hi greg, list,
attached is a patch for linux usb support for ipaqs running wince
3.0
what this is:
- a linux usb driver for the compaq ipaq series of handhelds running
windows ce 3.0. currently only tested with an ipaq h3135 with a usb
autosync cable. it ought to work with other models running wince 3.0.
may work on other ce devices. you can establish a ppp link with the
ipaq, which can be used to transfer files, backup, download mail,
browse etc. AFAIK, both serial and infrared can do only upto
115kbits/sec. with the usb driver, you can get much faster transfer
speeds - about 100kbytes/sec. also, many ipaqs (e.g. mine) are bundled
only with a usb cable.
driver related issues:
- the driver was written by looking through usbsniff/win98 traces and
usbdevfs traces with vmware 3.0. it's a relatively simple usbserial
driver. the only funny stuff is a couple of control messages in
ipaq_open().
- the driver works reliably only with the uhci driver. with usb-uhci,
it usually works a couple of times but fails later. soft-resets of
the ipaq don't help. this also happens with activesync on win98
guest/linux host and vmware 3.0. using uhci fixes it here as well.
- even with uhci, queued bulk writes don't seem to work. so the strategy
used by visor.c won't work here. instead, we have a single write urb
similar to the generic usbserial driver. however, we also queue upto
64k of data coming in from the line discipline, so that the write
urb callback can immediately issue the next write without waiting for
the ldisc to wake up.
- on 2.4.7-10, with the uhci driver, I get linux->ipaq speeds upto 73
kbytes/sec and ipaq->linux speeds upto 113 kbytes/sec. this
compares well with activesync/win98 speeds. but with
2.4.16 it slows to a crawl. I barely get ipaq->linux speeds of
14 kbytes/sec. linux->ipaq also slows down, but not by so much.
all testing done by copying a 1 megabyte file using ftpView.
- the patch does not include additions to Configure.help and
Documentation/usb/usb-serial.txt. I'll write them up as soon as I get
some feedback on how well/poorly it works with different combinations.
usage:
- the patch should apply cleanly to 2.4.16. with a little effort it
should apply to 2.4.7-10 (redhat 7.2) as well. configure, compile.
- the usb-uhci module is usually loaded by default. rmmod usb-uhci,
insmod uhci, insmod usbserial, insmod ipaq.o
- setup hotplug to start pppd when the ipaq is connected. quick and
dirty way is to patch /etc/hotplug/usb.agent as follows:
--- usb.agent.ORG Wed Dec 5 15:39:00 2001
+++ usb.agent Fri Dec 7 13:40:22 2001
@@ -281,6 +281,10 @@
FOUND=false
LABEL="USB product $PRODUCT"
+ if [ "$PRODUCT" = "49f/3/0" ]; then
+ /etc/hotplug/usb/ipaq
+ exit 0
+ fi
# on 2.4 systems, modutils 2.4.2+ maintains MAP_CURRENT
# ... otherwise we can't rely on it (sigh)
case "$KERNEL" in
- write a script /etc/hotplug/usb/ipaq to start pppd. the following
works for me:
#!/bin/bash
MYIP=your.ip.here
REMOTEIP=ipaq.ip.here
MYDNS=
killall -9 pppd
/usr/sbin/pppd /dev/ttyUSB0 connect "/usr/sbin/chat -v TIMEOUT 60 CLIENT
'CLIENTSERVER\c'" nocrtscts local debug passive $MYIP:$REMOTEIP ms-dns $MYDNS noauth
proxyarp
- look at http://synce.sourceforge.net for software to synchronize ce
devices. you will at least want to download and install the asyncd
module.
- connect the ipaq with the serial autosync cable and cross your fingers.
once connected, you can use wince programs like ftpView on the ipaq side
and other synce tools on the linux side. remember to enable forwarding
and/or masquerading otherwise you'll only be able to access the linux
host box.
note that you _can't_ use pocket ie in this mode thanks to incredible
stupidity on the part of microsoft. look at
http://www.tekguru.co.uk/EM500/usbtonet.htm for instructions on how to
do it. a small modification is required, at least for my ipaq - disable
autosync by going to settings/connections/pc and unchecking the box.
go to start/programs/connections, connect the cable and select "usbdial"
(or whatever you named your new connection).
troubleshooting:
- make sure you're using the uhci module.
- turn on debugging in usbserial as well as ipaq by specifying debug=1
at insmod time. e.g. insmod usbserial debug=1; insmod ipaq debug=1
if not already added, add the line
*.debug /var/log/debug
to /etc/syslogd.conf, killall -HUP syslogd
look through /var/log/debug
if you don't get a message like
Dec 17 22:48:48 tuxtop kernel: ipaq.c: ipaq_open - port 0
it means that it never even got to the driver. try a soft reset of your
ipaq before trying again.
feedback:
- any kind of feedback most welcome. if it works for you, please drop me
a line indicating which model and which kernel version you are using.
if it didn't, please turn on debugging and mail me the relevant lines
of syslog messages. my email address is <[EMAIL PROTECTED]>
thanks,
ganesh
ipaqdriver.patch.gz
Description: ipaq usb driver
