I'm working on a comm app...
I would like to init the modem, and then display all results to a label on the main dialog.
For some reason I don't seem to be getting the "OK" back from the modem.
I've verified that g_szmdmInit is equal to "ATZ"
And the modem brings up DTR, in fact I can make it dial with no problems...
(Hey you fixed the (CODE) so when I edit it doesn't show the html tags, cool!)
Can someone take a gander at this?
This function is called on WM_INITDIALOG
------------------
Scott
mailto:[email protected][email protected]</A>
[This message has been edited by Scott Turchin (edited August 12, 2000).]
I would like to init the modem, and then display all results to a label on the main dialog.
For some reason I don't seem to be getting the "OK" back from the modem.
I've verified that g_szmdmInit is equal to "ATZ"
And the modem brings up DTR, in fact I can make it dial with no problems...
(Hey you fixed the (CODE) so when I edit it doesn't show the html tags, cool!)
Can someone take a gander at this?
This function is called on WM_INITDIALOG
Code:
'---------------------------------------------------------------------------------------------------------------- Function InitializeModem() As Long Local Start As Long Comm Open g_szComPort As #hComm If ErrClear Then Exit Function 'Exit if port cannot be opened Comm Set #hComm, Baud = Val(g_szBaudRate) Comm Set #hComm, Byte = 8 '8 bits Comm Set #hComm, Parity = %False 'No parity Comm Set #hComm, Stop = 0 '1 stop bit Comm Set #hComm, TxBuffer = 1024 '1k transmit buffer Comm Set #hComm, RxBuffer = 1024 '1k receive buffer 'Send the Init command Comm Send #hComm, g_szmdmInit 'Comm Print #hComm,g_szmdmInit Control Set Text hDlg,%IDLABELCOMMSTATUS2, g_szmdmInit 'Begin timer Start = Timer Do g_Qty = Comm(#hComm, RxQue) If IsTrue g_Qty Then Comm Recv #hComm, g_Qty, g_szmdmInput Control Set Text hDlg,%IDLABELCOMMSTATUS2, g_szmdmInput End If If Start + Timer > 30 Then Exit Do Loop While IsFalse g_Qty Function = %TRUE End Function '----------------------------------------------------------------------------------------------------------------
Scott
mailto:[email protected][email protected]</A>
[This message has been edited by Scott Turchin (edited August 12, 2000).]
Comment