Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on modem/fax stuff.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/modem.e>
#           or at <http://angg.twu.net/e/modem.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.modem_port_and_irq»	(to "modem_port_and_irq")
# «.basic_modem»	(to "basic_modem")
# «.modem_interact»	(to "modem_interact")
# «.modem_tty_bits»	(to "modem_tty_bits")
# «.minicom-src»	(to "minicom-src")
# «.expect_isp»		(to "expect_isp")
# «.expect_isp_2»	(to "expect_isp_2")
# «.motorola_56k»	(to "motorola_56k")
# «.wvdial»		(to "wvdial")
# «.efax»		(to "efax")
# «.ppp-inx-feb2003»	(to "ppp-inx-feb2003")
# «.stickybit»		(to "stickybit")
# «.pppoe»		(to "pppoe")
# «.pppoeconf»		(to "pppoeconf")
# «.serial-usb»		(to "serial-usb")




#####
#
# locating the modem port and IRQ
# 2000jan03
#
#####

# «modem_port_and_irq»  (to ".modem_port_and_irq")
#*
# Active "ttySxx" ports:
dmesg | grep ttyS

#*
# Disable gpm, for machines where the mouse is so badly configured
# that gpm interferes with the modem:
ps ax | grep gpm | grep -v grep
kill $(pidof gpm)
ps ax | grep gpm | grep -v grep
#regpm

#*
# To test the port run this block.
# You'll need to type several "M-l"s.
# (to "modem_interact")
cat > $EEG <<'---'
atz
~
---
modem_interact /dev/ttyS0 20 eeg
modem_interact /dev/ttyS1 20 eeg
modem_interact /dev/ttyS2 20 eeg
modem_interact /dev/ttyS3 20 eeg

#*
# Set the symlink.
cd /dev/
laf modem
ln -sf ttyS2 modem
laf modem

#*
# (find-fline "/etc/minirc.dfl")
# To set the minicom port to /dev/modem:
minicom -s
# and, using the menus:
#   Serial port setup
#     A -> Serial device  (set it to /dev/modem)
#   Save setup as dfl
#   Exit from minicom

#*





#####
#
# Basic modem scripts
# 2001jan03
#
#####

# «basic_modem»  (to ".basic_modem")
# (to "modem_interact")
#*
cat > $EEG <<'---'
atz
at$

ati3
ati7
ati9
atd$
~
---
modem_interact '' '' eeg
#*



#####
#
# Connecting patna to angg via ppp
# 99aug??
#
#####

# «patna_to_angg»

# (find-fline "~/EXPECT/modem.002")

# O que recebe (angg):
#
cp -v ~/.zshrc /patna/home/root/
cp -dpvR ~/EXPECT/modem.002 /patna/home/root/EXPECT/
#
modem.002 : mint 'ATZ' 'ATL3&A3&H1&R2X3' 'ATS0=1' 'ATS1=0' : mint \
  && echo PPP server...						\
  && /usr/sbin/pppd 10.0.2.1:10.0.2.2 crtscts modem \
       < /dev/modem > /dev/modem


# O que disca (patna):
#
modem.002 : mint 'ATZ' 'ATL3&A3&B1&H1&R2X3' 'ATS0=0' \
          : 'set timeout 50' 'ATDT//2863160' : mint \
  && echo PPP client...					\
  && /usr/sbin/pppd defaultroute noipdefault crtscts modem \
       < /dev/modem > /dev/modem



# (find-fline "/var/log/")
# (find-fline "/var/log/syslog")
# (find-fline "/patna/var/log/")
# (find-fline "/patna/var/log/syslog")
# (find-fline "/patna/etc/hosts")

# Tirei os "-detach"es. Não fez diferença...



As instruções são meio longas... o cara tem que ter ppp/options sem o
auth, tem que ter um sistema telneteável (onde é que setei isso?) tem
que ter /modem e o modem num estado razoável, além de ter o expect; é
bom que 


