ts-7000
[Top] [All Lists]

[ts-7000] Brain Dump on using a modem with TS7250 Was: Re: dial out pro

To:
Subject: [ts-7000] Brain Dump on using a modem with TS7250 Was: Re: dial out problem
From: "prtsoftware" <>
Date: Thu, 20 Apr 2006 17:25:21 -0000
I've struggled with getting the modems working and finally succeeded.

Ultimately I got ppp to dial out using a multitech MT5656ZDX and the
tsmodem2 card.  I SPENT DAYS ON THIS BECAUSE I DIDN'T HAVE
MODULES.CONF SETUP CORRECTLY.

I will probably create some sort of modem how-to when I get a chance.
 In the meantime, here is an "incremental process" brain and script dump:

Bourne script to setup /dev/modem on /dev/ttyAM0:
------------------------------------------------------
#!/bin/sh
rm /dev/modem
ln -s /dev/ttyAM0 /dev/modem
stty 115200 </dev/modem >/dev/modem
------------------------------------------------------


Bourne script to setup /dev/modem for /dev/tts/3 (tsmodem2 card with
multitech 56K Non-IP modem).  Stty came from a recompiled busybox
version 1.1.1.
------------------------------------------------------
#!/bin/sh
#
# Known working configuration
# ts7250   jumpers    :||::::   2 needed, 4 must be off
# tsmodem2 jumpers    ::|:|:
#
rm /dev/modem
ln -s /dev/tts/3 /dev/modem
setserial /dev/modem IRQ 40
stty 115200 </dev/modem >/dev/modem
------------------------------------------------------


This Bourne script should return OK from the modem:
------------------------------------------------------
#/bin/sh
/usr/sbin/chat -V "" "\n" "" "+++AT" "OK" </dev/modem >/dev/modem
------------------------------------------------------


This file, script.plus just returns OK from the modem:

NOTE:  In your scripts be careful that you don't have Windows CR+LF
line termination.  I didn't run into this problem but found mentions
of it searching.

script.plus
------------------------------------------------------
ECHO OFF
""
"\n"
""
"+++AT"
"OK"
------------------------------------------------------

This Bourne script runs script.plus:
------------------------------------------------------
#!/bin/sh
/usr/sbin/pppd /dev/modem \
connect "/usr/sbin/chat -v -f /root/commtest/plus.script"
------------------------------------------------------


This script file, script.dial, dials out.
Replace the phone number "1" with whatever you need.
(I'm dialing an internal extension)
-------------------------------------------
ECHO OFF
ABORT ERROR
ABORT BUSY
ABORT "NO CARRIER"
ABORT "NO DIALDONE"
TIMEOUT 5
""
"\n"
""
"+++AT"
"OK-BREAK\d+++AT-OK"
"ATDT1"
TIMEOUT 90
"CONNECT" \d\d\c
-------------------------------------------


Here is my /etc/ppp/options file.
The server I'm connecting to is named skyhawk
and the account is tjohnson
-------------------------------------------
/dev/modem
115200
lock
dump
debug
logfile /var/log/pppd
defaultroute
modem
crtscts
remotename skyhawk user tjohnson
idle 95
-------------------------------------------


Here is my /etc/ppp/pap-secrets file.
Don't worry, my password isn't secretpasswordnot! :)
-------------------------------------------
# PAP authentication file: /etc/ppp/pap-secrets
# This file should have a permission of 600.
# ~# chmod 600 /etc/ppp/pap-secrets
# Username      Server      Password      IP addresses
tjohnson        *       "secretpasswordnot"        *
-------------------------------------------


Other Notes:

The following MUST be in MODULES.CONF!!!!!
I spent a couple of days flailing around because I 
just did insmods without having the alias's set up.

