Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialing in and streams

Status
Not open for further replies.

mjg01

Programmer
Nov 22, 2002
7
US
I have a client that will be dialing into me and will be sending a stream of data. I'll have to break the data into files and perform various acknowledgements and checksums on it. How do you configure Procomm to accept a dial-in and is using comgetc the best approach to parsing the stream?

Thanks,

M
 
You will want to use these set statements at the beginning of your script:

set modem acceptcall data ON
set modem acceptcall fax ON (not necessary, but I usually turn it off in case adaptive answer is a problem with a particular modem and/or no fax calls are expected)
set modem autoanswer PW

You will then want a when command that looks like this:

when $CARRIER call proc_name

where the procedure proc_name will be called whenever the value of $CARRIER changes. It would look something like this:

if $CARRIER == 0
return
else
;Connected, perform commands here
endif

As for parsing the data, I usually like to use either the capture or snapshot command to save the data to a text file and parse that line by line. If that won't work well for you, I recommend using rget instead of comgetc.


aspect@aspectscripting.com
 
Thanks for the advice and nice site by the way. Acceptcall and rget look like they're exactly what I need.

mjg
 
Hello,

My main proc goes something like this:

proc main
set modem acceptcall data ON
set modem acceptcall fax OFF
set modem autoanswer PW

when $CARRIER call startTransfer

while 1
yield
endwhile
endproc

However, when a client dials in, Procomm connects but never transfers control to the startTransfer proc. Any ideas why the when command doesn't fire?

Thanks,

mjg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top