ATL3&A3&B1&H1&R2&S0=0X3
  Ln                   	n=0  Low Speaker Volume
                        n=1  Low Speaker Volumee
                        n=2  Med Speaker Volumee
                        n=3  Hi Speaker Volumee

    &An	       	       	n=0  Disable /ARQ Result Codes
                        n=1  Enable /ARQ Result Codes
                        n=2  Enable /Modulation Codes
                        n=3  Enable /Extra Result Codes

       &Bn     	       	n=0  Floating DTE Speed
	                n=1  Fixed DTE Speed
	                n=2  DTE Speed Fixed When ARQ

	  &Hn  	       	n=0  Disable TX Flow Control
	                n=1  CTS
	                n=2  Xon/Xoff
	                n=3  CTS and Xon/Xoff

	     &Rn       	n=1  Ignore RTS
       	       	        n=2  RX to DTE/RTS high

		 S0    	Ring to Answer ON

		     Xn n=0  Basic Result Codes
		        n=1  Extended Result Codes
		        n=2-4  Advanced Result Codes




# run minicom and...
(stty < /dev/modem
 stty -a < /dev/modem
) |& tee ~/o

       [-]raw Same as

-ignbrk  -brkint  -ignpar  -parmrk  -inpck
              -istrip  -inlcr  -igncr  -icrnl -ixon -ixoff -iuclc
              -ixany -imaxbel -opost -isig -icanon -xcase  min  1
              time 0




#####
#
# dip source (old!)
#
#####

apti liblockdev0g-dev
# (find-vldifile "liblockdev0g-dev.list")
# (find-fline "/usr/doc/liblockdev0g-dev/")
# (find-fline "/usr/include/lockdev.h")

# (code-c-d "dip" "/usr/src/dip-3.3.7p/")
rm -Rv /usr/src/dip-3.3.7p/
pdsc /big/slinks2/dists/slink/main/source/net/dip_3.3.7p-2.dsc
cd /usr/src/dip-3.3.7p/
debian/rules CC="gcc -g"	|& tee odrb

# (gdb "gdb /usr/src/dip-3.3.7p/dip")



# (find-dipfile "")
# (find-dipfile "modem.c")
# (find-dipfile "tty.c")
# (find-dipfile "debian/rules")
# (find-dipfile "Makefile")




######
#
# chat
#
######

# (find-k2file "drivers/net/dummy.c")

setserial  /dev/ttyS2  irq 5  uart 16550A
insmod slhc
insmod ppp

ifconfig dummy down

cat > ~/.dunc/options <<'EOF'
defaultroute
crtscts
modem
proxyarp
EOF
# removed: -am -mru lock

cat > ~/.dunc/chatfile <<'EOF'
"" "ATL3&A3&B1&H1&R2&S0=0X3" OK atdt////512-6880 CONNECT "" rname:--rname: \qedrx ord: snobol78 ""
EOF

/usr/sbin/pppd -d -d -d file /home/root/.dunc/options \
  connect "/usr/sbin/chat -v -t 60 -f /home/root/.dunc/chatfile" /dev/ttyS2 38400 &

tail -f /var/log/ppp.log
kill $(ps ax | grep pppd | awk '{print $1}')

cd /var/log/
l ppp.log kern.log daemon.log





#####
#
# stuff
#
#####

# (find-fline "~/bin/inx.dip")
# (find-fline "~/bin/inx-up")
# (find-fline "~/bin/novanet.dip")
# (find-fline "~/bin/novanet-up")
# (find-fline "/etc/resolv.conf")
# (find-fline "/var/log/")
# (find-fline "/etc/syslog.conf")
# (find-fline "/etc/syslog.conf")

ifconfig
route

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0



Internexus:
#
ppp0      Link encap:Point-to-Point Protocol
          inet addr:200.240.18.26  P-t-P:200.240.18.4  Mask:255.255.255.255
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:6 errors:1 dropped:1 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0
          Memory:15d8038-15d8c04
#
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
arpoador.inx.co *               255.255.255.255 UH    0      0        0 ppp0
localnet        *               255.0.0.0       U     0      0        3 lo
default         arpoador.inx.co 0.0.0.0         UG    0      0        0 ppp0





Novanet:
#
ppp0      Link encap:Point-to-Point Protocol
          inet addr:200.255.172.113  P-t-P:200.255.172.139 Mask:255.255.255.255
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:21 errors:2 dropped:2 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0
          Memory:298f038-298fc04
#
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
orion4.novanet. *               255.255.255.255 UH    0      0        0 ppp0
localnet        *               255.0.0.0       U     0      0        3 lo
default         orion4.novanet. 0.0.0.0         UG    0      0        1 ppp0




