SETTING UP WINDIS WITH TRUMPET WINSOCK ====================================== Trumpet Winsock is one of the most popular Winsock implementations. Windis has some features to make running Windis with Trumpet more easy when using a dialup line. Firstly, you should use SLIP, not PPP. Make sure your setup specifies internal SLIP and not internal PPP. There appear to be some bugs in the PPP implementation which cause Windis to behave oddly especially when the PPP dial script fails. Of course, this could be a bug in Windis but it doesn't happen with any other Winsock implementation. In the Windis Preferences menu, setup Windis to do nothing on startup. You should also set Winsock to Automatically Login in and Logout on Demand. This is in the Dialer|Options menu item. Now copy the following script into your Winsock directory and call it "login.cmd". # begin script # trace on # initialize modem # setup our modem commands display "Loading setup strings"\n $Dialer = "Dialer" $Filename = "windis.ini" %ok = [load $DialString1 $Dialer $Filename] %ok = [load $DialString2 $Dialer $Filename] %ok = [load $DialString3 $Dialer $Filename] %ok = [load $DialString4 $Dialer $Filename] %ok = [load $DialString5 $Dialer $Filename] %ok = [load $DialString6 $Dialer $Filename] %ok = [load %DialInt1 $Dialer $Filename] %ok = [load %DialInt2 $Dialer $Filename] %ok = [load %DialInt3 $Dialer $Filename] display "Dialing "$DialString1\n $number = $DialString2 $modemset = $DialString3 %maxattempts = %DialInt1 set dtr off sleep 1 set dtr on output "atz"$modemset\13 if ! [input 10 OK\n] display "Modem is not responding"\n abort end %attempts = 0 repeat %attempts = %attempts + 1 # set dtr off # sleep 1 # set dtr on outputecho 10 "atdt"$number%attempts\13 %test = [read 40 $result] ############################################################## # I put the following test in because my modem outputs a cr/lf # before the status message would would otherwise get lost and # the rest of the script would then get out of sync. It may not # be neccessary for your modem. ############################################################## if $result ="" %test = [read 40 $result] end display "$result is .. "$result\n until $result = "CARRIER 14400" | %attempts = %maxattempts ############################################################## # test to see what modem responds with first and change # "CARRIER 14440" if necessary. ############################################################## wait 30 dcd if %attempts<%maxattempts input 30 ogin: output \r input 30 sword: output \r input 30 otocol: output SLIP\r input 50 HELLO display \n"Connected..." else display "Number of attempts exceeded, aborting"\n set dtr off sleep 1 set dtr on output "ath"\r input 10 "OK" abort end # end script Make sure you change and to the right things for your host. What this does is load a set of strings from the windis ini file. These strings can be setup in windis by going to the setup screen and choosing "Dialer". There are a maximum of six strings and three integers (numbers) which can be passed from Windis into this login script. My strings look like this. DialString1 = "Calling London" DialString2 = "01813434848" DialString3 = "0" DialInt1 = 20 So what I have is the first string as a message to be printed, the second as the telephone number and the last is my modem setup string. Don't type in the quotes. It is very important to enter the right values for your setup. DialInt1 is the number of retries that the dialer script should do. Note that this is one of these clever scripts which appends a number to the phone number to get around redial limits and blacklists in a modem. The "bye.cmd" script should just be the usual #begin script sleep 1 output +++ sleep 1 input 10 OK\n output ath0\r input 10 OK\n #end script Ok, now you can give it a try. Start up Windis. It should appear and just sit there. Now click on the Listener Icon (or the "ear" in the button bar or the menu item Kick|SMTP Server). TCPMAN should appear and start to dial. Maximise TCPMAN and check that the sequence of commands is what you expect. Once the SLIP is established, the little headphone icon should appear in the listener box and you can then kick mail and news manually. If this appears to work correctly a couple of times, you can set Windis to automatically kick the smtp listener on startup. The best choice is the "Start SMTP Listening and then when listening is established, kick everything" option (found in the Preferences dialog). Set this option and then exit windis. Trumpet should exit after a short while if you've got the inactivity timeout set on Trumpet. Now restart windis. Trumpet should kick automatically and log you in. Once the connection is set up, news and mail will get kicked automatically. Finally, if you like me dial in to different places depending on your location, you can use the different setup sets feature of Windis to make this quite slick. I dial in from home and from work. I live in Cambridge so I use the Cambridge POP. I have a setup set called "Cambridge" which has (as the dialer strings) DialString1 = "Calling Cambridge from Home" DialString2 = "576010" DialString3 = "0" DialInt1 = 10 and one called "Default" which has the dialer strings as DialString1 = "Calling London from Work" DialString2 = "01813434848" DialString3 = "0" DialInt1 = 20 I have two program manager icons for windis. One where the command line is "c:\demon\windis.exe Cambridge" and one where it's "c:\demon\windis.exe Default". This makes it easy for me to just click on the icon I want depending on whether my portable is connecting from London or Cambridge Remember, if you use separate setup sets, if you don't start windis first then trumpet will use what ever the **last** setup set used was.