General information
Category:
Third party products
Title:
MSCOMM32 wont listen!
I need to ring a series of modems overnight to get back electricity meter
readings.
I have 2 PCs and 2 modems on 2 different phone nos. I can get the 2 talking
using Hyperterminal - the sender outputs ATDT660005 - the receiver waits
for exactly 2 rings then sends ATA - the CONNECT message is shown and 2 way
sending of text can take place. When a VFP form sends to a Hyperterminal
session on the other PC the connection is successful and text can be output
using mscomm32 OLE object. However when a VFP form wants to receive data
(and store it in an Editbox or file) using MSCOMM32 the Port will open and
the connection can sometimes be made to work (ie the CONNECT message is
displayed) but no data can be sent by the Hyperterminal PC and successfully
received by the VFP form.
VFP Recive form Open Port and ONCOMM code shown below
HELP Please - Modems are driving me mad!
* open port cmd - port won't listen!
if !thisform.olecontrol1.portopen
thisform.olecontrol1.portopen=.t.
endif
* the following commented out commands had no effect when tested
*thisform.olecontrol1.output='ATA' &&chr(26) && ready to receive
*thisform.olecontrol1.output='ATZ'+CHR(13)
*thisform.olecontrol1.output='AT&F1'+CHR(13)
*thisform.olecontrol1.output='ATH1S0=1'+CHR(13)
thisform.olecontrol1.output='ATA'+CHR(13) && ready to receive
*** OLE Control Event ONCOMM ***
*if this.commevent=2 .AND. this.inbuffercount>0
if this.inbuffercount>0
thisform.edit1.value=thisform.edit1.value+this.input
&&allt(str(asc(this.input)))+','
thisform.edit1.refresh()
* this.output=chr(26)
endif
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only