######
#
# pppd
#
######

pdsc /big/slinks1/dists/slink/main/source/base/ppp_2.3.5-2.dsc
pdsc /big/slinks2/dists/slink/main/source/net/dip_3.3.7p-2.dsc

# (code-c-d "ppp" "/usr/src/ppp-2.3.5/")
# (code-c-d "dip" "/usr/src/dip-3.3.7p/")

# (find-pppfile "")

# (find-dipfile "")
# (find-dipfile "ppp.c")

gcc -E ppp.c | tail -n 30 > do_ppp.E

# (find-dipfile "do_ppp.E")

Invoking PPPD with "debug -detach defaultroute noipdefault crtscts modem"
/usr/sbin/pppd pppd debug -detach defaultroute noipdefault crtscts modem debug
/usr/sbin/pppd pppd       -detach defaultroute noipdefault crtscts modem

egrep "detach|defaultroute|ipdefault|crtscts|modem|debug" /etc/ppp/options

/usr/sbin/pppd -detach defaultroute noipdefault

# (find-fline "~/bin/inx.dip")

5406880

C-a O
  <Modem and dialing>
    <M - Dial time>
      70
    <A - Init string>
      ^MATL3&A3&B1&H1&R2&S0=0X3^M

C-a O
  <Filenames and paths>
    <E - Kermit program>
      /usr/sbin/pppd -detach defaultroute noipdefault

C-a K		# run kermit






#####
#
# etc
#
#####

xisp

# (find-vldifile "ppp.list")
# (find-fline "/usr/doc/ppp/")

# (find-fline "/etc/ppp/")
# (find-fline "/etc/ppp/options")
# (find-fline "/etc/chatscripts/")
# (find-fline "/etc/init.d/ppp")

apti doc-linux-text
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "Other Useful/Important Documents")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "9.3.  Configuring your modem")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "(which looks like garbage)")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "ATHO")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "port specific option files")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" 2068)
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "26.  Setting up a PPP server")
# (find-fline "/usr/doc/HOWTO/PPP-HOWTO.gz" "<local IP>:<remote IP>")
# (find-fline "/usr/doc/HOWTO/Serial-HOWTO.gz")

# (find-vldifile "doc-linux-html.list")
# (find-fline "/usr/doc/doc-linux-html/")

lynx /usr/doc/HOWTO/PPP-HOWTO.html

lynx http://summer.snu.ac.kr/~djshin/linux/mail-list/index.shtml
lynx http://www.in.net/info/modems/index.html


# (find-fline "/usr/doc/HOWTO/mini/SLIP-PPP-Emulator.gz")

# (find-vldifile "pppconfig.list")
# (find-fline "/usr/doc/pppconfig/")
# (find-fline "/usr/sbin/pppconfig")


apti doc-linux-fr
lynx /usr/doc/LANG/fr/HOWTO/mini/PPP-over-minicom.html
lynx /usr/doc/LANG/fr/HOWTO/mini/PPP-over-minicom-2.html#ss2.2


strace -q -f -o ~/osm minicom




#####
#
# modem_interact
# 2000jan03
#
#####

# «modem_interact»  (to ".modem_interact")
# (find-angg ".zshrc" "modem_interact")
# (find-es "expect" "stty")
# (to "modem_tty_bits")
# (to "modem_interact")
#*
expect -c '
  spawn -open [open /dev/modem r+]
  stty speed 115200 < /dev/modem
  stty -icanon
  interact ~ return timeout 10 return
'

#*
# When the third parameter is "echo" the expect script is displayed
# instead of executed; if it is "eeg" then very interesting things
# happen.
# Note that you can also use this function to search for the mouse.
# (find-angg ".zshrc" "modem_interact")
# (to "basic_modem")
#
function modem_interact () {
  $3 expect -c '
    spawn -open [open '${1:-/dev/modem}' r+]
    stty speed 115200 < '${1:-/dev/modem}'
    stty -icanon
    interact ~ return timeout '${2:--1}' return
  '
}
# Just show how the parameters work:
# (find-es "bash" "var_expansion")
modem_interact /dev/ttyS2 5 echo
modem_interact '' '' echo

