home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / os2 / misc / 30050 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  3.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!gatech!news.ans.net!ans.net!db3l
  2. From: db3l@ans.net (David Bolen)
  3. Newsgroups: comp.os.os2.misc
  4. Subject: Re: Application to open serial connection and leave it open
  5. Message-ID: <1992Sep14.173941.16324@ans.net>
  6. Date: 14 Sep 92 13:43:06 GMT
  7. References: <ant.716450715@brolga>
  8. Sender: news@ans.net (News Administrator)
  9. Organization: Advanced Network & Services, Inc. - Elmsford, NY
  10. Lines: 65
  11. In-Reply-To: ant@brolga.cc.uq.oz.au's message of Mon, 14 Sep 1992 06: 05:15 GMT
  12.  
  13. In article <ant.716450715@brolga> ant@brolga.cc.uq.oz.au (Anthony Murdoch) writes:
  14.  
  15. >I was wondering if anyone had a method of making a modem connection to a
  16. >service and then leave it open after it exited (ie not dropping DTR).  My
  17. >reason for asking is to allow IBM's TCP/IP's SLIP to work with the SLIP
  18. >Terminal Server at my site.
  19. >
  20. >I need to be able to make the connection, log into the service, disconnect
  21. >from the comms application and then run the SLIP command to make the slip
  22. >connection.  Unfortunately IBM's TCP/IP doesn't have any provision for
  23. >this (at least not that I can see).
  24.  
  25. You are correct - IBM's setup doesn't provide for this right now.  
  26.  
  27. Ideally, the program responsible for dialing up and establishing the SLIP
  28. link could pause the SLIP driver while it accessed the COM port (ala SLIPCALL),
  29. but the current SLIP driver uses a semaphore mechanism that isn't too
  30. reliable (it's gotten worse in recent releases), so it's often safer to just
  31. establish the connection without involving the SLIP driver at all.
  32.  
  33. However, the SLIP driver opens the COM port in shared mode, so you can have
  34. another program running that is keeping the COM open and it won't affect SLIP,
  35. or you can start SLIP later in the connection process than you might think.
  36.  
  37. For example, you could set up three processes:
  38.  
  39. * A COM Hold process - does nothing other than do a shared open on the
  40.   appropriate COM port, and sit around until you exit it.  As long as this
  41.   is running, OS/2 won't "hang up" the port.
  42. * A simple terminal program that also opens the COM port in shared mode.
  43.   This allows you to talk to the modem - dial - log in, etc..
  44. * The SLIP driver.
  45.  
  46. And you would do the following:
  47.  
  48. 1. Run COMHOLD - leave running.
  49. 2. Start terminal program - log in as appropriate and establish SLIP setup.
  50. 3. Exit terminal program.
  51. 4. Start SLIP driver.
  52. 5. Exit COMHOLD
  53.  
  54. It's somewhat manual, but it definitely works, and really isn't that bad.
  55.  
  56. The actual processes are very simple - if you can compile your own stuff,
  57. the only real important thing is that whenever the COM port is opened, it
  58. should be in shareable mode, as in:
  59.  
  60.     DosOpen("com1",&com_handle,&action,0,0,FILE_OPEN,
  61.                 OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE,NULL);
  62.  
  63.  
  64. I think I've got stuff like this lying around somewhere (although the terminal
  65. part is all manual - no automatic login scripts or anything) from when I
  66. needed it, so if you don't have facilities to compile anything, drop me a
  67. note.  I need to rebuild it to remove some internal numbers, but that's no big
  68. deal.
  69.  
  70. --
  71. -- David
  72. --
  73. /-----------------------------------------------------------------------\
  74.  \              David Bolen             \  Internet: db3l@ans.net      /
  75.   |   Advanced Network & Services, Inc.   \   Phone: (914) 789-5327   |
  76.  / 100 Clearbrook Road, Elmsford, NY 10523  \   Fax: (914) 789-5310    \
  77. \-----------------------------------------------------------------------/
  78.