File: connect.html

package info (click to toggle)
lg-issue33 2-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,284 kB
  • ctags: 137
  • sloc: makefile: 36; sh: 4
file content (627 lines) | stat: -rw-r--r-- 17,724 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head>
<META NAME="generator" CONTENT="lgazmail v1.1preC">
<TITLE>The Answer Guy 33: O.K. it's not a WinModem</TITLE> 
<!-- ORIGINAL SUBJECT:
connect script failed 
JTD SUBTITLE:

-->
</head>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H1 align="center"><A NAME="answer">
	<img src="../../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
	<a href="../lg_toc33.html">The Answer Guy</a>
	<img src="../../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
</A></H1> 
<BR>
<H4 align="center">By James T. Dennis,
	<a href="mailto:answerguy@ssc.com">answerguy@ssc.com</a>
	<BR>Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A> 
</H4>
<p><hr><p>
<!--endcut ========================================================= -->
<H3><img src="../../gx/dennis/qbub.gif" alt="(?)"
width="50" height="28" align="left" border="0"
>Another (Lose)-Modem</H3>
<p><strong>From Barbara Ercolano on 20 Sep 1998 </strong></p>


<p><strong>
Hi James,
I saw your "Answer Guy" page and I thought that maybe if you spare a few
minutes you might help me with solving my connection problem. I have
recently installed redhat linux on my PC and i am now trying to set up an
internet connection. I have the chatscript the ppp-on and the ppp-off
script the thing is that when i try to run the ppp-on nothing happens .
</strong></p>


<p><strong>
The syslog file says:
</strong></p>


<pre><strong>
....kernel: PPP Dynamic channel allocation code copyright 1995 <A HREF="http://www.caldera.com/">Caldera</A>, Inc.
....kernel: PPP line discipline registered
....kernel: registered device ppp0
....pppd[243]: pppd 2.2.0 started by root, uid 0
....chat[244]: timeout set to 5 seconds
</strong></pre>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>This is where the chat script sets a timeout.
</blockquote>


<pre><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>....chat[244]: sent (ATZ^M)
....chat[244]: alarm
</strong></pre>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>This is where the timeout occurs.
</blockquote>


<pre><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>....pppd[243]: Connect script failed
....chat[244]: Failed
....pppd[243]: Exit.
....kernel: PPP: ppp line discipline successfully unregistered
</strong></pre>