# Now interact with the modem (falling out after 5 seconds of inactivity).
modem_interact '' 5
# Done.

#*





#####
#
# modem tty bits (kernel defauls and minicom settings)
# 2001jan03
#
#####

# «modem_tty_bits»  (to ".modem_tty_bits")
#*
# Here's a close-to-the-metal way to understand how minicom changes
# the tty bits of the modem: soon after booting,

stty -g < /dev/modem | tee ~/o1
(sleep 7; stty -g < /dev/modem > ~/o2) &
minicom
stty -g < /dev/modem | tee ~/o3

cat ~/o1 ~/o2 ~/o3 | tee ~/o

#*
# And here's what we get:
# o1 = 500:5:cbd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:(16 times 0)
# o2 = 1:0:80001cb1:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:(16 times 0)
# o3 = 1:0:800018b1:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:(16 times 0)
expect -c '
  puts [format "%o %o %o %o" 0x500 5 0xcbd 0x8a3b]
  puts [format "%o %o %o %o" 1 0 0x80001cb1 0]
  puts [format "%o" 0x80001c81]
'
# 0x500 5 0xcbd 0x8a3b -> 2400 5 6275 105073
# 1 0 0x80001cb1 0     -> 1 0 20000016261 0
#     0x80001c81       ->     20000016201
# (find-shutag "display_recoverable")
# (find-fline "/usr/include/bits/termios.h" "c_iflag bits")
# (find-fline "/usr/include/bits/termios.h" "c_oflag bits")
# (find-fline "/usr/include/bits/termios.h" "c_cflag bit ")
# (find-fline "/usr/include/bits/termios.h" "c_lflag bits")

# The kernel settings for c_{i,o,c,l}flags can be found at:
# (find-k22file "drivers/char/tty_io.c" "tty_std_termios.c_cflag =")
#	tty_std_termios.c_iflag = ICRNL | IXON;
#	tty_std_termios.c_oflag = OPOST | ONLCR;
#	tty_std_termios.c_cflag = B38400 | CS8 | CREAD | HUPCL;
#	tty_std_termios.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK |
#		ECHOCTL | ECHOKE | IEXTEN;
#
# These are the settings while minicom is running:
#   c_iflag = IGNBRK;
#   c_oflag = 0;
#   c_cflag = CRTSCTS | B57600 | CLOCAL | HUPCL | CREAD | CS8;
#   c_lflag = 0;
#
# When minicom ends c_cflag becomes (somewhat weirdly):
#   c_cflag = CRTSCTS | B57600 | CLOCAL | HUPCL | CREAD | CS5;
#
# As for the c_cc chars, the kernel initializes them to:
# (find-k22file "include/asm-i386/termios.h" "intr=^C")

# The only c_cc changed by minicom is VTIME, that becomes 5 (=0.5s).
# Curiously, the kernel seems to have no interesting reference to
# VTIME; is libc in charge of all the hard work?
# (find-node "(libc)Low-Level Terminal Interface")

# (find-node "(libc)Canonical or Not")
# (find-node "(libc)Input Modes" "IGNBRK")
# (find-node "(libc)Output Modes")
# (find-node "(libc)Control Modes")
# (find-node "(libc)Local Modes")
# (find-node "(libc)Noncanonical Input" "how long to wait for input")





#####
#
# minicom source
# 2001jan03
#
#####

# «minicom-src»  (to ".minicom-src")
# (find-status "minicom")
# (find-vldifile "minicom.list")
# (find-vldifile "minicom.list")
# (find-fline "/usr/doc/minicom/")

#*
pdsc $SDEBIAN/dists/potato/main/source/comm/minicom_1.82.1-1.dsc
cd /usr/src/minicom-1.82.1/
find *		      > .files
find * -name '*.[ch]' > .files.ch
etags $(<.files.ch)
debian/rules binary	|& tee odrb
#*
cd /usr/src/minicom-1.82.1/
agrep -i 'leave without reset' $(<.files)
agrep -i NORESET $(<.files)
agrep -i CS5 $(<.files)
#*

# (code-c-d "minicom" "/usr/src/minicom-1.82.1/")
# (find-minicomfile "")
# (find-minicomfile "src/")
# (find-minicomfile "src/Makefile" "runscript:")
# (find-minicomfile "src/script.c")

