TIP: Click on subject to list as thread! ANSI
echo: os2_z3
to: Peter Cummins
from: Manfred Strohmaier
date: 1996-11-06 08:30:04
subject: Internet access under OS2 - Help pl

Peter Cummins wrote in a message to All:
 On the Topic Internet access under OS2 - Help please:
 Dated 21:24 04 Nov 1996:

PC> Hi to all,

G'day Peter,

PC> Now for the problem. I can connect, "slip", username then password.
PC> It tells me what my IP address is (whatever that means), then tells
PC> me that I have a SLIP connection and to press "CTRL C" or "CTRL
PC> Break" to exit, BUT when I try to use the browser it locks the
PC> computer for about 8 seconds then tells me that "Explore has stopped
PC> responding to system requests" and so I kill it. If on the other
PC> hand I go for Gopher then after about 20-30 seconds it says that it
PC> can't find the address and that it got no data back.

PC> What am I doing wrong here?

Hitting CTRL C or CTRL Break has probably disconnected you from your
ISP. So when you start Explorer or Gopher they try and find a address
which no exists as you are no longer connected. So these programs then
stop.

PC> Please help! I've now got the bug and can't exercise it :)

I seem to remember OZ_Email providing a log on script with a *.cmd
extension. I'll have a quick scan of ny HDD's to see if it still exsists
here.

OK found it, I named it ozemail.cmd and ran it from "Dial Another
Internet Provider program.

Here is the script. You will have to set up you password etc. Also setup
the server address fields in "Dial Another Internet Privider", and call
the ozemail.cmd from there.


/*--------------------------------------------------------------------------*/
/*                                                                          */
/*            Internet Access Kit Driver for IBM TCP/IP                     */
/*                                                                          */
/*                              OZEMAIL.CMD                                 */
/*                                                                          */
/*            ..................................................            */
/*                                                                          */
/* Sample attachment script for dialing into a Xylogics Annex terminal      */
/* server in order to establish a SLIP connection.  This script should be   */
/* specified on page 1 in the Login Script field for connections via SlipPM */
/* or using the -connect option if executing slip directly.                 */
/* The script file should be placed in TCPIP/BIN Directory.                 */
/*                                                                          */
/* For example, the following might be specified in the                     */
/*              Login Script: ozemail.cmd                                   */
/*                                                                          */
/* When the script runs, it is automatically passed the interface name for  */
/* the interface it is running on as the first argument, followed by any    */
/* user-specified arguments.  This sample script does not require or use    */
/* any other arguments.                                                     */
/*                                                                          */
/* The script first initialises the modem, then sends the dial string to    */
/* call the Service Provider.  It then issues the SLIP command to start     */
/* slip, logs into the terminal server using the username and password,     */
/* and parses the resulting output to determine the appropriate addresses   */
/* to use.  Lastly, it issues ifconfig and route commands to configure      */
/* the OS/2 system appropriately.  Note that the configuration assumes a    */
/* class C netmask for the SLIP interface.                                  */
/*                                                                          */
/*--------------------------------------------------------------------------*/

parse arg interface ,

/*--------------------------------------------------------------------------*/
/*                   Initialization and Main Script Code                    */
/*--------------------------------------------------------------------------*/

/* Set some definitions for easier COM strings */
cr='0d'x
crlf='0d0a'x
username   = '??????'                    /* specify your User ID          */
password   = '????'                      /* specify your password         */
/*modemsetup = 'AT&FB15&D2&E2&K3&E1%C0\V8'*/ /* Modem
initialization commands */
modemsetup = 'ATZ^M~~~AT&F&C1&D2%E2 S295=45 ^M' /* Modem
initialization commands */
dialcmd    = 'ATDT,????????'               /* Service Provider Phone Number */
say ''
say 'OzEmail SLIP Connection Script ',
    '(interface' interface') for user 'username

/* Flush any stuff left over from previous COM activity */
call flush_receive

/* Initialise Modem */
call charout , 'Initialise Modem...'
say ''
call send modemsetup || cr /* Modem initialization commands */
call waitfor 'OK' ; call waitfor crlf ; call flush_receive 'echo'

/* Dial the remote server */
call charout , 'Now Dialing...'

/* Wait for connection */
call send dialcmd || cr
call waitfor 'Welcome to OzEmail' ; call waitfor crlf ;

/* Handle login.  We wait for standard strings, and then flush anything */
/* else to take care of trailing spaces, etc..                          */
call send cr
call waitfor 'Service?' ; call flush_receive 'echo'
call send 'slip' || cr
call waitfor 'Username:' ; call flush_receive 'echo'
call send username || cr
call waitfor 'Password:' ; call flush_receive 'echo'
call send password || cr

