home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / comm / arazoomv.sit / ZOOMV32.ARA
Text File  |  1992-08-19  |  5KB  |  268 lines

  1. !
  2. ! AppleTalk Remote Access script for all ZOOM Telephonics V.32 modems
  3. !
  4. ! Copyright (C) 1992 ZOOM Telephonics, Inc., all rights reserved.
  5. !
  6. ! Permission is hereby granted to owners of ZOOM-manufactured modems
  7. ! to use this script.
  8. !
  9. ! Various trademarks, etc., are property of their respective owners.
  10. !
  11. @ORIGINATE
  12. dtrset
  13. hsreset 0 1 0 0 0 0
  14. serreset 19200, 0, 8, 1
  15. ifstr 2 3 "1"
  16. write "AT&F&Q6E0M0S95=1\13"
  17. jump 4
  18. !
  19. @label 3
  20. write "AT&F&Q6E0S95=1\13"
  21. !
  22. @label 4
  23. matchclr
  24. matchstr 1 1 "OK"
  25. matchstr 2 2 "ERROR"
  26. matchread 50
  27. note "Modem not responding to init or unexpected response. Check setup."
  28. exit -6019
  29. !
  30. @label 2
  31. note "Modem returned ERROR response to init. Check setup."
  32. exit -6019
  33. !
  34. @label 1
  35. note "Modem successfully initialized at 19200 bps."
  36. !
  37. write "ATDT^1\13"
  38. matchclr
  39. matchstr 1 10 "CONNECT\13"
  40. matchstr 2 11 "CONNECT 1200\13"
  41. matchstr 3 12 "CONNECT 2400"
  42. matchstr 4 13 "BUSY"
  43. matchstr 5 14 "NO DIALTONE"
  44. matchstr 6 15 "NO CARRIER"
  45. matchstr 7 16 "NO ANSWER"
  46. matchstr 8 17 "ERROR"
  47. matchstr 9 51 "CONNECT 4800"
  48. matchstr 10 52 "CONNECT 7200"
  49. matchstr 11 53 "CONNECT 9600"
  50. matchstr 12 54 "CONNECT 12000"
  51. matchstr 13 55 "CONNECT 14400"
  52. matchread 350
  53. note "No response to dial command or unrecognized response."
  54. exit -6019
  55. !
  56. @label 17
  57. note "Modem returned ERROR to dial command. Check dial string."
  58. exit -6019
  59. !
  60. @label 16
  61. note "Modem reports no silent answer for @ function."
  62. exit -6023
  63. !
  64. @label 15
  65. note "Modem reports no carrier timeout; no answer."
  66. exit -6023
  67. !
  68. @label 14
  69. note "Modem reports no dialtone; check line connections."
  70. exit -6020
  71. !
  72. @label 13
  73. note "Modem busy detector tripped."
  74. exit -6022
  75. !
  76. @label 10
  77. communicatingat 300
  78. note "Connected at 300bps raw speed."
  79. pause 30
  80. exit 0
  81. !
  82. @label 11
  83. communicatingat 1200
  84. note "Connected at 1200bps raw speed."
  85. pause 30
  86. exit 0
  87. !
  88. @label 12
  89. communicatingat 2400
  90. note "Connected at 2400bps raw speed."
  91. pause 30
  92. exit 0
  93. !
  94. @label 51
  95. communicatingat 4800
  96. note "Connected at 4800bps raw speed."
  97. pause 30
  98. exit 0
  99. !
  100. @label 52
  101. communicatingat 7200
  102. note "Connected at 7200bps raw speed."
  103. pause 30
  104. exit 0
  105. !
  106. @label 53
  107. communicatingat 9600
  108. note "Connected at 9600bps raw speed."
  109. pause 30
  110. exit 0
  111. !
  112. @label 54
  113. communicatingat 12000
  114. note "Connected at 12000bps raw speed."
  115. pause 30
  116. exit 0
  117. !
  118. @label 55
  119. communicatingat 14400
  120. note "Connected at 14400bps raw speed."
  121. pause 30
  122. exit 0
  123. !
  124. !
  125. @ANSWER
  126. dtrset
  127. hsreset 0 1 0 0 0 0
  128. serreset 19200, 0, 8, 1
  129. ifstr 2 33 "1"
  130. write "AT&F&Q6E0M0S0=1S95=1\13"
  131. jump 34
  132. !
  133. @label 33
  134. write "AT&F&Q6E0S0=1S95=1\13"
  135. !
  136. @label 34
  137. matchclr
  138. matchstr 1 31 "OK"
  139. matchstr 2 32 "ERROR"
  140. matchread 50
  141. note "Modem not responding to answer init or unexpected response. Check setup."
  142. exit -6019
  143. !
  144. @label 32
  145. note "Modem returned ERROR response to answer init. Check setup."
  146. exit -6019
  147. !
  148. @label 31
  149. note "Modem successfully initialized at 19200 bps. Waiting for ring."
  150. !
  151. @label 39
  152. matchclr
  153. matchstr 1 20 "CONNECT\13"
  154. matchstr 2 21 "CONNECT 1200"
  155. matchstr 3 22 "CONNECT 2400"
  156. matchstr 4 25 "NO CARRIER"
  157. matchstr 5 29 "RING"
  158. matchstr 9 61 "CONNECT 4800"
  159. matchstr 10 62 "CONNECT 7200"
  160. matchstr 11 63 "CONNECT 9600"
  161. matchstr 12 64 "CONNECT 12000"
  162. matchstr 13 65 "CONNECT 14400"
  163. matchread 350
  164. jump 39
  165. !
  166. @label 29
  167. userhook 1
  168. note "Line is ringing; should answer in a moment..."
  169. jump 39
  170. !
  171. @label 25
  172. note "Modem reports no carrier timeout."
  173. exit -6023
  174. !
  175. @label 20
  176. communicatingat 300
  177. note "Connected at 300bps raw speed."
  178. exit 0
  179. !
  180. @label 21
  181. communicatingat 1200
  182. note "Connected at 1200bps raw speed."
  183. exit 0
  184. !
  185. @label 22
  186. communicatingat 2400
  187. note "Connected at 2400bps raw speed."
  188. exit 0
  189. !
  190. @label 61
  191. communicatingat 4800
  192. note "Connected at 4800bps raw speed."
  193. exit 0
  194. !
  195. @label 62
  196. communicatingat 7200
  197. note "Connected at 7200bps raw speed."
  198. exit 0
  199. !
  200. @label 63
  201. communicatingat 9600
  202. note "Connected at 9600bps raw speed."
  203. exit 0
  204. !
  205. @label 64
  206. communicatingat 12000
  207. note "Connected at 12000bps raw speed."
  208. exit 0
  209. !
  210. @label 65
  211. communicatingat 14400
  212. note "Connected at 14400bps raw speed."
  213. exit 0
  214. !
  215. !
  216. ! Remaining portion Copyright (C) 1992 Apple Computer Corp.
  217. !
  218. @HANGUP
  219. @LABEL 80
  220. settries 0
  221. @LABEL 81
  222. write "ATH0\13"
  223. matchclr
  224. matchstr 1 84 "OK\13\10"
  225. matchstr 2 83 "NO CARRIER\13\10"
  226. matchstr 3 84 "ERROR\13\10"
  227. matchread 15
  228. inctries
  229. iftries 3 84
  230. ! no response, try escape sequence
  231. write "+++"
  232. matchclr
  233. matchstr 1 82 "OK\13\10"
  234. matchread 18
  235. ! No response from modem, toggle DTR
  236. !
  237. DTRClear
  238. pause 10
  239. DTRSet
  240. jump 81
  241. !
  242. @LABEL 82
  243. matchclr
  244. matchstr 1 84 "OK\13\10"
  245. matchstr 2 83 "NO CARRIER\13\10"
  246. write "ATH0\13"
  247. matchread 50
  248. jump 61
  249. !
  250. @LABEL 83
  251. pause 45
  252. flush
  253. !
  254. ! Recall the factory settings
  255. !
  256. @LABEL 84
  257. matchclr
  258. matchstr 1 85 "OK\13\10"
  259. write "AT&F\13"
  260. matchread 30
  261. !
  262. @LABEL 85
  263. matchstr 1 86 "OK\13\10"
  264. write "ATS0=0\13"
  265. matchread 30
  266. !
  267. @LABEL 86
  268. exit 0