# (find-minicomfile "src/minicom.c" "Leave without reset?")
# (find-minicomfile "src/minicom.c" "quit != NORESET")

# (find-k22file "include/linux/tty_driver.h")





#####
#
# An expect script to connect to an ISP
# 99dec04
#
#####

# (find-es "mail" "mauricio_99nov27")
# (find-fline "~/bin/inx.dip")
# (find-fline "~/bin/inx-up")

# «expect_isp»  (to ".expect_isp")

cat > /etc/resolv.conf <<'---'
search .
nameserver 200.240.18.1
---
expect -c '
  source $env(HOME)/.passwds.tcl
  set phones {5406880 5126880 5126881 5126882 5126883 5126884 5126889
      5126890 5126891 5126892 5126896 5126897 5126898 5126899 5126904
      5126905 5126906}
  spawn minicom
  interact {
    -re {~d([0-1][0-9])} {
            set phone [lindex $phones $interact_out(1,string)]
	    send atdt//$phone\r
          }
        "~u" {send edrx\r}
        "~p" {send $passwd(inx)\r}
        "~\r" {send \001q\r}
    -o rname: {send edrx\r}
      ssword: {send $passwd(inx)\r}
          eof {return}
  }
  puts "minicom done"
'
alias c1='/usr/sbin/pppd -d -detach defaultroute /dev/ttyS2 115200 &'
alias c2='ifconfig; route'
c1



ping 200.240.18.4

route del 200.240.18.4

print -l 5406880 512688{0,1,2,3,4,9} 512689{0,1,2,6,7,8,9} 512690{4,5,6} > ~/o
# (find-fline "~/o")





#####
#
# An alternative for expect_isp (that allows several ISPs)
# 2000jan03
#
#####

# «expect_isp_2»  (to ".expect_isp_2")
#*
function ppp-up_ () {
  expect -c '
    source $env(HOME)/.passwds.tcl
    # Create a proc for each telephone number
    foreach n {00 01 02 03 04 05 06  08 09 10 11 12 13 14  15 16} \
      phone {5406880 5126880 5126881 5126882 5126883 5126884 5126889
             5126890 5126891 5126892 5126896 5126897 5126898 5126899
             5126904 5126905 5126906} {
      proc d$n {} " global USER PWD passwd ISP
        set USER edrx; set PWD $passwd(inx); set ISP inx; 
        send atdt//$phone\\r
      "
    }
    proc ig {} { global USER PWD ISP
      set USER ig; set PWD ig; set ISP ig; send atdt//15002000\r
    }
    set ok 0; spawn minicom; stty -icanon
    interact {
      ~d00 d00 ~d01 d01 ~d01 d02 ~d03 d03 ~d04 d04 ~d05 d05 ~d06 d06
      ~d07 d07 ~d08 d08 ~d09 d09 ~d10 d10 ~d11 d11 ~d12 d12 ~d13 d13
      ~d14 d14 ~d15 d15 ~d16 d16   ~i ig
	      ~r  {send atx3l0\r}
              ~u  {send $USER\r}
              ~p  {send $PWD\r}
            "~\r" {send \001q\r}
        -o rname: {send $USER\r}
            ogin: {send $USER\r}
          ssword: {send $PWD\r; set ok $ISP}
              eof return
    }
    exec echo $ok > /tmp/ppp-up-status
    puts "minicom done"
  '
}

# (find-es "bash" "case")
function ppp-up () {
  ppp-up_
  case $(</tmp/ppp-up-status) in
    inx) rm /etc/resolv.conf
         /usr/sbin/pppd -detach usepeerdns defaultroute /dev/modem 115200 & ;;
    ig) rm /etc/resolv.conf
        /usr/sbin/pppd user ig remotename ig \
          -detach usepeerdns defaultroute /dev/ttyS2 115200 & ;;
    *) echo Not trying to run pppd.
  esac
}
#*






#####
#
# ppp on potato, with "usepeerdns"
#
#####

# «ppp_usepeerdns»
# (find-status "ppp")
# (find-vldifile "ppp.list")
# (find-fline "/usr/doc/ppp/")
# (find-fline "/usr/doc/ppp/README.linux.gz" "usepeerdns")
# (find-fline "/etc/ppp/")

