Shop OBEX P1 Docs P2 Docs Learn Events
Help! Hyperterminal stamp modem connectivity problems — Parallax Forums

Help! Hyperterminal stamp modem connectivity problems

ArchiverArchiver Posts: 46,084
edited 2003-02-09 04:12 in General Discussion
I am having problems getting hyperterminal to connect to the stamp
modem. I am using the appmod modem board from parallax with the
Cermetek ch1786 modem. The modem will call hyperterminal.
Hyperterminal will begin the try to connect but no handshake occurs
so I can't send data. I have hyperterminal set to 2400 bps 8 data
bits, no parity, 1 stop bit and no modulation. Any help would be
greatly appreciated!

Thanks,
Jayme

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-08 17:45
    1. Triple check that both modems are locked for the same speed/stop/parity.
    This probably requires sending "AT" commands to the PC's modem to get it out
    of its normal auto-sense mode.

    2. An alternative is to set a long time-out for the connection interval.

    When modems connect they go through a sequence of "whistling" exchanges to
    find a common speed and analog protocol. When using modern high-speed
    modems with older protocols (anything at 2400 baud) this can take a long
    time (60+ seconds). I've often seen the connection interval time-out before
    this is completed and solved the problem by extending the interval. I think
    this setting is in MS Windows control panel modem properties, but my memory
    may be fading. By locking the modem to a fixed baud rate with AT commands
    you get a faster and more reliable connections.

    I did a Google search with "modem at baud rate" and this
    http://www.sixnetio.com/html_files/tech_notes/tn606.pdf came to the top of
    the list. It seems to be very close to what you need. There is probably
    more helpful information farther down the list. These instructions may not
    be exactly right for your modem, so you may need to fiddle a bit. You
    should be able to find your modem's AT commands on the net, but these
    particular commands are fairly consistent across all models.

    I like knowing what sorts of things people are doing with Basic Stamps. If
    you don't mind sharing, what is your application?

    -- Al Margolis, founder
    www.hobbyengineering.com
    The WEB's newest source for robotics supplies and information

    Original Message
    From: jaymebirken <taunting_pamola@h...>
    [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=q2oNUqzI10bE_UjHhEw8JiHJwZs104QvcAfDlnvoXgYVIEdSBwkPk8wwNg1BozWjUjHBBBGgUplBFaU5DkZUcFTv]taunting_pamola@h...[/url
    Sent: Saturday, February 08, 2003 9:18 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Help! Hyperterminal stamp modem connectivity
    problems


    I am having problems getting hyperterminal to connect to the stamp
    modem. I am using the appmod modem board from parallax with the
    Cermetek ch1786 modem. The modem will call hyperterminal.
    Hyperterminal will begin the try to connect but no handshake occurs
    so I can't send data. I have hyperterminal set to 2400 bps 8 data
    bits, no parity, 1 stop bit and no modulation. Any help would be
    greatly appreciated!

    Thanks,
    Jayme



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-08 18:05
    >I am having problems getting hyperterminal to connect to the stamp
    >modem. I am using the appmod modem board from parallax with the
    >Cermetek ch1786 modem. The modem will call hyperterminal.
    >Hyperterminal will begin the try to connect but no handshake occurs
    >so I can't send data. I have hyperterminal set to 2400 bps 8 data
    >bits, no parity, 1 stop bit and no modulation. Any help would be
    >greatly appreciated!
    >
    >Thanks,
    >Jayme


    Hi Jayme,

    Be sure you disable error checking and data compression on the
    hyperterminal end. Most modern modems leave those advanced features
    ON by default, but they always (in my experience) prevent connection
    with the Cermetek ch1786. The AT commands are:
    AT \N0 %C0 ^M


    I have more stuff about my own take on the modem connection posted at
    http://www.emesys.com/BS2rs232.htm#modem

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-08 18:05
    I am writing a program similar to the temperature gathering program
    found in the nuts and volts article "calling all stamps"
    http://www.parallaxinc.com/Downloads/Documentation/nv/v2/col/NV60-
    Calling_All_Stamps.pdf
    There are a few minor differences. I am attempting to have the stamp
    call a central computer at a set time and send temperature data it
    has gathered. This way you can program the stamp when to take data
    and sent it back to a central computer. By approaching data gathering
    this way you can get the precise data you want at the time you want
    without sitting at the central computer.

    Jayme




    --- In basicstamps@yahoogroups.com, "Al Margolis\(TX\)" <al@b...>
    wrote:
    > 1. Triple check that both modems are locked for the same
    speed/stop/parity.
    > This probably requires sending "AT" commands to the PC's modem to
    get it out
    > of its normal auto-sense mode.
    >
    > 2. An alternative is to set a long time-out for the connection
    interval.
    >
    > When modems connect they go through a sequence of "whistling"
    exchanges to
    > find a common speed and analog protocol. When using modern high-
    speed
    > modems with older protocols (anything at 2400 baud) this can take a
    long
    > time (60+ seconds). I've often seen the connection interval time-
    out before
    > this is completed and solved the problem by extending the
    interval. I think
    > this setting is in MS Windows control panel modem properties, but
    my memory
    > may be fading. By locking the modem to a fixed baud rate with AT
    commands
    > you get a faster and more reliable connections.
    >
    > I did a Google search with "modem at baud rate" and this
    > http://www.sixnetio.com/html_files/tech_notes/tn606.pdf came to the
    top of
    > the list. It seems to be very close to what you need. There is
    probably
    > more helpful information farther down the list. These instructions
    may not
    > be exactly right for your modem, so you may need to fiddle a bit.
    You
    > should be able to find your modem's AT commands on the net, but
    these
    > particular commands are fairly consistent across all models.
    >
    > I like knowing what sorts of things people are doing with Basic
    Stamps. If
    > you don't mind sharing, what is your application?
    >
    > -- Al Margolis, founder
    > www.hobbyengineering.com
    > The WEB's newest source for robotics supplies and information
    >
    >
    Original Message
    > From: jaymebirken <taunting_pamola@h...>
    > [noparse][[/noparse]mailto:taunting_pamola@h...]
    > Sent: Saturday, February 08, 2003 9:18 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Help! Hyperterminal stamp modem connectivity
    > problems
    >
    >
    > I am having problems getting hyperterminal to connect to the stamp
    > modem. I am using the appmod modem board from parallax with the
    > Cermetek ch1786 modem. The modem will call hyperterminal.
    > Hyperterminal will begin the try to connect but no handshake occurs
    > so I can't send data. I have hyperterminal set to 2400 bps 8 data
    > bits, no parity, 1 stop bit and no modulation. Any help would be
    > greatly appreciated!
    >
    > Thanks,
    > Jayme
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-08 18:43
    Hi Jayme,

    Oh, I gave an old link to my modems page. It is:
    http://www.emesys.com/BS2modem.htm

    In hyperterminal you can enter these settings in the connection dialog:
    properties/connect to/configure/advanced-extra settings=\N0%C0

    and you can lock the baud rate at 2400 for faster more reliable connection:
    properties/connect-to/configure/general="2400baud"+"connect only at
    this speed".

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-08 20:58
    Tracy, Thanks for your help and the link to your site. Unfortunately
    I am still having difficulties with the electronic handshake with
    hyperterminal. At my last attempt I configured hyperterminal as
    follows:

    Connect using: hsp56 micro modem (the modem I am using)
    Port speed: 2400
    Data protocol: disabled
    Compression: disabled
    Flow control: none

    Then I instruct hyperterminal to wait for calls.


    The part of my program that deals with communication is as follows

    counter var byte
    RX1 con 14
    TX1 con 15
    T2400 con 396
    kal con 26726
    lf con 10
    ff con 12
    rct var word
    tk var word
    tc var word
    tpav var word 'temp averaging var
    tpct var word 'temp counting var
    ttotal var word 'temp sum var
    dcd_ var In13
    yes con 1



    dial:
    DEBUG "Initializing Modem",cr
    PAUSE 1000 ' allow modem
    to power up
    SEROUT TX1, T2400,[noparse][[/noparse]"AT", CR] ' setup modem for
    speed
    SERIN RX1, T2400, [noparse][[/noparse]WAIT ("OK")]
    PAUSE 250
    SEROUT TX1, T2400, 15, [noparse][[/noparse]"ATDT,5,6301;", CR]
    DEBUG "Dialing" , cr
    pause 20000


    goto carrier_connect

    carrier_connect:
    debug "waiting for carrier detect",cr
    pause 10
    if dcd_= YES THEN communicate
    GOTO carrier_connect



    communicate:
    pause 30000
    debug "sending data to hyperterminal"
    SEROUT TX1, T2400, [noparse][[/noparse]FF]
    SEROUT TX1, T2400, [noparse][[/noparse]"==================================", CR, LF]
    SEROUT TX1, T2400, [noparse][[/noparse]"Remote Stamp - Temperature Station", CR, LF]
    SEROUT TX1, T2400, [noparse][[/noparse]"==================================", CR, LF]
    SEROUT TX1, T2400, [noparse][[/noparse]LF]
    SEROUT TX1, T2400, [noparse][[/noparse]"Temp at set time....... ", DEC tc, CR, LF]
    pause 1000
    goto hang_up

    Jayme
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-08 21:04
    Check the PC modem documentation -- there should be an AT command to force
    the modem to connect at low speeds. The settings in Windows and
    HyperTerminal are totally different and only affect what is directly
    connected to the PC -- not what the device is connecting to at the other
    end. We ran into similar problems trying to use a 56k modem to connect to
    equipment using Hayes 1200 and 2400 baud modems. The protocol negotiation
    took so long the software or modem on the PC would give up.

    Original Message


    > Tracy, Thanks for your help and the link to your site. Unfortunately
    > I am still having difficulties with the electronic handshake with
    > hyperterminal. At my last attempt I configured hyperterminal as
    > follows:
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-09 04:12
    Hi Jayme,

    There are a couple of things that puzzle me about your program, but
    they may not be relevant. Let's see.

    > SEROUT TX1, T2400,[noparse][[/noparse]"AT", CR] ' setup modem for
    >speed
    > SERIN RX1, T2400, [noparse][[/noparse]WAIT ("OK")]
    > PAUSE 250
    > SEROUT TX1, T2400, 15, [noparse][[/noparse]"ATDT,5,6301;", CR]

    After the CH1786 receives the "AT^M", I had thought that it sends
    back the "OK" response very quickly, so quickly that the Stamp would
    not be ready to receive it and would become locked in the serin
    waiting for "OK". I've never actually tested that. (I usually use
    the stamp modem in answer mode with both echo and result reporting
    turned off.) Did you ever have any trouble with it locking up at
    that point?

    The phone number is funny. delay, "5", delay, "6301". Is this some
    sort of PBX phone number?

    Assuming the phone number is good, I am puzzled by the semicolon ";"
    at the end of the dial string. I think the ";" keeps the modem in
    command mode, while the line stays off hook. That allows you to
    enter more AT commands before data flows from the Stamp to the line.
    In order to complete the connection to the line so that the Stamp can
    send data, you have to end a dialing command without a ";". But I
    don't see any need for it in your program in the first place.

    How about this sentence:

    >The modem will call hyperterminal. Hyperterminal will begin the try
    >to connect but no handshake occurs so I can't send data.

    Does that mean that your stamp did dial out correctly and
    hyperterminal picked up the line? Maybe the Stamp is still in
    command mode because of the ";".


    Where is your stamp program getting stuck? Is it stuck in the DCD
    loop, or does it get past that? It should not be necessary to wait
    30 seconds after DCD_ to send the data.

    One more thing, I have found that many modems will instantly
    disconnect, if, during the negotiation phase, they receive command of
    data input from the DTE or DCE side. That is, while the two modems
    are negotiating a connection, don't press any keys on your
    hyperterminal keyboard, and don't let your program send any
    characters to the modem, until data carrier detect is active. It
    doesn't look like that is a problem in your program, because you are
    waiting for DCD_ in a loop. But it is something to watch out for.

    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com



    >Tracy, Thanks for your help and the link to your site. Unfortunately
    >I am still having difficulties with the electronic handshake with
    >hyperterminal. At my last attempt I configured hyperterminal as
    >follows:
    >
    >Connect using: hsp56 micro modem (the modem I am using)
    >Port speed: 2400
    >Data protocol: disabled
    >Compression: disabled
    >Flow control: none
    >
    >Then I instruct hyperterminal to wait for calls.
    >
    >
    >The part of my program that deals with communication is as follows
    >
    >counter var byte
    >RX1 con 14
    >TX1 con 15
    >T2400 con 396
    >kal con 26726
    >lf con 10
    >ff con 12
    >rct var word
    >tk var word
    >tc var word
    >tpav var word 'temp averaging var
    >tpct var word 'temp counting var
    >ttotal var word 'temp sum var
    >dcd_ var In13
    >yes con 1
    >
    >
    >
    >dial:
    > DEBUG "Initializing Modem",cr
    > PAUSE 1000 ' allow modem
    >to power up
    > SEROUT TX1, T2400,[noparse][[/noparse]"AT", CR] ' setup modem for
    >speed
    > SERIN RX1, T2400, [noparse][[/noparse]WAIT ("OK")]
    > PAUSE 250
    > SEROUT TX1, T2400, 15, [noparse][[/noparse]"ATDT,5,6301;", CR]
    > DEBUG "Dialing" , cr
    >pause 20000
    >
    >
    >goto carrier_connect
    >
    >carrier_connect:
    >debug "waiting for carrier detect",cr
    >pause 10
    >if dcd_= YES THEN communicate
    >GOTO carrier_connect
    >
    >
    >
    >communicate:
    >pause 30000
    >debug "sending data to hyperterminal"
    >SEROUT TX1, T2400, [noparse][[/noparse]FF]
    >SEROUT TX1, T2400, [noparse][[/noparse]"==================================", CR, LF]
    >SEROUT TX1, T2400, [noparse][[/noparse]"Remote Stamp - Temperature Station", CR, LF]
    >SEROUT TX1, T2400, [noparse][[/noparse]"==================================", CR, LF]
    >SEROUT TX1, T2400, [noparse][[/noparse]LF]
    >SEROUT TX1, T2400, [noparse][[/noparse]"Temp at set time....... ", DEC tc, CR, LF]
    >pause 1000
    >goto hang_up
    >
    >
    Jayme
Sign In or Register to comment.