Date: Mon, 10 Jan 2005 23:26:13 -0500 From: Timothy Luoma <lists@tntluoma.com> To: jquinby@node.to Cc: FreeBSD-Questions Questions <freebsd-questions@freebsd.org> Subject: Re: m'gettying closer! (was Re: modem not responding to mgetty) Message-ID: <ED4D5449-6388-11D9-84FA-000D93AD26C8@tntluoma.com> In-Reply-To: <20050110161931.A97453@mister.mcgoonet.com> References: <1E7FDB38-5E7A-11D9-AD10-000D93AD26C8@tntluoma.com> <200501050841.03874.donaldj1066@fastmail.fm> <0AAB74E3-5F2E-11D9-BE17-000D93AD26C8@tntluoma.com> <49600.24.11.146.21.1104942926.squirrel@24.11.146.21> <F670EE16-6121-11D9-AD83-000D93AD26C8@tntluoma.com> <20050110161931.A97453@mister.mcgoonet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 10, 2005, at 11:46 AM, Jay Quinby wrote: > > On Fri, 7 Jan 2005, Timothy Luoma wrote: > >> I am unsure about several things >> - should be using cuaa0 or ttyd0 (I am using mgetty)? > > If I recall correctly, cuaa0 is the device name for Serial 0, or > the equivalent of /dev/ttyS0 on Linux. One way to test this would > be to fire up something like minicom, and try to connect to it. You > ought to be able to send some of the basic AT commands and get some > responses (good ones are ATDT 1234 and ATH, which will dial 1234 > and hang up the line). Double-checking my own doc (since my memory > is hazy, you want to set the following, assuming your modem is at > serial 0: > > /etc/ttys: > ttyd0 should point to mgetty, with a line similar to this, allowing > for the correct path to your mgetty: > > ttyd0 "/usr/local/sbin/mgetty -s 115200" dialup on secure $ fgrep ttyd0 /etc/ttys ttyd0 "/usr/local/sbin/mgetty -s 115200" dialup on secure [so that's OK] > Your mgetty.conf should point to the correct port (cuaa0 for serial 0) > > port cuaa0 > debug 4 > fax-id 00 00 000000 > speed 115200 > direct NO > blocking NO $ head /usr/local/etc/mgetty+sendfax/mgetty.config port cuaa0 debug 4 fax-id 00 00 000000 speed 115200 direct NO blocking NO >> - are the 'set ifaddr' lines right in ppp.conf? I'm using 192.168.1.x >> and have selected unused IP addresses in that range I'm still not clear about the "set ifaddr" lines. >> $ fgrep mgetty /etc/ttys|fgrep -v '#' >> ttyd0 "/usr/local/sbin/mgetty -s 115200" dialup on secure >> >> note: in ppp.conf, I'm not sure if I need ttyd0 or cuaa0. > > Your ppp.conf is going to contain only references to cuaa0 - the > one in the doc is extra long, owing to the serial card we stuck in > there. We had 4 modems hanging off the machine. Here's what it currently looks like: default: set device /dev/cuaa0 set debug log Phase Chat LCP IPCP CCP tun command set speed 115200 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\TTIMEOUT 40 CONNECT" set timeout 120 set ifaddr 192.168.1.1/0 192.168.1.2/0 255.255.255.0 0.0.0.0 add default HISADDR cuaa0: set ifaddr 192.168.1.3 192.168.1.4-192.168.1.9 enable passwdauth allow users FRED ppp accept dns set dns 67.36.13.26 enable proxy >> here is what I get on the *client end* when I try to dial my PPP >> server >> Fri Jan 7 21:12:06 2005 : Dialing XXXXXXX >> Fri Jan 7 21:12:06 2005 : CCLWrite : ATDTXXXXXXX\13 >> Fri Jan 7 21:12:37 2005 : CCLMatched : +ER: >> Fri Jan 7 21:12:37 2005 : CCLMatched : LAPM >> Fri Jan 7 21:12:37 2005 : Modem Reliable Link Established. >> Fri Jan 7 21:12:37 2005 : CCLMatched : +DR: >> Fri Jan 7 21:12:37 2005 : CCLMatched : V42B\13 >> Fri Jan 7 21:12:37 2005 : Modem Compression Established. >> Fri Jan 7 21:12:37 2005 : CCLMatched : CONNECT >> Fri Jan 7 21:12:37 2005 : CCLMatched : 26400 >> Fri Jan 7 21:12:40 2005 : Serial connection established. >> Fri Jan 7 21:12:40 2005 : using link 0 >> Fri Jan 7 21:12:40 2005 : Using interface ppp0 >> Fri Jan 7 21:12:40 2005 : Connect: ppp0 <--> /dev/cu.modem >> Fri Jan 7 21:12:41 2005 : sent [LCP ConfReq id=0x1 <asyncmap 0x0> >> <magic 0x32727ef4> <pcomp> <accomp>] >> Fri Jan 7 21:12:41 2005 : Hangup (SIGHUP) >> Fri Jan 7 21:12:41 2005 : Modem hangup >> Fri Jan 7 21:12:41 2005 : Connection terminated. >> > > Looks pretty good up until it hangs up. And no real errors. Not > sure. Is /dev/cu.modem a symlink to /dev/cuaa0? /dev/cu.modem doesn't exist at all! $ ls -ld /dev/cu.modem ls: /dev/cu.modem: No such file or directory I have no idea where /dev/cu.modem is coming from. It is not set in /etc/ppp/ppp.conf nor in any file in /usr/local/etc/mgetty+sendfax/ I suppose I could just make a symlink, but I'd much rather try and find out where it is set and correct it! Googling for "/dev/cu.modem site:.freebsd.org" gave zero results. > I'm a little stumped. What happens if you run the ppp-login script > by itself? It ought to start generating the line-noise-garbage on > stdout. What's in /etc/ppp/ppp-pap-dialup? That script is running > right before things hose up. $ [asroot] /etc/ppp/ppp-pap-dialup pap: Configuration label not found At this point i went back to the Handbook and found http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html which suggested that I add pap: enable pap set ifaddr 192.168.1.3 192.168.1.4-192.168.1.9 enable proxy now that's userppp, so I don't know if it applies to dialin or not. HOWEVER, once I run it WITH that line: $ [as root] /etc/ppp/ppp-pap-dialup ~?}#?!}!}!} }<}(}"}'}"}"}&} } } } }!}$}%?}%}&(??}%}#}$?#?C~~?}#?!}!}!} }<}(}"}'}"}"}&} } } } }!}$}%?}%}&(??}%}#}$?#?C~~?}#?!}!}!} }<}(}"}'}"}"}&} } } So that looks promising. Unfortunately I'll have to wait until I am at home to see if it works. [I'm home how] Ok, so it's still failing, but I'm getting a little closer: Jan 10 22:41:14 freebsd ppp[23829]: Phase: Using interface: tun0 Jan 10 22:41:14 freebsd ppp[23829]: Phase: deflink: Created in closed state Jan 10 22:41:14 freebsd ppp[23829]: Warning: set debug: Invalid command Jan 10 22:41:14 freebsd ppp[23829]: Warning: set debug: Failed 1 [Ok, so I'm assuming that this line was incorrect: $ less /etc/ppp/ppp.conf default: set device /dev/cuaa0 set debug log Phase Chat LCP IPCP CCP tun command [snip] so I'm going to change that last line to set log Phase Chat LCP IPCP CCP tun command and see if that helps. ] Jan 10 22:41:14 freebsd ppp[23829]: Warning: Add route failed: 0.0.0.0/0 already exists [I assume that has to do with this line: set ifaddr 192.168.1.1/0 192.168.1.2/0 255.255.255.0 0.0.0.0 but I'm not yet sure what I should change it to] Jan 10 22:41:14 freebsd ppp[23829]: Phase: PPP Started (direct mode). Jan 10 22:41:14 freebsd ppp[23829]: Phase: bundle: Establish Jan 10 22:41:14 freebsd ppp[23829]: Phase: deflink: closed -> opening Jan 10 22:41:14 freebsd ppp[23829]: Phase: deflink: Connected! Jan 10 22:41:14 freebsd ppp[23829]: Phase: deflink: opening -> carrier Jan 10 22:41:15 freebsd ppp[23829]: Phase: deflink: /dev/ttyd0: CD detected Jan 10 22:41:15 freebsd ppp[23829]: Phase: deflink: carrier -> lcp Jan 10 22:41:17 freebsd ppp[23829]: Phase: bundle: Authenticate Jan 10 22:41:17 freebsd ppp[23829]: Phase: deflink: his = none, mine = PAP [is that bad? It's not fatal, it appears, since it goes on] Jan 10 22:41:17 freebsd ppp[23829]: Phase: Pap Input: REQUEST (ppp) Jan 10 22:41:17 freebsd ppp[23829]: Warning: OpenSecret: Can't open /etc/ppp/ppp.secret. Jan 10 22:41:17 freebsd ppp[23829]: Phase: Pap Output: FAILURE Jan 10 22:41:18 freebsd ppp[23829]: Phase: deflink: Disconnected! [ah, ok, well /etc/ppp/ppp.secret doesn't exist, so that's a pretty good reason to fail opening] Jan 10 22:41:18 freebsd ppp[23829]: Phase: deflink: Connect time: 4 secs: 257 octets in, 187 octets out Jan 10 22:41:18 freebsd ppp[23829]: Phase: deflink: 8 packets in, 6 packets out Jan 10 22:41:18 freebsd ppp[23829]: Phase: total 111 bytes/sec, peak 62 bytes/sec on Mon Jan 10 22:41:17 2005 Jan 10 22:41:18 freebsd ppp[23843]: Phase: deflink: lcp -> closed Jan 10 22:41:18 freebsd ppp[23843]: Phase: bundle: Dead Jan 10 22:41:18 freebsd ppp[23843]: Phase: PPP Terminated (normal). [Back to Google] TjL
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ED4D5449-6388-11D9-84FA-000D93AD26C8>