I need emulate a modem in code

Posted on 2008-11-13
Last Modified: 2013-12-27

I need a modem emulator or similar to "system test" a server that includes modem communications with the outside world, because I can't actually dial the outside world for tests.


I work with a server that includes a bank of modems and phone lines that connect to hundreds of remote devices in the outside world. The remote devices are installed at our customer sites, and are relatively simple -- they auto answer, handshake with the server application, accept a command, upload some data, then disconnect. The problem is how do you fully system test such a server without hundreds of external test sites? (We can't contact our customers for the tests.)

My thought is emulation -- build system emulating modem bank and the remote devices. The test server's comm ports would be physically connected to the emulator's comm ports (i.e. null modem), and the emulator would look like modem hardware (proper treatment of hook, RTS/CTS, AT commands, etc.) so the test server would think it is dialing the outside world and connecting to remote devices, when in fact it is only talking to our emulator.

Problem: where can I get specs to code (or get actual code) for a modem emulator? (Our remote device protocol is simple and 100% known to us, so emulating that part is easy.)

Thank you in advance,
Question by:parkerea
    LVL 57

    Accepted Solution


    Author Comment

    Close, and pretty cool, but I am not sure if it is what I am looking for. (Surprisingly, it is EXACTLY what I need for completely different part of this project, testing a functions of the system that uses mulitple COM ports that connect to other hardware, not modems).

    Are you suggesting running com0com on the system under test, or on the emulator? I suspect it is on both as I think it establishes "COM port pairs" -- 1 on the system under test, 1 on the emulator. If this is your thought, it does not quite fit as we need the system under test to maintain its hardware, with the exception of the modems.  I.e., unplug the modems, plug in the emulator system in their place by using null modems. We also need the system OS and software configuration to be very close to production.

    Thank you again,


    Author Closing Comment

    My previous comment was probably wrong, so I have awarded the points to you. Thinking about it again, I realized that the modem pool probably uses a driver something like. The production system has 64 phone lines and modems (!),  but in my head I was picturing traditional serial port connected modems -- clearly NOT what our system actually has -- so I bet there is simply no way to replace the modems with null modems, because I bet there are no serial ports at all.

    Thank you one more time!
    - parkerea
    LVL 57

    Expert Comment

    Thanks for the points.  After re-reading I realize now that what you originally asked for was not what I gave you, but I'm glad that you could use it.

    You are correct.  If you are connecting to a modem back of 60+ modems, you have some type of special driver.  I don't think that Windows (or Linux) is going to support 60+ com ports.  They might, but typically I think I have seen up to 8.  You run out of IRQ's and memory addresses real quick trying to do 64.  :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Mobile App Development with PhoneGap

    PhoneGap can help you leverage your already existing HTML5, JavaScript, and CSS skills in order to create and deploy cross-platform mobile apps.This program comprehensively covers HTML5 mobile app development from top to bottom.

    A short article about problems I had with the new location API and permissions in Marshmallow
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now