Re: modem programming

From: fred smith (fredex_at_fcshome.stoneham.ma.us)
Date: 09/29/03

  • Next message: Kent Borg: "Re: Remote Keyboard and mouse"
    To: redhat-list@redhat.com
    Date: Sun, 28 Sep 2003 18:06:22 -0400
    
    
    

    On Sun, Sep 28, 2003 at 10:27:15AM -0700, Srinivas S wrote:
    > Hello,
    >
    > I want to program my external modem for communication. If
    > anyone could tell me how i could go abt it or send a sample program in
    > C/C++, how to program an external modem on a serial port, to initialize
    > it and dial a number, it would be of great help.

    Srinivas:

    You've got two related but different issues here.

    The first is how do control the serial port from a C or C++ program,
    the second is how to control the modem.

    The first is pretty much like any Unix system. There is a HOWTO for
    serial programming on Linux, I suggest you look at the HOWTO documents
    on your distribution, or check out the LDP (Linux Documentation Project)
    for their HOWTO pages.

    Regarding programming the modem, you need to know its commandset and
    the responses it sends, so you can (having written the lower-layer
    code to handle the serial port) then send it the desired commands
    and parse its responses for correctness. Unfortunately, every modem,
    even those that proclaim "Hayes Compatible" has its own slightly
    incompatible set of commands, so you need the correct documentation
    for the exact modem you have, or the one you intend as your program's
    target.

    Fred

    -- 
    ---- Fred Smith -- fredex@fcshome.stoneham.ma.us -----------------------------
      "And he will be called Wonderful Counselor, Mighty God, Everlasting Father,
      Prince of Peace. Of the increase of his government there will be no end. He 
     will reign on David's throne and over his kingdom, establishing and upholding
          it with justice and righteousness from that time on and forever."
    ------------------------------- Isaiah 9:7 (niv) ------------------------------
    
    

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    


  • Next message: Kent Borg: "Re: Remote Keyboard and mouse"

    Relevant Pages

    • Re: Telephone modem
      ... Ok I have found documention and AT Commands documentation (a very large ... file) for my modem which is by the way a wavecom Q2426 modem. ... Can I do the same with AT Commands? ... > Peter wrote: ...
      (microsoft.public.dotnet.framework.compactframework)
    • Re: Improve connect speed
      ... That can be as easy as just going to the modem's installation folder within ... There will usually be documentation with a modem you install yourself and any AT ... commands specific to it will be listed in that documentation. ...
      (microsoft.public.windowsxp.general)
    • Re: Extra dial-string modem commands from EVC++
      ... > that modem and then remove them when the RAS connection is removed? ... > wouldn't hold my breath while looking for documentation on this. ... It takes a couple of AT commands to get a GPRS modem to start a PPP ...
      (microsoft.public.pocketpc.developer)
    • Re: problems with wvdial
      ... pppd wants a "working" serial link and this is ... commands are evidently implemented by the modem, ... than a regular PSTN modem. ... the peer. ...
      (comp.os.linux.networking)
    • Re: minicom serial output
      ... >doesn't react and a multimeter accross the serial port shows that no data ... >initialisation / hangup commands. ... I already changed the modem initialisation string to ... present minicom configuration, go back to the default configuration ...
      (comp.os.linux.hardware)