/* Parse the results of the SLIP command to determine our address. */
/* We use the "waitfor_buffer" variable from the waitfor routine   */
/* to parse the stuff we get from the Annex after waiting for an   */
/* appropriate point in the data stream.                           */
call waitfor 'Your address is'
parse var waitfor_buffer . 'Annex address is' a '.' b '.' c '.' d '.' .
annex_address = a||'.'||b||'.'||c||'.'||d

/* Now parse the remainder for our address */

call waitfor crlf
parse var waitfor_buffer a '.' b '.' c '.' d '.' .
os2_address = a||'.'||b||'.'||c||'.'||d

/* Flush anything else */
call flush_receive 'echo'

/* Now configure this host for the appropriate address, */
/* and for a default route through the Annex.           */

say 'SLIP Connection Established'
say 'Configuring local address =' os2_address ', Annex =' annex_address

'ifconfig sl0' os2_address annex_address 'netmask 255.255.255.0'
'route add default' annex_address '1'

/* All done */
exit 0


/*--------------------------------------------------------------------------*/
/*                            send ( sendstring)                            */
/*..........................................................................*/
/*                                                                          */
/* Routine to send a character string off to the modem.                     */
/*                                                                          */
/*--------------------------------------------------------------------------*/

send:

   parse arg sendstring
   call slip_com_output interface , sendstring

   return


/*--------------------------------------------------------------------------*/
/*                    waitfor ( waitstring , [timeout] )                    */
/*..........................................................................*/
/*                                                                          */
/* Waits for the supplied string to show up in the COM input.  All input    */
/* from the time this function is called until the string shows up in the   */
/* input is accumulated in the "waitfor_buffer" variable.        
          */
/*                                                                          */
/* If timeout is specified, it says how long to wait if data stops showing  */
/* up on the COM port (in seconds).
*/
/*                                                                          */
/*--------------------------------------------------------------------------*/

waitfor:

   parse arg waitstring , timeout

   if timeout = '' then
     timeout = 5000    /* L O N G   delay if not specified */
   waitfor_buffer = '' ; done = -1; curpos = 1
   ORI_TIME=TIME('E')

   if (remain_buffer = 'REMAIN_BUFFER') then do
      remain_buffer = ''
   end

   do while (done = -1)
      if (remain_buffer \= '') then do
         line = remain_buffer
         remain_buffer = ''
       end
       else do
         line = slip_com_input(interface,,10)
      end
      waitfor_buffer = waitfor_buffer || line
      index = pos(waitstring,waitfor_buffer)
      if (index > 0) then do
         remain_buffer = substr(waitfor_buffer,index+length(waitstring))
         waitfor_buffer = delstr(waitfor_buffer,index+length(waitstring))
         done = 0
      end
      call charout , substr(waitfor_buffer,curpos)
      curpos = length(waitfor_buffer)+1
      if ((done \= 0) & (TIME('E')>timeout)) then do
        call lineout , ' WAITFOR: timed out '
        done = 1
       end
   end
   timeout=0
   RC=done
 return RC

/*--------------------------------------------------------------------------*/
/*                             flush_receive ()                             */
/*..........................................................................*/
/*                                                                          */
/* Routine to flush any pending characters to be read from the COM port.    */
/* Reads everything it can until nothing new shows up for 100ms, at which   */
/* point it returns.                                                        */
/*                                                                          */
/* The optional echo argument, if 1, says to echo flushed information.      */
/*                                                                          */
/*--------------------------------------------------------------------------*/

flush_receive:

   parse arg echo

   /* If echoing the flush - take care of waitfor remaining buffer */
   if (echo \= '') & (length(remain_buffer) > 0) then do
      call charout , remain_buffer
      remain_buffer = ''
   end

   /* Eat anything left in the modem or COM buffers */
   /* Stop when nothing new appears for 100ms.      */

   do until line = ''
     line = slip_com_input(interface,,100)
     if echo \= '' then
        call charout , line
   end

   return
/************* End of OZEMAIL.CMD *****************/

PC> ___ FleetStreet 1.14 NR
PC>  - Origin: The Northern Extreme. Cairns FNQ (3:640/531.19)

Cheers, ... Manfred...
--- timEd/2 1.10+

* Origin: Manfred's Point System (3:800/846.7)
SEEN-BY: 50/99 620/243 623/630 625/160 711/409 410 430 808 809 934 955
SEEN-BY: 712/515 713/317 714/906 800/1 2 409 419 442 447 448 451 455 456 805
SEEN-BY: 800/806 810 812 843 846 850/100
@PATH: 800/846 1 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.