# (find-fline "/etc/ppp/options" "auth\n")

pdsc $SDEBIAN/dists/potato/main/source/base/ppp_2.3.11-1.1.dsc

# (find-fline "/usr/src/ppp-2.3.11/README.linux" "usepeerdns")

-detach




#####
#
# on PCI modems
# 2000nov25
#
#####

# (find-fline "~edrx/tmp/")
# (find-fline "~edrx/tmp/linux568.zip")
 



#####
#
# motorola 56k
# 2001feb11
#
#####

# «motorola_56k»  (to ".motorola_56k")
# (find-k22file "include/asm-i386/serial.h" "ttyS2")
#   { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },  /* ttyS2 */
# (find-k22file "drivers/char/")
# (find-k22file "drivers/char/serial.c" "at 0x%04x (irq = %d) is a %s")
# (find-fline "~/bin/als-up")
# (find-fline "/etc/modules")
#*
dmesg | grep tty
#*
# (find-status "setserial")
# (find-vldifile "setserial.list")
# (find-fline "/usr/doc/setserial/")
find /etc/init.d/ /etc/rc* | grep setserial
# (find-fline "/etc/init.d/setserial")
# (find-fline "/etc/init.d/setserial" "Loading the saved-state")
# (find-fline "/etc/rcS.d" "setserial")
# (find-fline "/etc/serial.conf")
#*
/etc/init.d/setserial stop
rmmod serial
insmod serial
/etc/init.d/setserial start
#*
cat > /tmp/pnp <<'%%%'
(DEBUG)
(READPORT 0x020b)
(ISOLATE PRESERVE)
(IDENTIFY *)
(VERBOSITY 2)
# (CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
(CONFLICT)
(CONFIGURE WIN5602/-1 (LD 0
 (ACT N)
 # (IO 0 (SIZE 16) (BASE 0x02e8) (CHECK))
   (IO 0 (SIZE 16) (BASE 0x03e8))
 # (IO 0 (SIZE 16) (BASE 0x02e8))
 (INT 0 (IRQ 4 (MODE +E)))
 (NAME "WIN5602/-1[0]{WIN5602 MODEM LINE INTERFACE CARD.}")
 (ACT Y)
))
(WAITFORKEY)
%%%
isapnp /tmp/pnp

#*
cat > /tmp/pnp <<'%%%'
(DEBUG)
(READPORT 0x020b)
(ISOLATE PRESERVE)
(IDENTIFY *)
(VERBOSITY 2)
(CONFIGURE WIN5602/-1 (LD 0
 # (ACT N)
   (IO 0 (PEEK))
   (INT 0 (PEEK))
 # (NAME "WIN5602/-1[0]{WIN5602 MODEM LINE INTERFACE CARD.}")
 # (ACT Y)
))
(WAITFORKEY)
%%%
isapnp /tmp/pnp

#*
# setserial /dev/ttyS2  irq 4  port 0x230  uart 16550A 
setserial /dev/ttyS2  irq 4  port 0x3e8  uart 16550A 
setserial -g /dev/ttyS[012]
cat > $EEG <<'---'
atz
~
---
modem_interact /dev/ttyS2 20 eeg

#*
pdsc $SDEBIAN/dists/potato/main/source/base/isapnptools_1.21-2.dsc
cd /usr/src/isapnptools-1.21/
# (code-c-d "isapnp" "/usr/src/isapnptools-1.21/")

#*

# (find-status "isapnptools")
# (find-vldifile "isapnptools.list")
# (find-fline "/usr/doc/isapnptools/")
# (find-fline "/usr/doc/isapnptools/isapnpfaq.txt.gz")
# (find-fline "/usr/doc/isapnptools/isapnpfaq.txt.gz" "attempted to CHECK")
# (find-fline "/usr/doc/isapnptools/README.gz" "PEEK")
# (eeman "8 isapnp")
# (eeman "5 isapnp.conf")
# (find-htetfile "Modem-HOWTO.txt.gz")

# Ctrl-alt-dels mentioned "isapnp -rc"; is it a woody/sid option?





#####
#
# wvdial
# 2001feb11
#
#####

# «wvdial»  (to ".wvdial")
# (find-status "wvdial")
# (find-vldifile "wvdial.list")
# (find-vldifile "wvdial.postrm")
# (find-fline "/usr/doc/wvdial/")
# (find-angg ".zshrc" "ppp-up")
# (find-fline "/etc/wvdial.conf")
# (find-man "1 wvdial")
# (find-man "1 wvdialconf")
# (find-man "5 wvdial.conf")
# (find-fline "/etc/ppp/peers/")

# (find-angg ".zshrc" "inx-up")
# (find-vldifile "wvdial.postinst")
# (find-fline "/etc/ppp/pap-secrets" "inx")
# (find-fline "/etc/wvdial.conf")
# (find-man "8 pppd")
# (find-man "8 pppd" "  remotename name")
# (find-man "8 pppd" "  name name")
#*
rm -v /etc/wvdial.conf
cat > $EEG <<'---'
y
15000450
edrx@inx.com.br
third-field
third-field
y
---
eeg /var/lib/dpkg/info/wvdial.postinst configure

#*
# (find-man "5 wvdial.conf")
# (find-fline "/etc/wvdial.conf")

[Dialer Defaults]
(...)
Init3 = ATL0 &U11

[Dialer shh]
Init4 = ATM0

#*
pdsc $SDEBIAN/dists/potato/main/source/comm/wvdial_1.41.dsc
cd /usr/src/wvdial-1.41/
#*

# (code-c-d "wvdial" "/usr/src/wvdial-1.41/")
# (find-wvdialfile "")
# (find-wvdialfile "wvdial/")
# (find-wvdialfile "wvdial/wvdialer.cc" "// FCLASS")
# (find-wvdialfile "wvdial/wvmodemscan.cc" "+FCLASS=0")

# How can I configure wvdial to use pulse dialing?
# How can I make it use two different ISPs, one of them with several
# phone lines?






#####
#
# efax
# 2001nov10
#
#####

# «efax»  (to ".efax")
# (find-status "efax")
# (find-vldifile "efax.list")
# (find-fline "/usr/doc/efax/")

# (find-fline "/usr/bin/fax")
# (find-fline "/usr/bin/fax" "FAXDIR")
# (find-fline "/etc/efax.rc")
# (find-fline "/etc/efax.rc" "sportster")
# (find-fline "/etc/efax.rc" "Commands to set up modem")
# (find-fline "/etc/efax.rc" "VOICEINIT")

# (find-man "1 fax")
# (find-man "1 fax" "The fax answer command is")
# (find-man "1 efax")

# (find-es "modem" "modem_interact")
#*
modem_interact '' '' echo
modem_interact /dev/modem 5 echo
cat > $EEG <<'---'
atz
~
---
modem_interact /dev/modem 5 eeg
#*
lsof | grep /dev/ | awk '{printf "%-12s %-11s %s\n", $8, $1, $2}' | sort \
     | uniq | l -S
#*




#####
#
# PPP coonection to Internexus
# 2003feb27
#
#####

# «ppp-inx-feb2003»  (to ".ppp-inx-feb2003")
# (find-angg ".zshrc" "inx-up")
# (find-htetfile "PPP-HOWTO.gz")
# (find-htetfile "PPP-HOWTO.gz" "Chapter 16. If your PPP server uses PAP")
# (find-htetfile "PPP-HOWTO.gz" "name <your ISP user name>")
# (find-htetfile "PPP-HOWTO.gz" "16.2. The PAP/CHAP secrets file")
# (find-htetfile "PPP-HOWTO.gz" "Secrets for authentication using PAP")
# (find-htetfile "PPP-HOWTO.gz" "fred    pppserver1      barney")
# (find-fline "/etc/ppp/pap-secrets" "inx")
#  edrx@inx.com.br inx my-password-at-inx
# (find-angg ".zshrc" "ppp-up" "function inx-up_")
#*
function inx-up__ () {
  /usr/sbin/pppd -detach usepeerdns defaultroute /dev/modem 115200 \
    name edrx@inx.com.br remotename inx &
    # while debugging add "debug show-password"
}
cat > $EEG <<'%%%'
atx3l0
atdt//15000450
%%%
eeg minicom; rm /etc/resolv.conf; inx-up__
#*
# (ee-isearch "ppp")
# (progn (find-fline "/var/log/messages") (goto-char (point-max)))
# (progn (find-fline "/var/log/syslog") (goto-char (point-max)))

# (find-vldifile "ppp.list" "pap-secrets")
# (find-vldifile "ppp.postinst" "install /etc/ppp/pap-secrets")
# (find-angg ".zshrc")

# (find-man "8 pppd")
# (find-man "8 pppd" "   call name")
# (find-man "8 pppd" "   name name")
# (find-man "8 pppd" "   remotename name")
# (find-man "8 pppd" "   debug")
# (find-man "8 pppd" "   show-password")




#####
#
# wvdial.conf's sticky bit
# 2004apr09
#
#####

# «stickybit»  (to ".stickybit")
# (find-fline "/etc/" "wvdial.conf")
# (find-angg ".zshrc" "showperms")

showperms /etc/wvdial.conf

# (find-man "2 stat" "001000 ")
# (find-man "2 stat" "001000 " "001000 ")






Pgrep m/fax/i
Pgrep m/fax/i | grep Package:

addressbook
lg-issue25
lg-issue28
mgetty
mgetty-fax
mgetty-viewfax
blinkd
efax
hylafax-client
hylafax-doc
hylafax-server
tkhylafax
xli
efax
qpage


apti lg-issue25 lg-issue28
apti efax

# (find-vldifile "" "efax")
# (find-vldifile "efax.list")
# (find-fline "/usr/doc/efax/")


# (find-vldifile "lg-issue25.list")
# (find-fline "/usr/doc/lg-issue25/")
# (find-vldifile "lg-issue28.list")
# (find-fline "/usr/doc/lg-issue28/")




# (find-fline "~/bin/inx.dip")

  port ttyS2
  speed 115200
  init ATL3&A3&B1&H1&R2&S0=0X3
  dial T///5406880
  if $errlvl > 1 goto error

  wait rname: 10
  send edrx\r
  wait ord: 10
  send xxxxxxxx\n
  wait PPP
  default
  mode PPP
  exit

error:
  print Failed.
  exit

modem.002 'at$' 'at&$' 'ats$' | tr -d \\r | grep -v 'Strike a key' > ~/o
# (find-fline "~/o")

strace -f -o ~/s minicom
l ~/s






#####
#
# Configuring ADSL
# 2007aug27
#
#####

# «pppoe»  (to ".pppoe")
# «pppoeconf»  (to ".pppoeconf")

# (find-zsh "grep-available -i adsl")
# (find-status   "pppoeconf")
# (find-vldifile "pppoeconf.list")
# (find-udfile   "pppoeconf/")
# (find-fline "/usr/sbin/pppoeconf")
# (find-fline "/usr/sbin/pppoeconf" "'noauth'")

sudo pppoeconf

* (eepitch-shell)
sudo ifconfig
sudo poff
sudo pon dsl-provider
sudo plog
sudo ifconfig
sudo ifconfig ppp0
sudo poff





#####
#
# serial-usb (for Dado Sutter)
# 2008dec07
#
#####

# «serial-usb»  (to ".serial-usb")
# (find-fline "~/LOGS/2008dec07.forth")
# http://netbsd.gw.com/cgi-bin/man-cgi?ucom+4+NetBSD-current
# http://en.wikipedia.org/wiki/Minicom
# http://cutecom.sourceforge.net/
# http://www.google.com/search?q=ttyusb+linux
# http://www.google.com/search?q=serial-usb+linux

# (find-fline "/dev/MAKEDEV" "makedev ttyUSB$i")
# (find-angg ".zshrc" "MAKEDEV_create")
# http://www.eluaproject.net/

# (find-fline "/proc/")
# (find-sh "cat /proc/devices")
# (find-sh "dmesg")

# (find-status   "usbutils")
# (find-vldifile "usbutils.list")
# (find-udfile   "usbutils/")
# (find-man "1 lsusb")
# (find-man "8 lsusb")
# (find-man "8 update-usbids")
# (find-man "1 usbmodules")
# (find-man "8 usbmodules")
# (find-fline "/var/lib/usbutils/usb.ids")
# (find-fline "/proc/bus/usb/")
# (find-fline "/proc/bus/usb/devices")

# (find-eev "anim/channels.anim")
# (find-eev "eegchannel")
# (find-expcommand "stty")








#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: