home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / AT2-14A.ZIP / IBM7855A.CMD < prev   
OS/2 REXX Batch file  |  1992-08-24  |  2KB  |  49 lines

  1. @echo off
  2. @rem
  3. @rem  IBM7855A.CMD by Rob Hamerling (see AT2.DOC file).
  4. @echo Customise IBM 7855-010 modem for ASYNC (but leave it in SYNC mode)
  5. @echo Modem must have been set in AT-commandset mode from the frontpanel!
  6. @rem
  7. @rem Change below AT2 into AT3 if you are using the OS/2 2.0 version of AT2
  8. @rem and change portnumber into the appropriate value (2 for COM2 etc).
  9. @rem Change phone number as desired.
  10.  
  11. @setlocal
  12. set ATX=AT2
  13. set port=1
  14. set speed=19200
  15. set phone=030-331888
  16.  
  17. @echo Modem is supposed to be on COM%port%:
  18.  
  19. @rem First see if the modem responds:
  20. %ATX%  %port%  %speed%  Z
  21. if errorlevel   1 @goto problem
  22.  
  23. @rem Then reset the modem to the factory settings:
  24. %ATX%  %port%  ^&F1
  25.  
  26. @rem Now transmit the customisation commands:
  27. %ATX% %port% B0 E0 L1 M0 Q0 V1 X4 S0=0
  28. %ATX% %port% ^&AP8 ^&AL8 ^&B8N1 ^&C1 ^&D2 ^&I0 ^&L0 ^&M2 ^&R0 ^&S2 ^&X0 ^&Y0
  29. %ATX% %port% \A3 \C0 \G0 \K2 \M14 \N3 \Q2 \R2 \T0 \V1 \X0
  30. %ATX% %port% %%B0 %%C1 %%D0 %%E1 %%F1 %%G1 %%H1 %%I1 %%O1 %%R1 %%V0
  31.  
  32. @rem Time to store current configuration to both(!) NVM profiles
  33. %ATX%  %port%  ^&W0 ^&W1
  34.  
  35. @rem Finally set the phone number to be auto-dialed in SYNC-mode.
  36. %ATX%  %port%  ^&Z%phone%
  37.  
  38. goto exit
  39.  
  40. :problem
  41. if errorlevel 255 @echo [rc=255] Is IBM 7855 modem connected to COM%port%?
  42. if errorlevel 255 @goto exit
  43. if errorlevel   1 @echo %ATX% has prematurely ended,
  44. if errorlevel   1 @echo . . functionname and returncode indicate type of error.
  45. if errorlevel   1 @goto exit
  46.  
  47. :exit
  48. @endlocal
  49.