Results 1 to 6 of 6

Thread: Modem Port Number

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2001
    Posts
    5

    Question Modem Port Number

    Hello , I'm developing a phone system using VB6 and i need to get the modem Com Port number from the program, How can i do that.... Thanks For the Help
    Amr Aly

  2. #2
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    There may be an API call do to it, I'm not sure. But another way is to open the ports starting with one and try to issue AT commands and look for a response. Most, if not all, modems will support the basic subset of AT commands. Below is a list. Start with V1 (verbose response). Then try E1 or C1, or others might be good to just get a response.

    To issue an AT command you open a port, then send "AT" & command & vbCrLf


    Greg


    Basic AT Commands
    Command Description
    A Go off-hook and attempt to answer a call.
    B0 Select V.22 connection at 1200 bps.
    B1 Select Bell 212A connection at 1200 bps.
    C1 Return OK message.
    Dn Dial modifier.
    E0 Turn off command echo.
    E1 Turn on command echo.
    F0 Select auto-detect mode (equivalent to N1). (RC144)
    F1 Select V.21 or Bell 103. (RC144)
    F2 Reserved. (RC144)
    F3 Select V.23 line modulation. (RC144)
    F4 Select V.22 or Bell 212A 1200 bps line speed. (RC144)
    F5 Select V.22 bis line modulation. (RC144)
    F6 Select V.32 bis or V.32 4800 line modulation. (RC144)
    F7 Select V.32 bis 7200 line modulation. (RC144)
    F8 Select V.32 bis or V.32 9600 line modulation. (RC144)
    F9 Select V.32 bis 12000 line modulation. (RC144)
    F10 Select V.32 bis 14400 line modulation. (RC144)
    H0 Initiate a hang-up sequence.
    H1 If on-hook, go off-hook and enter command mode.
    I0 Report product code.
    I1 Report pre-computed checksum.
    I2 Report OK.
    I3 Report firmware revision, model, and interface type.
    I4 Report response programmed by an OEM.
    I5 Report the country code parameter.
    I6 Report modem data pump model and code revision.
    I7 Reports the DAA code (W-class models only).
    L0 Set low speaker volume.
    L1 Set low speaker volume.
    L2 Set medium speaker volume.
    L3 Set high speaker volume.
    M0 Turn speaker off.
    M1 Turn speaker on during handshaking and turn speaker off while receiving carrier.
    M2 Turn speaker on during handshaking and while receiving carrier.
    M3 Turn speaker off during dialing and receiving carrier and turn speaker on during answering.
    N0 Turn off automode detection.
    N1 Turn on automode detection.
    O0 Go on-line.
    O1 Go on-line and initiate a retrain sequence.
    P Force pulse dialing.
    Q0 Allow result codes to DTE.
    Q1 Inhibit result codes to DTE.
    Sn Select S-Register as default.
    Sn? Return the value of S-Register n.
    =v Set default S-Register to value v.
    ? Return the value of default S-Register.
    T Force DTMF dialing.
    V0 Report short form (terse) result codes.
    V1 Report long form (verbose) result codes.
    W0 Report DTE speed in EC mode.
    W1 Report line speed, EC protocol and DTE speed.
    W2 Report DCE speed in EC mode.
    X0 Report basic call progress result codes, i.e., OK, CONNECT, RING, NO CARRIER (also, for busy, if enabled, and dial tone not detected), NO ANSWER and ERROR.
    X1 Report basic call progress result codes and connections speeds (OK, CONNECT, RING, NO CARRIER (also, for busy, if enabled, and dial tone not detected), NO ANSWER, CONNECT XXXX, and ERROR.
    X2 Report basic call progress result codes and connections speeds, i.e., OK, CONNECT, RING, NO CARRIER (also, for busy, if enabled, and dial tone not detected), NO ANSWER, CONNECT XXXX, and ERROR.
    X3 Report basic call progress result codes and connection rate, i.e., OK, CONNECT, RING, NO CARRIER, NO ANSWER, CONNECT XXXX, BUSY, and ERROR.
    X4 Report all call progress result codes and connection rate, i.e., OK, CONNECT, RING, NO CARRIER, NO ANSWER, CONNECT XXXX, BUSY, NO DIAL TONE and ERROR.
    Y0 Disable long space disconnect before on-hook.
    Y1 Enable long space disconnect before on-hook.
    Z0 Restore stored profile 0 after warm reset.
    Z1 Restore stored profile 1 after warm reset.
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

  3. #3
    Addicted Member
    Join Date
    Sep 2001
    Location
    UK
    Posts
    136

    Thumbs up

    Woa thats alot.
    How do you guys get this advanced?

  4. #4
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    Mostly I pieced it together from Denny's placemats and the backs of sugar packets.


    Greg
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2001
    Posts
    5
    Thanks greg for that realy valuable info, realy my second question is to get all AT Commands
    Amr Aly

  6. #6
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    Got to http://google.com and search on AT Commands and/or hayes modem

    Greg
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width