3.9. Connecting from Linux to WinCE 3.0 (aka PocketPC)

This chapter is a courtesy of Stanislav Sokolov.

This section covers how to connect a PocketPC device to a Linux
box. The information provided in section "Connecting from Linux to
WinCE" (found also at
CEwindows
)
does not apply to PocketPC as Microsoft in one of there brighter
moments removed support for direct IrDA connections from version 3.0 of
WinCE. I used the document "Linux to Windows CE Connection" (found at
The Gadgeteer
) as a starting point, but
had to modify and simplify several aspects. This section will go as
far as ping between PocketPC and Linux. You should be able to find
many networking applications at
PDAcentral,
CAM
or
WinCEcity
.

Here is the system I used:

Compaq iPAQ with PocketPC Version 3.0.9348 (I don't know if this
would work for PocketPC 2002 as Microsoft likes changing standards
from version to version).

On the Linux side was a Compaq LTE5250 laptop with Slackware Linux 7.1.

Kernel 2.4.19

PPP 2.4.1 (PPP must not be older than 2.4.0 when used with kernel 2.4.x)

On the PocketPC side go to Start -> Settings -> Connection -> Modem.
Make a new connection, call it something meaningful (I use
Linux-m), choose "Generic IrDA modem", set baud rate to 115200. Tap
"Advanced". In "Port Settings" select 8-N-1-Hardware and check "Enter
dialing commands manually". This is done so as PocketPC would not try
to dial a phone number as we do not want it. The other two boxes
should remain unchecked. In TCP/IP select "Use server-assigned IP
address" uncheck "Use Slip", but check "Use software compression" and
"Use IP header compression". In "name Servers" select "Use
server-assigned addresses". Tap "ok" and "Next". You should not be
asked for telephone number (if you are, just enter 1 and doublecheck
that you actually selected manual dialing commands box in advanced
section). Make sure that "Cancel call..." and "Wait for dial tone..."
boxes are unchecked. We are now done with the PocketPC part.

On Linux we must first make sure that all the necessary modules are
loaded. Here are the modules that were loaded and in use during a
successful communication session:

Now the connection itself: Align the IR ports and on the PocketPC go
to Start -> Programs -> Connections and tap the connection that you
created (Linux-m). In the "Connect To" dialog that shows up leave
everything unfilled and just tap on "Connect". "Manual Dialing
Terminal" will show up. There you should see the login prompt for
your Linux-box (If the login prompt does not show up at once, bring up
the virtual keyboard and tap 'enter'). You do not need to login
(though it is a bonus - speaking of the ultimate remote controller :)

On the Linux-box execute the pppd command as soon as some "garbage"
shows up in the PocketPC's terminal, tap "File" -> "Continue".
pppd should come with the following message:

getty is started. It will not start if
/dev/ircomm0 is not
configured. That is modprobe ircomm-tty
should come up before getty is invoked.

"Enter dialing commands manually" is checked. PocketPC should not
attempt to dial any number!

You have async PPP support in kernel. modprobe ppp_async
loads successfully or you don't have PPP async compiled into kernel. Otherwise you
will get the "Couldn't set tty to PPP discipline: Invalid argument" error
message.