
Help with SAX VB communications control
I'm having problems using the Mike Sax communications control which came with
Borland's Visual Solutions Pack. Basically I am attempting to dial utilizing no
terminal emulation and once a connection is established, initiate an XMODEM file
transfer. If I omit the XMODEM code below, it dials successfully. If I add the
XMODEM download, it skips over the modem dial command and attemps to download
without having ever first made a connection. I'm thoroughly baffled. Below
is the relevant code:
Sub Form_Load ()
Dim response
comm1.Port = "com1"
comm1.Speed = 9600
comm1.AutoSend = False
comm1.AutoReceive = False
comm1.Send = "ATH0" & Chr$(13)
Debug.Print "Sending modem string..."
comm1.Send = "AT&FX4&B1&C1&D2&H1&K1&R2" & Chr$(13)
comm1.Send = "ATM1L2S7=60S11=55S0=0" & Chr$(13)
comm1.Send = "ATDT766-5270" & Chr$(13)
'DoEvents
Debug.Print "Finished dialing..."
response = comm1.Receive
Debug.Print "Receiving input..."
'DoEvents
'If Mid(response, 1, 7) = "CONNECT" Then
comm1.Send = Chr$(13) & Chr$(13)
Debug.Print "Blasted <crs>"
'End If
comm1.Send = "Hunt" & Chr$(13)
Debug.Print "Blasted username..."
'Do While 1
response = comm1.Receive
Debug.Print response
'Loop
comm1.Send = Chr$(13) & Chr$(13)
comm1.Download = "C:\eastern.dat"
End Sub