Connect with us

modem communication

Discussion in 'Electronic Design' started by [email protected], Dec 7, 2005.

Scroll to continue with content
  1. Guest

    hi,
    im in need to know some information about how to use the modem to
    communicate with another machine ( with a modem) using low level API to
    control the modem. i've heard about zmodem, xmodem, etc, but dont know
    the api they use to comminicate with the modem. Please can someone
    give me a starting point?

    CMOS
     
  2. Joel Kolstad

    Joel Kolstad Guest

    Under Windows and Linux, modems show up as "files," that is, you open a "file"
    such as Com1: or /dev/ttya with fopen() and then use fread() or fwrite() to
    retreieve or send characters to the modem. You use I/O control functions
    (IOCTL) to change bit rates, stop bits, etc.

    XModem, YModem, ZModem, etc. are _protocols_ meant for exchanging files.
    They're relatively simple (well... XModem is trivial, YModem is a little
    harder, and full ZModem is certainly not something you'd want to plan on only
    spending one evening with), and you can find the protocol definitions
    themselves as well as code for implementing it with a little Googling.

    These days, often people just use the TCP/IP stacks built into Linux or
    Windows to connect to another machine, even over a dial-up connection. TCP/IP
    presents a "sockets" interface (API) that lets your application not have to
    worry about anywhere near as many details as if you use X/Y/ZModem, as well as
    allowing your application to function over pretty much any network (including
    the Internet, of course) and lots of hardware (modems, Ethernet, wireless,
    etc.). You take a performance hit for doing this -- file transfer speed using
    something like FTP will only be, say, 80% of what ZModem could get you -- but
    the flexibility this approach creates more than makes up for it.

    Unless you're communicating with a highly resource-limited device such as an 8
    bit microcontroller, I'd suggest going the TCP/IP route. (And just to prove
    it can be done, even on those devices people have implemented TCP/IP stacks!)

    ---Joel Kolstad
     
  3. Guest

    hi, thank for the reply.
    i always wanted to use sockets for the communications, but there are
    some requrements that makes using sockets difficult ( this is what i
    think).
    the scenario is =>

    there will be several PC's with each having a modem and a telephone
    connection. No PC has the internet access. All PC's should have the
    ability to connect to any other PC by just dialing the corresponding
    telephone number. After connected, they need to communicate
    using the TCP/IP protocol. ( i.e i need to use Sockets in the
    communication.). PC's will have Windows Me/98 as the O/s.


    (this is similar to what happens with hyperterminal, but i think the
    difference is the protocol used in the communication.)

    i guess i can use PPP for this, but this will require atleast windows
    2000.

    please advice me on the path i should choose.

    thank you
    CMOS
     
  4. Have a look at the "AT"commandset that comes with the modems.
    All communication is built from there.

    Rene
     
  5. Like, What?

    Even that sorry pile of duff code wrapped in a GUI could do Sockets, PPP and
    at least MSCHAP - a broken-by-microsoft-design version of the chap
    protocol - for the dialup/connect part.

    I will bet that your main problem will be how to configure the dial-in;
    Windows 98 was never much of a Server OS.

    Another problem will be how to manage the configuration of the machines;

    Static IP adresses of each host that must be entered in one dialog box for
    PPP to work (with a reboot at the end), fixed telephone numbers and an
    "hosts" file with all the other PC's since you do not have DNS. Default
    Gateway should be 0.0.0.0 - that should cause PPP to negotiate an adress
    with the other end.

    "FidoNet" actually worked like what you describe. Maybe there is an
    implementation?
     
  6. Si Ballenger

    Si Ballenger Guest

    Try using the dialin server included in windows 98 (or use the
    dun 1.3 0r 1.4 upgrade on win 95). When you set the server, it
    will answer on the first ring and establish a tcp/ip connection
    with the calling machine. Not the best setup, but it does work.
    The link below has some info to give you an idea on the setup.

    http://www.windowsnetworking.com/j_helmig/dunservr.htm#included in windows98
     
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.
Electronics Point Logo
Continue to site
Quote of the day

-