pppd hangs: problem found and solved (almost)

Discussion in 'Linux Networking' started by dubal, Aug 7, 2005.

  1. dubal

    dubal Guest

    Hello.

    On April 5th, there was a thread on this group titled "pppd and ttyS0 -
    AGRRH!". (I do not know how to quote the past thread link here). In
    this thread the problem discussed was that on a server that is setup as
    dialin, pppd would start and hang for no apperent reason.

    Exactly same thing happened to me. Struggled a lot before I found this
    thread. Fedora core 3, with and without yum update. Reinstalled FC3.
    With different kernels. No Go.

    To cut a long story short, here is what I saw in
    /var/log/mgetty.log.ttyS0:
    WARNING: starting login while DCD is low!

    So I thought this is something to do with the modem. I changed modem to
    Multitech ZDX on the server. And Voila! it worked on the first attempt
    and every attempt thereafter. The earlier modem was SupraExpress
    external.

    Seems pppd starts and waits for modem to push up dcd or some such and
    some modems don't seem to do that by default. Can you please tell me
    what AT command to put in /etc/mgetty+sendfax/mgetty.config to make
    this happen? Multitech modems are more expensive than Supra.

    Thanks in advance.
    Regards.
    J Dubal.
     
    dubal, Aug 7, 2005
    #1
    1. Advertisements

  2. Perhaps something similar to the lines

    port ttyS0
    init-chat "" AT&F OK

    answer-chat "" ATA CONNECT \c
    answer-chat-timeout 25

    would work. What timeout is up to you, the default is 80 seconds.
     
    Clifford Kite, Aug 7, 2005
    #2
    1. Advertisements

  3. Hi there


    It's a better idea to config the modem with sensible defaults, write
    those to non volatile memory and use ATZ instead of AT&F (some factory
    defaults don't make any sense) as your init string.
    The correct AT commands should be in your modem documentation. It's
    probably something like;

    - Fixed baud rate (no auto baud)
    - Hardware bidirectional RTS-CTS flow control (no x-on/x-off)
    - 8 Bits, no parity, 1 stopbit
    - The modem should produce the TRUE DCD status (&C1)
    - The modem should NOT ignore the DTR status (&D2 or &D3)
    - Reset on DTR toggle (&D3, this is sometimes a S register) [1]

    Write those with something like AT&W.

    mgetty and fax software send their own additional AT commands.

    If it's an external modem, get a RS232 tester with leds to indicate the
    status of the lines.

    [1] I hardwired my modems to do a hadware reset on DTR toggle.
    This way the pc will revive a crashed modem.


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #3
  4. I distinctly *disagree* with that.
    The init script *depends* on beginning from a known point. The
    NVRAM in a modem is *not* a guaranteed to always be the same
    point to start with. But the factory settings are.

    It is just as easy to reset factory defaults and then initialize
    whatever state is desired, as it is to reset to nvram's saved
    state and initialize whatever state is desired. The difference
    is that factory defaults, for any given modem, will always be
    the same.
    I would say skip writing it to nvram, and just simply put the
    commands necessary into your init strings.
    This is a very good idea!
     
    Floyd L. Davidson, Aug 8, 2005
    #4
  5. Hi there


    Under which circumstances do they change?
    The disadvantage is that you have to put very long strings in the config
    files of every piece of software that communicates with modems.
    Further more, you have to change all those settings whenever you change
    your modem.
    It's also incompatible with leased lines (does anyone still use those?).
    It has been online for years;
    http://www.sput.nl/hardware/modem-reset.html


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #5
  6. Anytime any program writes AT&W to the modem! Which is to say,
    whenever you shoot yourself in the foot.
    Yes. And the need to change any one of them does not cause a
    need to change all of them.
    You have to do that *anyway*.
    Yes, and no it is *not* necessarily imcompatible.

    However, in cases where it is, there is also only one
    application using the modem, hence nvram is has a very different
    significance.
    Trust me, it has been known for a lot longer than that.
     
    Floyd L. Davidson, Aug 8, 2005
    #6
  7. Hi there


    Apart from shooting yourself in the foot.
    Once vs for every program.
    Unless they all use a common config file.
    Remember, there is no dial tone or ring signal.
    To avoid being hyjacked it's a good idea to disable the esc command
    (useally '+++'.
    It's best to disable AT commands alltogether.
    So are proper POR cirquits.
    I've never seen them in anything else then TVs.

    Most cirquits generate a reset on a fast rise of the supply voltage.
    The proper way of doing things is to check wether the supply voltage is
    high enough and generate a reset on a power low to power OK transition,
    regardsless of the speed at which the supply voltage rises.


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #7
  8. That is a common problem though, which should not be either
    ignored or assumed will not happen. With multiple applications
    that each require a specific configuration in nvram, *someone*
    has to *remember* all of them. Two years later, if someone
    (else perhaps) decides to change the way just one of them works,
    and sees what appears to be a basic change that should be
    written to nvram... a foot gets shot off. And of course if
    this is a business, where system administrators may change, that
    is very likely and is *really* annoying.
    No, once for *every* program. You just aren't going to find a
    "common denominator" nvram configuration which is as common as
    would be hoped for. Different modems, different programs,
    etc. etc....
    That may be true, in /some/ situations... and not in others.

    Your perception of Private Line usage may be limited to some
    degree. I worked for an IXC for 34 years, my perception of
    Private Line usage is that anything I think is "the" way, is
    going to be done differenctly by the next guy that buys a PL.
    :)

    Keep in mind that some uses for a Private Line modem might have
    a modem connected to a computer, just like a dialup modem, and
    it might be used by multiple applications with different
    configuration needs, just as would a dialup modem. The only
    difference is that there probably (though even this is not
    necessarily true either) will never be a need for ring detection
    or dial commands.
    What are "proper POR cirquits"?
    What is the significance of that in relationship to using or not
    using nvram configuration in a modem????
     
    Floyd L. Davidson, Aug 8, 2005
    #8
  9. dubal

    Unruh Guest

    No, experience says it is not. Many programs will reprogram your modem for
    you apparently. It is far better to use the factor defaults and then to set
    the extra config you need.
    That may be, but they form a stable platform from which to set up
    reasonable ones. ATZ does not.
    Nothing wrong with these ( except the hardware rewiring), but again, AT&F
    forms a stable platform on which to impliment them.

     
    Unruh, Aug 8, 2005
    #9
  10. dubal

    Unruh Guest

    The legions of software writers out there who think they know how you
    should run your machine, and write &W for you.
     
    Unruh, Aug 8, 2005
    #10
  11. Hi there

    That's ugly.


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #11
  12. Hi there


    The example given by Unruh is better.
    It's something I really didn't expect.
    The settings I use work for everything I used the last 15 years or so.
    We have only used them for SLIP and PPP links. In many cases with PCs at
    both ends.
    Power On Reset cirquits that actually work.
    Very little.


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #12
  13. Hi there

    The hardware rewiring is great if the modem is at a place where they
    charge a few hundred for a modem reset.


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #13
  14. Both examples are good. I personally don't experience any
    software that arbitrarily causes a write to nvram. But that is
    probably because I wouldn't even look at default init strings
    before I delete them and start adding my own.
    Either you haven't done anything, or you have simply
    forgotten...
    They you *are* using them where init strings are sent to them
    from software.
    Or none, since you said they only work in TV's... :) :)

    (Or do TV's have modems now??? I don't watch TV and don't know!)
     
    Floyd L. Davidson, Aug 8, 2005
    #14
  15. As Floyd Davidson pointed out, that's not a good idea unless you *know*
    ATZ is configured correctly. Most modems do the Right Thing with AT&F
    (the only exception I know about is the USR Sportster). He said his modem
    was an external Supra Express. From _my_ Supra Express:

    at&f
    OK
    at&v
    ACTIVE PROFILE:
    B1 E1 L2 M1 N0 Q0 T V1 W0 X4 Y0 &C1 &D2 &G0 &J0 &K3 &Q5 &R1 &S0 &T5 &X0
    S00:000 S01:000 S02:043 S03:013 S04:010 S05:008 S06:002 S07:050 S08:002
    S09:006 S10:014 S11:095 S12:050 S18:000 S25:005 S26:001 S36:007 S37:000
    S38:020 S46:138 S48:007 S95:000

    OK
     
    Clifford Kite, Aug 8, 2005
    #15
  16. Hi there


    How do you know what to do if you don't know the defaults.
    AT&F on a Us Robotics Courier will switch on X-on X-off flow control. If
    you don't override that with your own init string your link is not 8 bit
    clean.
    In the '70s I used a 7 bit even parity system.
    But that's more then 15 years ago.
    The configuration we used is in this (outdated) document;
    http://www.tldp.org/HOWTO/Leased-Line.html
    Our ISP at the time insisted on doing things this way. It's much simpler
    then working with mgetty, chat scripts or logging in. We used it until
    we switched to DSL.
    What on earth gave you that idea?

    Just have a look inside your PC's power supply and compare that with the
    POR cirquit in your TV;
    On a power dip a TV will reboot, a PC will crash without rebooting. The
    same applies to (DSL) modems and most other digital equipment. It's a
    common design flaw.
    See http://www.sput.nl/hardware/modem-reset.html for a discription of
    the problem.
    An other way of avoiding these problems is of course using a UPS.
    Some older ('70s) models do. They where used to access remote systems
    and used the RC as a keyboard.


    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #16
  17. Hi there


    And the Courier. But I have seen others as well.
    Modems with auto answer default on for instance.
    This is where my mistrust of (modem) factory defaults comes from.

    Regards,
    Rob
     
    Rob van der Putten, Aug 8, 2005
    #17
  18. That is the application's default init string. For example,
    pppd, cu, minicom, seyon, whatever. It makes no difference to
    me what they put there for a "default", because it *never*
    applies to the modem that have!
    Exactly. And if the default init string for minicom doesn't do
    that, it won't work right. I just delete the default, whatever
    it is, and get out the modem's manual to see where I'm starting
    from and set up an init string that gets me from the modem
    factory settings to where I want it to be.
    Then you sure haven't done much with modes for 15 years! I do
    assume you've probably have done a lot with something else (that
    I wouldn't understand at all), so don't take that as some stupid
    insult. I mean it literally. Most people do almost nothing with
    modems...
    Interesting document. Obviously I disagree with the way to set up
    init strings, but either way will work. (I also do not recommend
    shielded RS-232 cable as a normal thing.)
    Well, *you* did! :)

    "So are proper POR cirquits.
    I've never seen them in anything else then TVs."
    Crash without rebooting??? Mine all reboot. They have a bios
    configuration option to reboot or not when power is cycled.
    Fine, but while that is all interesting, it hasn't got anything to
    do with modem init strings...
     
    Floyd L. Davidson, Aug 8, 2005
    #18
  19. If you meant me, I don't have a Supra Express.

    However, you've both missed the point in regard to modem nvram vs.
    factory default settings.

    *There* *is* *no* *such* *thing* *as* *the* *wrong* *factory* *default* *settings*.

    You take whatever the modem has, because it will *always* be the same.
    The application's init string 1) resets factory settings and 2) then
    changes that configuration to whatever you want that is different.
     
    Floyd L. Davidson, Aug 8, 2005
    #19
  20. dubal

    Unruh Guest

    Agreed. The USR sportsters and perhaps couriers are completely brain dead,
    which is why I usually say AT&F or if the modem is a sportster, AT&F1.

    (Why in the world they would have made xon/off the default is completely
    beyond me. )
     
    Unruh, Aug 8, 2005
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.