============================================================================== "HUR MAN K™R WARPENS INTERNET ACCESS KIT MOT ABC-KLUBBEN" och andra sagor av Marcus Better ============================================================================== Hej. H„r „r lite tips till Dig som f”rs”ker f† ig†ng Warpens internetpaket mot ABC-klubben genom TIA. Jag skriver helt enkelt ner hur jag har konfigurerat saker och ting. Det kanske fungerar f”r dig, och kanske inte. F”r tillf„llet fungerar hos mig allt utom att ta emot email med Ultimedia Mail. (Det faller p† inloggningen i mailservern.) ============================================================================== F”rst beh”ver man ett loginscript som sk”ter inloggningen, startar upp TIA och talar om IP-adresserna f”r SLIPPM. Detta script ska ligga i \TCPIP\BIN och heter i detta fall ABCKLUBB.CMD. Det finns i slutet av denna fil. Scriptet kan beh”va modifieras lite s† att det passar din konfiguration. Jag har exv sl„ngt ut menyn i unixen, och anpassat scriptet d„refter. N„r du lagt in scriptet, starta "Dial other internet providers" i mappen "Internet utilities". Det „r detta program som „r SLIPPM. Observera att det finns uppdateringar till detta program p† Cruiser eller IBMs BBS. De nyaste har, till skillnad fr†n den som medf”ljer Warpen, st”d f”r PPP. Det „r denna version som beskrivs h„r. Tryck p† "Add entry". Du f†r upp ett block med inst„llningar som fylls i enligt f”ljande: Sida 1 ------ Inget av nedanst†ende f„lt kommer anv„ndas s†vitt jag vet, s† det spelar ingen roll vad man skriver i dem. Name: ABC Description: ABC-klubben Login ID: m9111 (byt ut mot ditt ID) Password: superhemlig (byt ut mot ditt pw) OBS! En j„ttebugg g”r att Ultimedia Mail l„ser in sitt password fr†n detta f„lt i st„llet f”r det p† sid 3 (s† verkar det iaf). D„rf”r kan man i detta f„lt skriva in sitt password till mailservern, se nedan. (Passwordf„ltet „r annars on”digt.) Eller ocks† kan man manuellt „ndra i inst„llningarna i Ultimedia, men det m†ste isf g”ras varje g†ng man anv„nder programmet. Phone number: Login Sequence: abcklubb.cmd ATDT801523 ATDT806440 9111 superhemlig (byt ut 9111 mot ditt medlemsnummer och superhemlig mot ditt monitor-password) OBS: Ordet "abcklubb.cmd" m†ste skrivas med sm† bokst„ver, annars fattar den inte att det „r ett login-script. Connection type: SLIP Sida 2 ------ MTU Size: 1500 VJ Compression: Nej (TIA klarar inte VJ) Domain Nameserver: 194.52.1.10 Your host name: m9111 Your domain name: se (De tv† sista talar om ditt maskinnamn, det „r nog r„tt s† ov„sentligt.) Sida 3 ------ News Server: news.abc.se Gopher Server: (valfri gopherserver, eller l„mna blankt) WWW Server: http://www.abc.se (valfri startsida) POP Mail Server: mail.abc.se Reply domain: abc.se Replay (mail) ID: m9111 (byt ut mot ditt ID) POP Login ID: m9111 (samma) POP Password: sparcpassword (Detta „r ditt l”senord till sun-milj”n. Det „r inte samma som i monitorn. Du f†r ett l”senord till sparcen genom att skriva till m”tet SYSOPs i MSG och be om ett. Pga en bugg verkar dock inte det l”senord som skrivs in h„r anv„ndas av Ultimedia Mail, se ovan. Jag har dock inte f†tt Ultimedia Mail att ta emot email.) Sida 4 ------ (Eftersom login-scriptet sk”ter ringandet, s† beh”vs endast dessa inst„llningar. St„ll in komm-port och hastighet enligt tycke och smak.) Com Port: Speed: Data Bits: 8 Parity: None Nu kan du f”rs”ka koppla upp. I statusf”nstret ser du vad scriptet h†ller p† med. Om det hakar upp sig n†gonstans, „r det bara att anpassa scriptet efter din konfiguration. Lycka till! Marcus Better ============================================================ ABCKLUBB.CMD ==== /* ABCKLUBB.CMD */ /* Loginscript f”r ABC-klubben med SLIP. */ /* */ /* Fr†n kommandoraden, starta SLIP.EXE med parametern */ /* -connect "abcklubb.cmd */ /* */ /* I SlipPM, ange f”ljande i "Login Script" */ /* abcklubb.cmd */ /* */ /* d„r „r modemstr„ngen som sl†r telefonnummret (t ex "ATDT801523"),*/ /* „r modemstr„ng 2 (f”r alternativt telefonnummer) */ /* „r ditt login-id, och */ /* „r ditt l”senord (vad annars?). */ /* Om n†gon av dessa parametrar ers„tts med "*", kommer scriptet att fr†ga */ /* efter informationen i st„llet. Detta fungerar dock endast n„r scriptet */ /* startas fr†n kommandoraden med SLIP-kommandot. */ /*--------------------------------------------------------------------------*/ parse arg interface , dialcmd1 dialcmd2 username password /*--------------------------------------------------------------------------*/ /* Initialization and Main Script Code */ /*--------------------------------------------------------------------------*/ /* Set some definitions for easier COM strings */ cr='0d'x crlf='0d0a'x say '' say 'ABCKLUBB - Script f”r ABC-Klubben med SLIP ', '(interface' interface')' /* Prompt for missing information */ if dialcmd1 = '' then do call charout , 'Dial Command 1: ' parse pull dialcmd1 end if dialcmd2 = '' then do call charout , 'Dial Command 2: ' parse pull dialcmd2 end if username = '' | username = '*' then do call charout , 'User Name: ' parse pull username end else do say 'User:' username end if password = '' | password = '*' then do call charout , 'Password: ' password = readpass() end /* Flush any stuff left over from previous COM activity */ call flush_receive /* Reset the modem here */ /* You may need to customize this for your modem make and model */ call lineout , 'Reset modem...' call send 'ATZ' || cr call waitfor 'OK', 5 ; call flush_receive 'echo' call send 'ATS7=45S0=0S6=0V1X4MW0&C1&D2%C0' || cr call waitfor 'OK', 5 ; call flush_receive 'echo' if RC = 1 then do call lineout , 'Modem not resetting... Trying again' call send '+++' call waitfor 'OK' call send 'ATHZ' || cr call waitfor 'OK', 3 end /* Dial the remote server */ do until RC=1 dialcmd=dialcmd1 call charout , 'Now Dialing...' call send dialcmd || cr call waitfor 'BUSY', 10 dialcmd1=dialcmd2 dialcmd2=dialcmd end /* Wait for connection */ call waitfor 'CONNECT' ; 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 'RETURN' ; call flush_receive 'echo' call send cr call waitfor 'nummer:' ; call flush_receive 'echo' call send username || cr call waitfor 'ord:' ; call flush_receive 'echo' call send password || cr do until RC=0 call waitfor '>', 10 ; call flush_receive 'echo' call send cr end call send 'us' || cr call send cr unixprompt='(sparc2)~ >' call waitfor unixprompt ; call flush_receive 'echo' call send 'mesg n' || cr call send 'tia' || cr call waitfor 'software.' ; call flush_receive 'echo' annex_address = 192.36.170.12 os2_address = 192.0.2.1 /* /* 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 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 /*--------------------------------------------------------------------------*/ /* readpass () */ /*..........................................................................*/ /* */ /* Routine used to read a password from the user without echoing the */ /* password to the screen. */ /* */ /*--------------------------------------------------------------------------*/ readpass: answer = '' do until key = cr key = slip_getch() if key \= cr then do answer = answer || key end end say '' return answer /*--------------------------------------------------------------------------*/ /* 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 =============================================================================