The Linux iPAQ HOWTO: Instructions for Familiar v0.5.3 | ||
---|---|---|
Prev | Chapter 1. Connecting a PocketPC iPAQ to a GNU/Linux host | Next |
Although the iPAQ's cradle has an USB cable, we will not be able to use it while the iPAQ is running PocketPC, as its use is limited to the proprietary ActiveSync program.
The only possibility will be to use the slower serial cable attached to the cradle and PPP (Point to Point protocol), which provides a way to use TCP/IP over a serial line. In Chapter 6, as GNU/Linux is installed, we will setup a faster USB network.
For now, we will have to setup PPP both on the PocketPC iPAQ and on the GNU/Linux host.
On the GNU/Linux host, PPP is implemented by the pppd command, which uses either options specified after the name pppd on the command line, separated by space characters, or a configuration file. This method will be preferred, as it is tedious to type the same things over and over.
The configuration file can have any name, but is best if placed in the directory /etc/ppp/peers, where pppd will look for its configuration files. In this document, I will use a file named /etc/ppp/peers/PocketPC.
The content of this file is as follows:
# /etc/ppp/peers/PocketPC -*- sh -*- pppd options for direct iPAQ connection # created 08-May-2002 Michel Stempin <michel.stempin@wanadoo.fr> # autodate: 08-May-2002 # autotime: 16:38 # The serial line to use. Use either "/dev/ttyS0" for "COM1" or "/dev/ttyS1" # for "COM2" PC ports. /dev/ttyS1 # Set the speed to 115200 bps. 115200 # As PocketPC considers us as a modem ;-), we have to pretend by sending # the expected answers. # For this, we use the "chat" program and "expect/send" pairs. You can specify # the "-v" option to /usr/sbin/chat if you want to debug the "modem" initial dialog. # Basically, the chat is (\r means a <CR>, i.e. a Carriage Return character): # - expect ATZ<CR> (reset modem command) # - send OK<CR> # - expect AT<CR> (are you here? command) # - send OK<CR> # - expect ATE0V1&C1&D2<CR> (disable echo, # send ASCII result codes, # Carrier Detect pin is used, # Data Terminal Ready pins reflects online state), # - send OK<CR> # - expect AS7=120<CR> (timeout 120s waiting for Carrier) # - send OK<CR> # - expect ATX3<CR> (ignore dial tone, report BUSY) # - send OK<CR> # - expect ATDT<CR> (dial using tone modulation) # - send CONNECT<CR> connect "/usr/sbin/chat 'ATZ\r' OK 'AT\r' OK 'ATE0V1&C1&D2\r' \ OK 'ATS7=120\r' OK 'ATX3\r' OK 'ATDT' CONNECT" # async character map -- 32-bit hex; each bit is a character # that needs to be escaped for pppd to receive it. 0x00000001 # represents '\x01', and 0x80000000 represents '\x1f'. asyncmap 0 # Do not require PocketPC to authenticate itself before allowing network # packets to be sent or received. # NOTE: This option is only available to the "root" user. noauth # No hardware flow control (i.e. RTS/CTS) to control the flow of data # on the serial port, as the iPAQ seems not to handle it. nocrtscts # Don't use the modem control lines local # Specifies that pppd should use a UUCP-style lock on the serial device # to ensure exclusive access to the device. lock # Don't fork to become a background process (otherwise pppd will do so # if a serial device is specified). -detach # Increase debugging level (same as -d). If this option is given, pppd # will log the contents of all control packets sent or received in a # readable form. The packets are logged through syslog with facility # daemon and level debug. This information can be directed to a file by # setting up /etc/syslog.conf appropriately (see syslog.conf(5)). (If # pppd is compiled with extra debugging enabled, it will log messages # using facility local2 instead of daemon). #debug # Enable debugging code in the kernel-level PPP driver. The argument n # is a number which is the sum of the following values: 1 to enable # general debug messages, 2 to request that the contents of received # packets be printed, and 4 to request that the contents of transmitted # packets be printed. #kdebug 7 # Sets the IP addresses on both side of the link. 192.168.1.100:192.168.1.101 |
As a convenience, we will add the following line to the /etc/hosts file:
192.168.1.101 ipaq ipaq.localdomain |
This will allow us to connect to the iPAQ using its name, instead of its IP address. This can be achieved using you favorite text editor, or with the following simple command:
bash# echo "192.168.1.101 ipaq ipaq.localdomain" >> /etc/hosts |