1 This is a LUFS filesystem module allowing to access the filesystem of
2 a Windows CE device (HP (Compaq) Ipaq, HP Jornada, etc...)
4 Because of limitations of the current version of librapi not all
5 filesystem operations are supported. Specifically, file read and
6 write are performed only at file open and file close. Opening files
7 in read-write mode is not supported.
9 This code uses librapi library from the SynCE project. For
10 convenience asyncd source code from that project is also included in
13 http://synce.sourceforge.org
15 SOURCES OF ADDITIONAL INFORMATION
17 http://synce.sourceforge.org
18 http://www.handhelds.org
22 A Windows CE device :)
26 To use the CEFS module you should be able to connect your Windows CE
27 device to the Linux box using serial cable, USB, or IRDA.
29 Here I give some explanations of how to setup the connection between
30 the Linux box and PDA. It is described in many places, so you may
31 find it interesting to compare the description here with bits of
32 information you can read on http://synce.sourceforge.org
33 http://www.handhelds.org and in Documentation/usb/usb-serial.txt in
39 In any case you should setup asyncd -- a daemon to keep the connection
40 up. Notice, that if you protected you Windows CE device with a
41 password (which is generally quite a good idea), you should change it
42 from the default value "1234" in asyncd.c recompile and reinstall
43 asyncd. Long passwords are not supported now.
45 1) add the following line to /etc/services :
47 dccm 5679/tcp # ActiveSync KeepAlive
49 2) configure your Inetd super-daemon (either inetd, or xinetd), so that client/asyncd is
50 fired whenever someone initiates a TCP connect on port 5679 on your
51 computer (insert the prefix you used in ./configure instead of the default /usr/local):
53 * inetd : add the following line to /etc/inetd.conf
54 -------------------------------------------------------------
55 asyncd stream tcp nowait lufs /usr/local/bin/asyncd asyncd
56 -------------------------------------------------------------
58 * xinetd : add the following file (asyncd) to /etc/xinetd.d :
59 -------------------------------------------------------------
63 flags = REUSE NOLIBWRAP
67 server = /usr/local/bin/asyncd
68 log_on_failure += USERID
69 only_from = 127.0.0.1 192.168.131.0/24
72 -------------------------------------------------------------
74 (xinetd : replace the line 'only_from' with your local network mask (the one where your
75 CE device will be calling from, or disable it completly)
78 II. Physical link setup
80 II.A Serial link setup.
82 Here you have a lot of variants. The simplest is:
86 Create the following file (cedevice) in /etc/ppp/peers :
87 -------------------------------------------------------------
88 /dev/ttyS1 115200 modem
89 connect '/usr/sbin/chat -v CLIENT "CLIENT\c" "" "SERVER\c"'
92 192.168.131.102:192.168.131.201
93 ms-dns 192.168.131.102
97 -------------------------------------------------------------
99 To start the communications you'll have to run (as root):
103 This should start your Windows CE device, and start a PPP link.
104 Check that your PPP configuration shows the link, and check that 'asyncd' has
105 created a file '/tmp/cedevice' which contains the informations on your device (
106 IP address, brand, etc...)
111 As an alternative method you can use mgetty to automatically start the
112 link on connection of your PDA to the computer. It is a very simple
113 setup, assuming that you don't have dialin connections.
115 Add the following lines to /etc/mgetty+sendfax/mgetty.config:
116 ------------------------------------------------------------------------
117 # WinCE connection: port ttyS1
121 issue-file /etc/ppp/wince.issue
122 ------------------------------------------------------------------------
123 Add this to /etc/mgetty+sendfax/login.config:
124 ------------------------------------------------------------------------
126 /AutoPPP/ - a_ppp /usr/sbin/pppd file /etc/ppp/wince
127 ------------------------------------------------------------------------
128 Create the file /etc/ppp/wince.issue:
129 ------------------------------------------------------------------------
133 ------------------------------------------------------------------------
134 and the file /etc/ppp/wince:
135 ------------------------------------------------------------------------
139 192.168.131.102:192.168.131.201
140 ms-dns 192.168.131.102
144 ------------------------------------------------------------------------
149 If you have an old kernel, you can try to use ipaqd from SynCE
150 project. Here I'll describe usage if ipaq module present in kernel
151 (starting at least from 2.4.18 ar maybe earlier). Generally, you
152 should first look at the file Documentation/usb/usb-serial.txt in your
153 kernel source. BUT: Don't believe the words written there abut uhci.o
154 and usb-uhci.o modules. In my case it works _only_ with usb-uhci and
155 does not work at all with uhci. Maybe in some cases opposite is
156 better, I don't know.
158 Also you shold make a special version of chat. To get it, recompile
159 the ppp distribution after applying the patch ppp-chat.patch in the
160 'other' directory. This will make the chat program which does not
161 make intercharacter delay. For some reason In my case it is crucially
162 needed to make things work. Maybe it is not always the case, so you
163 may try first without this, and do this only if your PDA freezes
164 during establishing connection with the computer. Another patch that
165 was needed in my case is ppp-pppd.patch, which _adds_ some delay
166 between ppp control packets. It is really a patch that I don't
167 understand, but it helped in my case.
169 You should install hotplug, to use USB. Here I give an example setup.
170 Create the file /etc/hotplug/usb/ipaq:
171 ------------------------------------------------------------------------
172 #!/bin/bash echo $REMOVER created >>/tmp/ipaqlog cat >$REMOVER
175 if [ -f /var/lock/LCK..ttyUSB0 ]
177 kill -9 `cat /var/lock/LCK..ttyUSB0`
182 REMOTEIP=192.168.131.201
183 MYDNS=192.168.131.102
185 if [ -f /var/lock/LCK..ttyUSB0 ]
187 kill -9 `cat /var/lock/LCK..ttyUSB0`
189 /usr/sbin/pppd.ipaq /dev/ttyUSB0 \
190 connect "/usr/sbin/chat.nopause -v TIMEOUT 60 CLIENT 'CLIENTSERVER\c'" \
191 nocrtscts local passive $MYIP:$REMOTEIP ms-dns $MYDNS noauth
192 -----------------------------------------------------------------------
193 And apply the following patch to /etc/hotplug/usb.agent
194 ------------------------------------------------------------------------
195 --- /home/fedor/usb.agent Mon Sep 23 00:28:48 2002
196 +++ /etc/hotplug/usb.agent Thu Apr 11 10:38:36 2002
201 + if [ "$PRODUCT" = "49f/3/0" ]; then # Compaq Ipaq 3760
202 + /etc/hotplug/usb/ipaq
205 + if [ "$PRODUCT" = "3f0/1116/0" ]; then # HP Jornada 568
206 + /etc/hotplug/usb/ipaq
210 # on 2.4 systems, modutils 2.4.2+ maintains MAP_CURRENT
211 # ... otherwise we can't rely on it (sigh)
213 ________________________________________________________________________
218 To be written. But it works, it was checked. Ask, if you are interested.
223 Nothing additional to general lufs setup!
228 Simply mount the filesystem after connecting your PDA with a command
231 mount -t lufs -o fs=cefs none /mnt/lufs
233 No additional options, instead of general LuFS options uid, gid, fmask
234 and dmask are present.
236 And umount it before disconnecting. It may be a good idea to setup
237 automounter to do this.
241 <fedor@ms2.inr.ac.ru>