home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1998 July / dpcb0798.bin / Internet / Demon / TURNPIKE.1 / UNIVERSE.MDM < prev    next >
Text File  |  1997-06-20  |  9KB  |  321 lines

  1. ;==caXmPMO7RRCh0zV4Bfh0ng== UNIVERSE.MDM 20 Jun 1997 14:16:24
  2. IDENT   Universal modem script
  3. ;
  4. ; We advise you NOT to edit this file.
  5. ;
  6. ; Should you wish to alter the way in which your modem is driven then
  7. ; you should in the first instance use a specific modem driver file.
  8. ; Instructions for selecting a new modem file can be found in the Help
  9. ; for the Connect program.
  10. ;
  11. ; If no specific file is available then you can use a "generic" modem
  12. ; driver file - again the Help will guide you in your choice.
  13. ;
  14. ; If you wish to customize the modem driving still further then you
  15. ; may edit one of the specific or generic files. You will find that
  16. ; they contain considerable information to guide you.
  17. ;
  18. ; Editing this file is unnecessarily complex and may prevent you using
  19. ; it in the future with other modems. Please follow our advice!
  20. ;
  21. SET COMSPEED=57600
  22. ;
  23. ; INITIALISE
  24. ;
  25.    RESET 1
  26.    WAIT 2
  27.    ;
  28.    ; See if the modem is there at all
  29.    ;
  30.    SEND 'AT\r'
  31.    ;
  32.    SELECT 3 'Modem not responding'
  33.       CASE 'OK'
  34.          TEXT 'Modem is responding...'
  35.    ENDSELECT
  36.    ;
  37.    SHOW OFF
  38.    ;
  39.    ; Try to deal specially with any Multitech modem
  40.    ;
  41.    ; First say use factory defaults and then set to factory defaults
  42.    ;
  43.    SEND 'AT&F8&F\r'
  44.    SELECT 3 'Modem not responding'
  45.       CASE 'OK'
  46.          ; Try to make the Multitech specific settings
  47.          SEND 'ATQ0X4&E4&E13&C1&D3%E0S0=0&Q0\r'
  48.          SELECT 3 'Modem not responding'
  49.             CASE 'OK'
  50.                NOTE 'Multitech modem recognised and initialised'
  51.                JUMP INITDONE
  52.             CASE 'ERROR'
  53.                NOTE 'Probably not a Multitech'
  54.          ENDSELECT
  55.       CASE 'ERROR'
  56.          NOTE 'Probably not a Multitech'
  57.    ENDSELECT
  58.    ;
  59.    ; Set factory defaults,
  60.    ; use factory profile 1 for hardware flow control, if available
  61.    ; otherwise use profile 0
  62.    ;
  63.    SEND 'AT&F1\r'
  64.    SELECT 3 'Modem not responding'
  65.       CASE 'OK'
  66.          ; Profile 1 accepted, make sure that it is a USR or clone
  67.          SEND 'AT&B1&H1&K2&M4&R2\r'
  68.          SELECT 3 'Modem not responding'
  69.             CASE 'OK'
  70.                NOTE 'Factory profile 1 loaded for USR hardware flow control'
  71.             CASE 'ERROR'
  72.                SEND 'AT&F\r'
  73.                SELECT 3 'Modem not responding'
  74.                   CASE 'OK'
  75.                      NOTE 'Factory profile 0 loaded'
  76.                   CASE 'ERROR'
  77.                      NOTE 'Cannot set factory profile'
  78.                      FAIL
  79.                ENDSELECT
  80.          ENDSELECT
  81.       CASE 'ERROR'
  82.          SEND 'AT&F\r'
  83.          SELECT 3 'Modem not responding'
  84.             CASE 'OK'
  85.                NOTE 'Factory profile 0 loaded'
  86.             CASE 'ERROR'
  87.                NOTE 'Cannot set factory profile'
  88.                FAIL
  89.          ENDSELECT
  90.    ENDSELECT
  91.    ;
  92.    ; Try to get DCD to show state of carrier
  93.    ;
  94.    SEND 'AT&C1\r'
  95.    SELECT 3 'Modem not responding'
  96.       CASE 'OK'
  97.          NOTE 'DCD will reflect state of carrier'
  98.       CASE 'ERROR'
  99.          NOTE 'DCD might not reflect the state of carrier'
  100.          NOTE 'Connect may not be able to recognise if the line drops'
  101.    ENDSELECT
  102.    ;
  103.    ; Try to get modem to hangup when DTR is toggled
  104.    ; if possible reset as well when DTR toggled
  105.    ;
  106.    SEND 'AT&D3\r'
  107.    SELECT 3 'Modem not responding'
  108.       CASE 'OK'
  109.          NOTE 'DTR will make modem reset'
  110.       CASE 'ERROR'
  111.          SEND 'AT&D2\r'
  112.          SELECT 3 'Modem not responding'
  113.             CASE 'OK'
  114.                NOTE 'DTR will make modem hang up'
  115.             CASE 'ERROR'
  116.                NOTE 'Modem might not hang up if +++ escape is not recognised'
  117.          ENDSELECT
  118.    ENDSELECT
  119.    ;
  120.    ; Try to prevent modem answering incoming calls
  121.    ;
  122.    SEND 'ATS0=0\r'
  123.    SELECT 3 'Modem not responding'
  124.       CASE 'OK'
  125.          NOTE 'Auto-answer disabled'
  126.       CASE 'ERROR'
  127.          NOTE 'Modem might answer before dialing or after hangup'
  128.    ENDSELECT
  129.    ;
  130.    ; Check for special modems by their ATI response
  131.    ;
  132.    SEND 'ATI3\r'
  133.    SELECT 3 'Modem not responding'
  134.       CASE ' 68356 '
  135.          ; Try to make the Motorola 68345 specific settings
  136.          SEND 'ATY0&R0\\V4\r'
  137.          SELECT 3 'Modem not responding'
  138.             CASE 'OK'
  139.                NOTE 'Motorola 68356 based modem recognised and initialised'
  140.                JUMP INITDONE
  141.             CASE ERROR
  142.                NOTE 'Probably not a Motorola 3400'
  143.          ENDSELECT
  144.       CASE 'ERROR'
  145.          SEND 'ATI2\r'
  146.          SELECT 3 'Modem not responding'
  147.             CASE ' GSM:DP'
  148.                ; Try to make Nokia data card specific settings
  149.                SEND 'ATS34=2\r'
  150.                SELECT 3 'Modem not responding'
  151.                   CASE 'OK'
  152.                      NOTE 'Nokia data card modem recognised and initialised'
  153.                      JUMP INITDONE
  154.                CASE ERROR
  155.                   NOTE 'Probably not a Nokia'
  156.             ENDSELECT
  157.          CASE 'OK'
  158.          CASE 'ERROR'
  159.          ENDSELECT
  160.       CASE 'OK'
  161.          SEND 'ATI4\r'
  162.          SELECT 3 'Modem not responding'
  163.             CASE 'UMC '
  164.                ; UMC V.32bis/FAX/VOICE has W1 set, must avoid setting S95
  165.                NOTE 'UMC based modem recognised and initialised'
  166.                JUMP INITDONE
  167.             CASE 'OK'
  168.             CASE 'ERROR'
  169.          ENDSELECT
  170.    ENDSELECT
  171.    ;
  172.    ; Try to make modem show extended CONNECT responses
  173.    ;
  174.    ; First use the older Rockwell like method
  175.    ;
  176.    SEND 'ATS95=46\r'
  177.    SELECT 3 'Modem not responding'
  178.       CASE 'OK'
  179.          NOTE 'Extended responses enabled'
  180.       CASE 'ERROR'
  181.          NOTE 'Probably not a Rockwell modem'
  182.    ENDSELECT
  183.    ;
  184.    ; Now use the AT&T HMS like method
  185.    ;
  186.    SEND 'ATW1\r'
  187.    SELECT 3 'Modem not responding'
  188.       CASE 'OK'
  189.          NOTE 'Extended responses enabled'
  190.       CASE 'ERROR'
  191.          NOTE 'Probably not an AT&T HMS modem'
  192.    ENDSELECT
  193.    ;
  194.    ; Now use the newer Rockwell like method
  195.    ;
  196.    SEND 'AT\\V1\r'
  197.    SELECT 3 'Modem not responding'
  198.       CASE 'OK'
  199.          NOTE 'Extended responses enabled'
  200.       CASE 'ERROR'
  201.          NOTE 'Probably not a newer Rockwell modem'
  202.    ENDSELECT
  203.    ;
  204.    ; If all three of the above fail ERROR
  205.    ; then the modem might only show basic CONNECT response
  206.    ;
  207.    ; Deal specially with the BT Ignition or Motorola BitSurfr ISDN TA
  208.    ;
  209.    SEND 'AT%A2=95\r'
  210.    SELECT 3 'Modem not responding'
  211.       CASE 'OK'
  212.          NOTE 'Async-to-sync PPP selected'
  213.       CASE 'ERROR'
  214.          NOTE 'Probably not a BT Ignition'
  215.    ENDSELECT
  216.    ;
  217.    ENDJUMP INITDONE
  218.    ;
  219.    SHOW ON
  220.    ;
  221.    TEXT 'Ready to dial...'
  222. ;
  223. PULSE
  224.    TEXT 'Pulse...'
  225.    WAIT 1
  226.    SEND "ATDP%pabx%"
  227.    ;
  228.    ; Sent:
  229.    ;  DP     - Pulse dial
  230.    ;
  231.    WAIT 1 "%pabx%"
  232.    SHOW OFF
  233.    SEND "%carrier%"
  234.    WAIT 1 "%carrier%"
  235.    SHOW ON
  236.    SEND "%phone%\r"
  237.    WAIT 1 "%phone%\r"
  238.    REPORT ON
  239.    SELECT 60 'Failed to connect'
  240.       CASE 'CONNECT'
  241.          NOTE 'Connected successfully'
  242.       CASE 'BUSY'
  243.          NOCHARGE
  244.          NOTE 'Remote modem is giving a busy signal'
  245.          FAIL
  246.       CASE 'NO ANSWER'
  247.          NOCHARGE
  248.          NOTE 'Remote modem was ringing but did not answer the call'
  249.          FAIL
  250.       CASE 'NO CARRIER'
  251.          NOTE 'Failed to connect'
  252.          FAIL
  253.       CASE 'NO DIALTONE'
  254.          NOCHARGE
  255.          TEXT 'No dial tone, so cannot dial'
  256.          FAIL
  257.       CASE 'NO DIAL TONE'
  258.          NOCHARGE
  259.          TEXT 'No dial tone, so cannot dial'
  260.          FAIL
  261.    ENDSELECT
  262. ;
  263. TONE
  264.    TEXT 'Tone...'
  265.    WAIT 1
  266.    SEND "ATDT%pabx%"
  267.    ;
  268.    ; Sent:
  269.    ;  DT     - Touch-Tone dial
  270.    ;
  271.    WAIT 1 "%pabx%"
  272.    SHOW OFF
  273.    SEND "%carrier%"
  274.    WAIT 1 "%carrier%"
  275.    SHOW ON
  276.    SEND "%phone%\r"
  277.    WAIT 1 "%phone%\r"
  278.    REPORT ON
  279.    SELECT 60 'Failed to connect'
  280.       CASE 'CONNECT'
  281.          NOTE 'Connected successfully'
  282.       CASE 'BUSY'
  283.          NOCHARGE
  284.          NOTE 'Remote modem is giving a busy signal'
  285.          FAIL
  286.       CASE 'NO ANSWER'
  287.          NOCHARGE
  288.          NOTE 'Remote modem was ringing but did not answer the call'
  289.          FAIL
  290.       CASE 'NO CARRIER'
  291.          NOTE 'Failed to connect'
  292.          FAIL
  293.       CASE 'NO DIALTONE'
  294.          NOCHARGE
  295.          TEXT 'No dial tone, so cannot dial'
  296.          FAIL
  297.       CASE 'NO DIAL TONE'
  298.          NOCHARGE
  299.          TEXT 'No dial tone, so cannot dial'
  300.          FAIL
  301.    ENDSELECT
  302. ;
  303. HANGUP
  304.    TEXT 'Hanging up the phone...'
  305.    WAIT 2
  306.    SEND '+++'
  307.    ;
  308.    ; Sent:
  309.    ;  +++    - Return to command mode
  310.    ;
  311.    WAIT 2
  312.    SEND 'ATH\r'
  313.    ;
  314.    ; Sent:
  315.    ;  H      - Hang up (go on hook)
  316.    ;
  317.    WAIT 1
  318.    RESET 1
  319. ;
  320. ; ** ends
  321.