<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>Just from this I know that your ATZ is getting no response.
That suggests that there is not a Hayes compatible modem on
the other end of the connection.  Either you're pointing
this at the wrong device (it's going to your serial mouse)--
or you have a <EM>WINMODEM</EM>!
</blockquote>


<blockquote>
'winmodems' are <EM>NOT</EM> hayes compatible devices.  They are
little chunks of cheap hardware that can be used with
proprietary (MS Windows only) drivers to <EM>emulate</EM> a modem
--- and a measure cost in your system's CPU cycles.
</blockquote>


<p><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>this is my chatscript (/etc/ppp/chatscript)
</strong></p>

<pre><strong>TIMEOUT 5
"" ATZ
OK ATDT08450798888
ABORT 'NO CARRIER'
ABORT BUSY
ABORT 'NO DIALTONE'
ABORT WAITING
TIMEOUT 45
CONNECT ""
"ogin:" uk,ppp,myusername
"ssword:" password
</strong></pre>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>Good, you sanitized it.  It's not good to send  
usernames and passwords to public discussion fora.
</blockquote>



<p><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>this is my /usr/sbin/ppp-on script:
</strong></p>


<pre><strong>
#!/bin/sh
#
# ppp-on - Set up a PPP link
#

CFG_DIR=/etc/ppp
LOCKDIR=/var/lock

DEVICE=cua1

MYIP=0.0.0.0

if [ -f $LOCKDIR/LCK..$DEVICE ]; then
   echo "PPP device is locked"
   exit 1
fi

/usr/sbin/pppd -d /dev/$DEVICE 38400 connect "/usr/sbin/chat -v -f
$CFG_DIR/chatscript" defaultroute $MYIP: &amp;&amp; exit 0

echo "PPP call failed"
exit 1
</strong></pre>



<p><strong>
this is my /usr/sbin/ppp-off script
</strong></p>



<pre><strong>
#!/bin/sh
#
# ppp-off - Take down a PPP link
#

if [ "$1" = "" ]; then
   DEVICE=ppp0
else
   DEVICE=$1
fi


if [ -r /var/run/$DEVICE.pid ]
then
   kill -INT `cat /var/run/$DEVICE.pid`

   if [ ! "$?" = "0" ]; then
      rm -f /var/run/$DEVICE.pid
      echo "ERROR: Removed stale pid file"
      exit 1
   fi
   echo "PPP link $DEVIVE terminated"
   exit 0
fi

echo "ERROR: PPP link is not active on $DEVICE"
exit 1
</strong></pre>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>This is all much too elaborate.  I'd 
just use a command like:
</blockquote>

<blockquote> <blockquote> <code>
pppd file /etc/ppp/myisp.options
</code> </blockquote> </blockquote>

<blockquote>
... and let it contain all the other options specific to
this ISP.
</blockquote>


<blockquote>
pppd will read the global options file (<tt>/etc/ppp/options</tt>)
which in most cases should just contain the "lock" 
directive.
</blockquote>



<p><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>this is my /etc/ppp/options file:
</strong></p>


<pre><strong>0.0.0.0:
/dev/cua1
</strong></pre>



<blockquote>
The cua* devices are deprecated.  Use ttyS* instead.
</blockquote>


<pre><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>lock
crtscts
defaultroute
asyncmap 0
mtu 296
mru 296
</strong></pre>


<p><strong>
this is my etc/resolv.conf
</strong></p>


<pre><strong>search netcomuk.co.uk
nameserver 194.42.224.130 194.42.224.131
</strong></pre>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>This is irrelevent to getting the modem to
dial (chat).    Also it is interesting that you sanitized
your login name and password but left in this identifier.
</blockquote>


<blockquote>
Oddly enough you can use just about any nameserver on the
Internet --- not just the one that your ISP provides.
I've occasionally used the nameserver from one of my
former employers when setting up a new machine at a 
customer site --- just long enough to have DNS to 
'dig' up the more appropriate and closer nameservers
(which should <EM>all</EM> have names or CNAMES of the form: 
ns*.foo.org in my not-so-humble-opinion).
</blockquote>


<p><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>This is all i can think of... mmhhh. I am not sure this is relevant but i
tried to run minicom as well and that didn't work either, I mean it seems
to be getting stuck... anuway... i hope you can help me...
</strong></p>


<blockquote>
If you can't get a boring old terminal emulation package
like 'minicom', 'ckermit' talking to your modem --- then 
it is quite relevant to your problems running SLIP, PPP, 
fax, or anything else to that modem.   The simplest think 
you can do to a modem is send it an ATZ and get an OK
response.  If you can't do that --- the modem 
(or your serial port, or your way of talking to the 
serial port) isn't working.
</blockquote>


<p><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>Thanks a lot for your time
<br>love
<br>Barbara
</strong></p>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>No problem.  Please, chuck that winmodem and 
get a real, Hayes compatible.
</blockquote>

<!-- end body -->

<P> <hr width="40%" align="center"> <P>
<!--                          .............................          -->


<H3><img src="../../gx/dennis/qbub.gif" alt="(?)"
width="50" height="28" align="left" border="0"
>O.K. It's not a Winmodem</H3>
<p><strong>From Barbara Ercolano on 20 Sep 1998 </strong></p>
<!-- begin body -->


<strong><p>
Hi James,
thanks for your email... I am not sure whether i have a winmodem ....
my modem's a Hayes Accura 336 External Fax Modem...
</p></strong>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>By their nature winmodems must be internal.  Since you 
have an external modem (and a Hayes (TM) brand one
at that) we can rule out that as the culprit.
</blockquote>


<blockquote>
This leads us to the next possibility.  I mentioned that
it might be a problem between the OS and your serial
hardware.
</blockquote>


<blockquote>
If you are using the correct /dev/ttyS* node --- then
the next mostly likely problem is an interrupts 
conflict.
</blockquote>


<blockquote>
Is this a  (PnP) "Plug and Pray" system?  (Reboot and
get into the CMOS setup program to look for those features).
If so, try disabling that and setting all of your COM and
printer ports to manually selected, non-conflicting ranges.
</blockquote>


<blockquote>
One of the bugaboos about Linux and most other Unix variants
is that they tend not tolerate IRQ's conflicts the way that
MS-DOS and Win 95 might.  (This tendency in DOS and Windows
probably leads to some of the intermittent hands and that
you see with those OS').  So, you should not set your COM2
and COM3 ports on the same IRQ.
</blockquote>


<blockquote>
First, read the Linux Serial HOWTO.  It will go into 
excruciating detail about the topic.  Next play with
commands like 'statserial' and 'setserial' and look at
the /proc/interrupts and /proc/ioports psuedo-files.
Also the boot up messages might help.
</blockquote>


<blockquote>
Also I think i have got the right port ttyS1 (cua1) for COM2...
I have tried running minicom, and the init string appeared whith my cursor
at the end of it, so i pressed enter and nothing happened after that (I
should have got OK, shouldn't I?) I tried to enter my username and password
(even though no login prompt appeared), and again nothing really happened I
saw the modem blink but that's about it, so i exited minicom without
resetting and looked at the syslog file... it said something about the line
not being 8-bit clean and that bit 7 was set to zero.... all this has
</blockquote>


<blockquote>
I'm glad you looked in the syslog --- I don't think I
remembered to suggest that in my earlier response.
</blockquote>


<blockquote>
This could be a cabling or IRQ problem.  Make sure that 
the modem cable is a good one.  I used to see problems
with cheap cables that didn't have all of the handshaking
lines connected and things like that. 
</blockquote>


<strong><p><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>absolutely no meaning to me whatsoever... I thought maybe you'd find it
more illuminating.
<br>Thanks a lot for your time
<br>Cheers,
<br>Barbara
</p></strong>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>Yes, I was wrong to assume that it was a winmodem (I've been
getting too many of those recently) but it looks like I'm
still on the right track.  There is some problem with 
Linux's ability to talk to the device --- in this case it's
either having trouble talking to the serial port --- or the
cable isn't relaying that to the modem.  Or, it is still 
possible that you just have the wrong ttyS* port.  Try the
others, ttyS0 through ttyS3 for good measure.  (If your
modem is working on one of those --- skip that one).
</blockquote>
<!-- end body -->

<P> <hr width="40%" align="center"> <P>
<!--                          .............................          -->


<H3><img src="../../gx/dennis/qbub.gif" alt="(?)"
width="50" height="28" align="left" border="0"
>Yet More on the Serial Port (it's not a WinModem) thing...</H3>
<p><strong>From Barbara Ercolano on 21 Sep 1998 </strong></p>
<!-- begin body -->


<p><strong>
Hi ... it's me again , still tryin'...
I've just done
</strong></p>



<p><code><strong>cat /proc/interrupts</strong></code></p>



<p><strong>
and this is what i've got:
</strong></p>


<p><strong>
0: 646864  timer
1:   2933  keyboard
2:      0  cascade
4:   2457 +serial
8:      1 +rtc
13:     0  matherror
14: 71407 +ide0
</strong></p>


<p><strong>
now the question is , shouldn't i get two lines saying serial if my modem
was correctly installed??? The 4:  2457 +  serial line is the mouse isn't
it?
</strong></p>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>Yes.  You probably should have another line there.
But what about the rest of the suggestions in the 
Serial-HOWTO.  Did you read through that?  
</blockquote>


<blockquote>
It used to say something about doing a 'dmesg' command
or viewing syslog's /var/log/messsages shortly after a
reboot --- with an example of the sorts of lines you should
see from the kernel.
</blockquote>


<blockquote>
The dmesg command is to "display" (actually *re-display*)
message that were generated during the boot sequence.  All 
those messages that tell you what your kernel "found."
</blockquote>


<blockquote>
If this port works under DOS, Windows, et al, then you 
might use the "MSD.EXE" (Microsoft Diagnostics) package
to tell you where DOS is finding the port.  You can also
use the "procinfo" command (from Linux) to get handy 
one page summaries of some system diagnostics and performance
stats (including how many interrupts have been recieved and
handled by kernel on each IRQ).
</blockquote>


<blockquote>
It may be that your serial port is set at a reasonable 
(non-conflicting) IRQ --- but that it's at one that the
kernel doesn't probe by default.  
</blockquote>


<blockquote>
To fix that you'd use the 'setserial' command to associate
a give /dev/ttyS* device with an IRQ and set other
characteristics on the line.  It's also possible, though
less likely, that you might have to use the stty command
to set yet other characteristics of the tty lines.
</blockquote>


<p><strong><img src="../../gx/dennis/qbub.gif" height="28" width="50" 
	alt="(?)" border="0"
>Maybe this is where my problem is... what do you think? And if this is the
problem , what do i need to do?
</strong></p>


<blockquote><img src="../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>Try reading that HOWTO.  It's a bit long --- but I'd just
end up retyping most of it at this point anyway.  Also 
read the man pages for 'setserial' and 'stty' and play 
with them a little bit.
</blockquote>


<blockquote>
Since you seem to have a serial mouse --- try putting the
mouse on that other serial port, and changing your start
scripts (/etc/rc.d/$whatever) to have gpm, and X use that.
</blockquote>


<blockquote>
Actually on most Linux systems there's a symlink under
/dev/ from "mouse" -&gt; ttyS1 or -&gt; psaux or whatever, and
anther from "modem" -&gt; ttyS* (or to the deprecated cua* 
"callout" ports).  So, when you move a mouse or modem 
to a different serial port, you usually only have to 
change those symlinks according (just 'rm' the symlink and
create a new one or use the 'ln -sf $device mouse' command.
</blockquote>


<p><strong><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>cheers
<br>Barbara
</strong></p>


<blockquote><img src="../../gx/dennis/bbub.gif" height="28" width="50" 
	alt="(!)" border="0"
>I hope we get closer this time.  Do you have a local 
users group or other local guru to tap into for some 
in person and hands on expertise?
</blockquote>
<!-- end body -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/ssc.copying.html"
	>Copyright &copy;</a> 1998, James T. Dennis <BR>
Published in <I>Linux Gazette</I> Issue 33 October 1998</H5>
<P> <hr> <P>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<table width="98%"><tr valign="center" align="center">
<td rowspan="3"><A HREF="../lg_answer33.html"><IMG
        SRC="../../gx/dennis/answernew.gif"
        ALT="[ Answer Guy Index ]"></A></td>
  <td><A HREF="floppy.html">floppy</a>
  <td><A HREF="autocad.html">autocad</a>
  <td><A HREF="scsi.html">scsi</a>
  <td><A HREF="samba_pdc.html">samba_pdc</a>
  <td><A HREF="virthost.html">virthost</a>
</tr><tr valign="center" align="center">
  <td><A HREF="emacs_cc.html">emacs_cc</a>
  <td><A HREF="ipmasq.html">ipmasq</a>
  <td><A HREF="tty.html">tty</a>
  <td><A HREF="shuffle.html">shuffle</a>
  <td><A HREF="connect.html">connect</a>
</tr><tr valign="center" align="center">
  <td><A HREF="hostavail.html">hostavail</a>
  <td><A HREF="desqview.html">desqview</a>
  <td><A HREF="catch22.html">catch22</a>
  <td><A HREF="thanks2.html">thanks2</a>
  <td><A HREF="typo.html">typo</a>
</tr></table>
<P> <hr> <P>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<A HREF="../lg_toc33.html"><IMG SRC="../../gx/indexnew.gif"
        ALT="[ Table Of Contents ]"></A>
<A HREF="../../index.html"><IMG SRC="../../gx/homenew.gif"
        ALT="[ Front Page ]"></A>
<A HREF="../lg_bytes33.html"><IMG SRC="../../gx/back2.gif"
        ALT="[ Previous Section ]"></A>
<A HREF="../vrenios.html"><IMG SRC="../../gx/fwd.gif"
        ALT="[ Next Section ]"></A>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
</body>
</html>
<!--endcut ========================================================= -->