alias /dev/ppp          ppp_generic
alias char-major-108    ppp_generic
alias tty-ldisc-3       ppp_async
alias tty-ldisc-14      ppp_synctty
alias ppp-compress-21   bsd_comp
alias ppp-compress-24   ppp_deflate
alias ppp-compress-26   ppp_deflate



This Bourne script calls the script.dial script.
-------------------------------------------
#!/bin/sh
/usr/sbin/pppd /dev/modem \
connect "/usr/sbin/chat -t 45 -v -f /root/commtest/dial.script"
---------------------------------------------------------------

Turning off dmesg.
I changed /etc/rc.d/rcS.sysinit to not do dmesg unless jp2 was set. 
Looking back this conflicts with what I've documented as known working
jumpers on the tsmodem2 card and I don't remember why.  Anyhow, here's
what I changed in rcS.sysinit (shortened for brevity).
-----------------------------------------
...
if jp 2; then
  echo "JP 2 detected.  Starting dmesg"
  if  test -x /sbin/dmesg  ; then
    if  test -f /etc/consolelog.level  ; then
      . /etc/consolelog.level
    else
      LOGLEVEL=1
    fi
    /sbin/dmesg -n $LOGLEVEL
  fi
fi
...
-----------------------------------------

Boot hangingig with modem on /dev/ttyAM0.

I encountered hangups when booting the ts7250 with a modem attached on
the DB9.  I think it was related to the bootup function that checks
the serial port.  I finally solved it by removing JP2 and changing the
redboot console to be /dev/ttyAM1.

Redboot console.

I changed the redboot console to /dev/ttyAM1 so that my external modem
wouldn't get any chatter on startup.


Turning off getty on ttyAM0

I changed my /etc/inttab so that the consoles are only started at
runlevels 1 and 2.  I think this is safer than commenting them out as
you can always halt the redboot script with a CTRL+C and start linux
in runlevel 1 instead of 3 and get to the console if you've broken
your network connection.
-------------------------------------------
# Setup the console on ttyAM0.
# We only do this for runlevels 1 and 2
lgn0:12:respawn:/sbin/getty -L 115200 ttyAM0
lgn1:12:respawn:/sbin/getty -L 115200 ttyAM1
-------------------------------------------

Other suggestions:

I found it very helpful to get syslogd working and to ship the logs to
my server.  I also found it helpful to run minicom on my linux server
and watch the output from the serial port.  If you are planning on
hanging a modem off the DB9, you will want to have the port silent on
bootup.

Finally, I had a few times during experimentation when the tsmodem2
card just seemed to be in a funky state.  Turning off the power for 10
seconds seemed to fix it.  I never really tracked this down and things
are running reliably (test not production) so I suspect its related to
 sending garbage to the modem.  I don't recall having many similar
problems with the external modem, but YMMV.

If you have more problems post here as I'll be watching the thread.

Best of Luck,

Tom Johnson



