Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: pComOpen pComControl pWaitfor
I support all the "road warriors" at my company and have done so for years. I live and breathe modems, serial communications and telephone lines. If I was my own customer, I'd suspect a dirty telephone circuit or a bad modem, but when I run any other modem application such as, HyperTerminal, Dialup Networking, Procomm, etc. everything works fine. I've got an analog line pulled into my office here - one of the most modern facilities in the area - and I've used it perfectly for years. My modem is new as of about 3 months (Megahertz XJ-CC4288 flash upgraded to a 33.6), and I also use a USR 56K modem I'm evaluating. All new, super clean, modern stuff.
However I don't doubt noise on the line. That just comes with the territory of modem communications. It happens every time we dial up, but the other applications seem to be able to deal with the problems better... somehow...
It seems I have one of two problems...
Here's a snippet of my code:
pcomopen("COM3","0","57600","7E1","RTSRTS") pmodemcommand("5999986","ATZ") pmodeminit("5999986") pmodemdial("5999986","1","9w214-720-9183") pmodemconnect("5999986") ;Here I get:[ ***** RECEIVE PARITY ERROR ***** ] pputline("5999986","") pputline("5999986","") pwaitfor("5999986","Host Name:","+","0","10000")Puzzled, and waiting for your reply.
Compuserve around here leastways uses 7E1 which is 7 data bits and 1 parity bit (set to Even). I would use the same settings that your other programs that reference CIS use.
PPP Dialup networking etc, send checksummed packets of data so they can recover from errors.
I'm not real sure why the noise is there. it seems to be so close to almost working. I notice that the FRAMING ERRORS message has gone away (from a previous message) -- seeming replaced by the parity error message.
pCaptureLog("Begin timeout of 2 minutes") TOStart=Timedate() pCaptureLog(TOStart) timeouttest=120000 RetCode = pWaitFor(port,"Texas","+",0,timeouttest) ;timeout is 2 minutes! TOEnd=Timedate() pCaptureLog(TOEnd) If RetCode == 0 Then goto AbortI've tried specifying a timeout value of 120000, "120000", and then using a variable like above (as in your examples). It APPEARS that the max timeout value is 2 seconds. If I set it to be 500 (half a second) the list gets very short, so I know WinBatch is reading the value. But no matter what I do, the list never gets beyond San Mateo, CA - which is about 10% of the way down the states list.
BTW, I'm getting clean data now, at least temporarily. I changed modems to a USR 56K PC card, and that's working very well. I'm using 7E1 while Hyperterminal is using 8N1. When I use 8N1 in WinBatch, I get garbage. I also uses RTSRTS in WinBatch and Hyperterminal uses RTS/CTS, but that isn't an option in WinBatch.
The capture buffers overflow and it quits.
I'm able to connect successfully connect when dialing up manually using HyperTerminal 8N1.
Here is my capture log:
[ Initializing ][ Before pComOpen ] pcomopen("COM1","0","57600","8N1","RTSRTS") OK = 5999986 [ Between pComOpen and pModemDial ] pmodemdial("5999986","1","9-1-626-303-3869") OK = 1 [ Between pModemDial and pModemConnect ] pmodemconnect("5999986") OK = 1 [ Between pModemConnect and pPutLine ] pputline("5999986","+") OK = 1 +\r [ Between pPutLine and pWaitFor ] pwaitfor("5999986","Host Name:","","0","20000") 00±´ÒYU Hoót Náíe: [ WaitFor timeout ]
Hoót Náíe:
As you can tell from the attached capture log, the first pWaitFor function call generates no parity error, but the second and third pWaitFor function calls gererate the "***** RECEIVE PARITY ERROR ***** " message, apparently without adverse affect. I also added the pModemInit function.
pcomopen("COM1","0","57600","7E1","RTSRTS") OK = 5999986 pmodeminit("5999986") OK = 1 pmodemdial("5999986","1","9-1-626-303-3869") OK = 1 pmodemconnect("5999986") OK = 1 pputchar("5999986","") OK = 1 \r pwaitfor("5999986","Host Name:","","0","30000") 0010RYU Host Name: [ #1 WaitFor string found ] pputline("5999986","WFMAIL") OK = 1 WFMAIL\r pwaitfor("5999986","Enter logon id","","0","30000") WFMAIL Connected to 0001 WELLS_FARGO Enter logon id: [ #1 WaitFor string found ][ ***** RECEIVE PARITY ERROR ***** ] pputline("5999986","WR3341IA") OK = 1 WR3341IA\r pwaitfor("5999986","Enter password","","0","30000") 33A Enter password: [ #1 WaitFor string found ][ ***** RECEIVE PARITY ERROR ***** ] pmodemhangup("5999986") OK = 1 pcomclose("5999986","0") OK = 1
Here are a few possibilities:
Article ID: W12577
Filename: Serial Communications Problems with pWaitfor.txt
File Created: 1999:04:15:16:48:10
Last Updated: 1999:04:15:16:48:10