-rw-r--r-- | root/HOWTO-NewPPP | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/root/HOWTO-NewPPP b/root/HOWTO-NewPPP new file mode 100644 index 0000000..4de0cc8 --- a/dev/null +++ b/root/HOWTO-NewPPP | |||
@@ -0,0 +1,149 @@ | |||
1 | Qtopia now supports PPP connections to the handheld from both | ||
2 | Linux and Windows systems. This means you can use all the usual | ||
3 | TCP/IP software such as Telnet, SSH, FTP, and HTTP to communicate | ||
4 | between the desktop and handheld. This facility is used in the | ||
5 | synchronization framework. | ||
6 | |||
7 | |||
8 | Creating a unattended PPP connection. | ||
9 | |||
10 | On trying to create a connection between a Windows 2000 box and the IPaq, it | ||
11 | was discovered that there was a strange issue with the Direct Connection | ||
12 | driver. It caused problems on opening up a terminal to do the login. | ||
13 | Furthermore, scripting appeared to be broken, at least on Service Pack 2. | ||
14 | So we needed to come up with an alternate way to make a connection, not | ||
15 | involving a login. | ||
16 | |||
17 | On a direct cable connection, Windows 2000 sends CLIENT over the line, | ||
18 | expecting something from the server to be sent back before it will start its | ||
19 | PPP communication. What follows is what are instructions for modifying the | ||
20 | IPaq to accept Windows 2000 connections, Configuring Windows 2000 to connect | ||
21 | to the IPaq, and the modifications that need to be done to a Linux machine | ||
22 | to connect to the IPaq again. I'll finish it off with a few known issues. | ||
23 | |||
24 | Setting up the IPaq (Server). | ||
25 | |||
26 | Setting up the IPaq is fairly painless. Just install the ppp.ipk | ||
27 | If that is not an option, here are the relevant changes you need to make. | ||
28 | |||
29 | 1. First back up these files: /etc/hosts, /etc/ppp/options, and /etc/inittab. | ||
30 | 2. Make you hosts file look like the following. Note that IPaq will be the | ||
31 | address of your device and desktop the IP of you machine. | ||
32 | #/etc/hosts | ||
33 | 127.0.0.1 localhost familiar | ||
34 | 192.168.1.101 ipaq | ||
35 | 192.168.1.100 desktop | ||
36 | 3. Create a /etc/ppp/scripts directory. | ||
37 | 4. Add the file, winclient.chat, to /etc/ppp/scripts. It will look like: | ||
38 | # /etc/ppp/options/winclient.chat | ||
39 | TIMEOUT 3600 | ||
40 | CLIENT CLIENTSERVER\c | ||
41 | 5. Make your /etc/ppp/options file look like this, you may have | ||
42 | to replace the connect line with the proper chat location: | ||
43 | #/etc/ppp/options | ||
44 | connect '/usr/sbin/chat -v -s -f /etc/ppp/scripts/winclient.chat' | ||
45 | -detach | ||
46 | asyncmap 0 | ||
47 | crtscts | ||
48 | local | ||
49 | lock | ||
50 | /dev/ttySA0 | ||
51 | 115200 | ||
52 | ipaq:desktop | ||
53 | 6. Now you have to edit you /etc/inittab, since this is a fairly large file, | ||
54 | I will tell you what to change. At the bottom of the file there is | ||
55 | probably a reference to a getty process that runs on the serial port that | ||
56 | looks something like this. | ||
57 | T0:23:respawn:/sbin/getty -L ttySA0 115200 vt100 | ||
58 | We want to pppd running on this port too, and we can't have getty running | ||
59 | at the same time. So remove the above getty line and add these two lines. | ||
60 | T0:45:respawn:/sbin/getty -L ttySA0 115200 vt100 | ||
61 | pd:23:respawn:/usr/sbin/pppd /dev/ttySA0 -detach | ||
62 | What this does is create a pppd process that will listen at run levels 2 and | ||
63 | 3. And a getty process at run levels 4 and 5. This is an insurance method. | ||
64 | This way you can use the terminal in the Qtopia Environment and change | ||
65 | the run level to run a getty on the serial console in case you would need | ||
66 | the it. | ||
67 | 7. Okay that's it, either have init re-read the file by running init q or | ||
68 | reboot the IPaq, which ever is more convenient. | ||
69 | |||
70 | Setting Up the Windows 2000 (Client) | ||
71 | |||
72 | Setting up the Windows 2000 connection is also fairly painless. Follow the steps | ||
73 | below, it doesn't hurt to be in the Administrator group. First we need to | ||
74 | make sure that Windows 2000 knows that you want a serial connection. While the | ||
75 | New Connection Wizard will normally allow you to pick the correct port, | ||
76 | sometimes it won't. To avoid problems, we'll install it ourselves. | ||
77 | |||
78 | To install the "serial cradle" | ||
79 | 1. Load up the Control Panel (Select Settings*Control Panel from the Start Menu) | ||
80 | 2. Select Phones and Modems. | ||
81 | 3. Select the Modem Tab and then click the New... Button. | ||
82 | 4. In the Dialog that pops up, check the "Don't Detect I will select from | ||
83 | a list" option. | ||
84 | 5. In the standard modem types group, select the Communications Cable Between | ||
85 | Two Computers. Then click next. | ||
86 | 6. Select the COM port that your IPaq is connected to, then click Finish. | ||
87 | |||
88 | Now the connection can be made. | ||
89 | 1. Select Start*Settings*Network and Dial-Up Connections | ||
90 | 2. Select "Make New Connection". This fires up the New Connection Wizard. | ||
91 | 3. In the wizard that shows up, select next to get past the introductory screen | ||
92 | 4. Select "Connect Directly to Another Computer", then click "Next". | ||
93 | 5. Select the COM port that your IPaq is connected to, then click "Next". | ||
94 | 6. Enter a meaningful name for your newly created connection and then click | ||
95 | "Finish". | ||
96 | 7. You will then be presented with a dialog asking for a user name and password | ||
97 | Just click cancel. | ||
98 | 8. Right click on your new connection and select properties. | ||
99 | 9. Click on the "Configure" button in the General tab. | ||
100 | 10. Choose the proper connection speed (in this case 115200) | ||
101 | 11. Uncheck the "Enable Hardware Flow Control" option. | ||
102 | 12. Close the Modem Configuration Dialog by clicking Ok | ||
103 | 13. In the Options Tab, uncheck the "Prompt for Name, Password, certificate, | ||
104 | etc." option. | ||
105 | 14. In the Networking Tab, uncheck the "File and Printer Sharing for Microsoft | ||
106 | Networks" and "Client for Microsoft Networks" options. In other words, only | ||
107 | the "Internet Protocol(TCP/IP)" should be checked. | ||
108 | 15. You are done, click "Ok". | ||
109 | |||
110 | Select your new connection and it a progress dialog should show up, and soon your | ||
111 | Windows 2000 machine and the IPaq are happily passing PPP frames back and | ||
112 | fourth. | ||
113 | |||
114 | Setting up a Linux Box (Client) | ||
115 | |||
116 | Since we've changed the way the IPaq deals with connections, we also need to | ||
117 | change the way a Linux client would connect to the IPaq. Basically, the options | ||
118 | file needs to be changed. We also need to emulate Windows 2000's need to emit | ||
119 | CLIENT at the beginning. Here is the chat script for that, which I would | ||
120 | recommend putting in /etc/ppp/scripts as winserver.chat | ||
121 | #/etc/ppp/scripts/winserver.chat | ||
122 | TIMEOUT 10 | ||
123 | '' CLIENT\c | ||
124 | |||
125 | Here is the new peers file for the Linux client. | ||
126 | #/etc/ppp/peers/ipaq | ||
127 | -detach | ||
128 | local | ||
129 | nocrtscts | ||
130 | lock | ||
131 | /dev/modem | ||
132 | connect '/usr/bin/chat -f /etc/ppp/scripts/winserver.chat' | ||
133 | 115200 | ||
134 | Please note that /dev/modem is a symlink that whatever COM port your IPaq is | ||
135 | on. Replace it appropriately, or create the symlink yourself. After that, you | ||
136 | should be able to just type 'pppd call ipaq' and play happily with your IPaq. | ||
137 | |||
138 | Known Issues: | ||
139 | Here are a few known issues that aren't addressed in this document, several | ||
140 | are on the shortcomings of the Windows 2000 Connection. | ||
141 | * If your screen blanks out, pppd suspends itself and the Windows 2000 ppp | ||
142 | implementation will die, however when it awakens, pppd on the IPaq will | ||
143 | be fine and won't exit, making it impossible to run connect again. | ||
144 | The best workaround for this is to disable screen blanking by uncheck-ing | ||
145 | the "Blank after some inactivity" option in the Light Settings in Qt | ||
146 | Palmtop Settings tab. If this does happen to you, the path to least | ||
147 | resistance is to reboot. | ||
148 | * When the direct cable connection is enabled on Windows 2000, the routing table | ||
149 | is changed, effectively making it impossible to use the Internet. | ||