--- In  Jim Jackson <> wrote:
>
> 
> Have you stopped the getty processes running on on the 2 rs232 ports
> so that you can do serial logins?
> 
> Edit /etc/inittab and comment out the getty running on /dev/ttyAM1
> 
> The lines look like
> 
> # Start console logins on both COM Ports
> #
> lgn0:12345:respawn:/sbin/getty -L 115200 ttyAM0
> lgn1:12345:respawn:/sbin/getty -L 115200 ttyAM1
> 
> just put a '#' before the lgn1:12... line, and kick init
> 
>  init -1 1
> 
> to reread the config
> 
> 
> On Thu, 20 Apr 2006, kimdcb200 wrote:
> 
> > I have followed the belowed message from Lee and I do not get that
> > far. My LCP did not start.
> >
> > The log is:
> > 04/19 21:10:50 AM0   checking lockfiles, locking the line
> > 04/19 21:10:50 AM0   makelock(ttyAM0) called
> > 04/19 21:10:50 AM0   do_makelock: lock='/var/lock/LCK..ttyAM0'
> > 04/19 21:10:50 AM0   lock made
> > 04/19 21:10:50 AM0  wfr: waiting for ``RING''
> > 04/19 21:10:50 AM0   got:
> > 04/19 21:10:50 AM0  mdm_read_byte: read returned 0: Success
> > 04/19 21:10:50 AM0  wfr: error in read(): Success
> > 04/19 21:10:50 AM0   wfr: rc=-1, drn=0
> > 04/19 21:10:50 AM0  huh? Junk on the line?
> > 04/19 21:10:50 AM0   >>> could be a dial-out program without proper
> > locking - ch
> >
> > 04/19 21:10:50 AM0   removing lock file
> >
> > I know my modem is working because I use this modem to dial out from
> > my PC to my laptop, and it works well. Now I switch to COM0 of
> > ts7250 and I have problems.
> >
> > I have mgetty running in my ts7250 and the ps-aux as:
> > PID  Uid     VmSize Stat Command
> >     1 root        468 S   init [3]
> >     2 root            SW  [keventd]
> >     3 root            SWN [ksoftirqd_CPU0]
> >     4 root            SW  [kswapd]
> >     5 root            SW  [bdflush]
> >     6 root            SW  [kupdated]
> >     7 root            SW  [mtdblockd]
> >    59 1           448 S   /sbin/portmap
> >    64 root        680 S   /usr/sbin/inetd
> >    79 root       5120 S   /usr/sbin/apache
> >    88 www-data   5128 S   /usr/sbin/apache
> >    89 www-data   5128 S   /usr/sbin/apache
> >    90 www-data   5128 S   /usr/sbin/apache
> >    91 www-data   5128 S   /usr/sbin/apache
> >    92 www-data   5128 S   /usr/sbin/apache
> >    99 root        680 S   -sh
> >   168 root        876 R   /usr/sbin/pppd /dev/ttyAM0 9600 kdebug 8
> > debug lock n
> >   169 root            Z   [sh]
> >   203 root        540 S   /sbin/mgetty -s 38400 ttyAM0
> >   204 root        924 S   dropbear -i
> >   205 root        648 S   -sh
> >   206 root        592 R   ps -aux
> >
> > I read one of the message in this group and someone has mentioned
> > that we need to turn off ssh to run pppd. I cannot turn dropbear off
> > for security reason. Can it cause the ppp dial out not working?
> >
> > Thanks a bunch
> > Kim
> >
> >
> >
> > >I'm stuggling to get a PPP connection from the board to the ISP.
> > >
> > > I've disabled the console on ttyAM0 in Redboot (JP2&4) and TSlinux
> > > (inittab). I've connected a USRobotics modem to ttyAM0 and a
> > terminal
> > > to ttyAM1.
> > >
> > > I've inserted the required modules using the following commands:
> > >
> > > insmod slhc.o
> > > insmod ppp_generic.o
> > > insmod ppp_async.o
> > >
> > >
> > > Using the following chat script:
> > >
> > > ABORT "NO CARRIER"
> > > ABORT "NO DIALTONE"
> > > ABORT "NO ANSWER"
> > > ABORT "BUSY"
> > > ABORT "ERROR"
> > > TIMEOUT 10
> > > " " ATZ
> > > OK "AT"
> > > OK "ATD08453011535"
> > > CONNECT `'
> > >
> > > With the following command:
> > >
> > > pppd /dev/ttyAM0 9600 kdebug 1 debug lock
> > > nocrtscts
> > > defaultroute
> > > connect "/usr/sbin/chat -v -f /etc/ppp/chat.script"
> > >
> > > forces the modem to dial the ISP (great). Unfortunately, using a
> > > sniffer tool it appears PPP never passes the LCP stage. All I can
> > see
> > > is duplicated LCP requests from the Linux box and the remote end
> > > NAKing the magic number (acceptable).
> > >
> > > Anybody passed this stage???
> > >
> > > Regards,
> > >
> > > Lee
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>








 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU