
BETA903A USER MANUAL
- 73 -
/////////////////////////////////////////////////////////////////////////////
// CPGSMTestDlg message handlers
BOOL CPGSMTestDlg::SendATCmd(CString cmd)
{
int len, i;
len = cmd.GetLength();
for(i = 0; i < len;i++)
m_cSendBuffer[i] = (char)cmd.GetAt(i);;
return (m_pSerialPort->Send(m_cSendBuffer, len));
}
BOOL CPGSMTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen
m_cSendBuffer = new char[60];
m_pSerialPort = new CSerialPort();
m_pSerialPort->SetCommMsg(m_hWnd, WM_CMD_OK);
if (!
(m_pSerialPort->Open(_T("COM1:"), 57600, 8, ONESTOPBIT, NOPARITY))
)
{
m_strStatus = _T("Open COM error.");
m_btnDial.EnableWindow(FALSE); /* Disable "Dial" button */
UpdateData(FALSE);
return TRUE;
}
CString temp_str;
// Echo off
temp_str = _T("ATE0\r");
Send AT command to
GSM module by COM1
Open COM1 to
communicate with GSM
module.
Send “Echo off” command to
GSM module.
Summary of Contents for BETA903A
Page 19: ...BETA903A USER MANUAL 19 1 3 2 Mechanical specifications of Holder Mount ...
Page 49: ...BETA903A USER MANUAL 49 STEP2 Select Windows folder STEP3 Run KeyPadTest program ...
Page 55: ...BETA903A USER MANUAL 55 5 Select No and click Next button to cancel the synchronization ...
Page 60: ...BETA903A USER MANUAL 60 STEP 5 Click Next button STEP 6 Click Next button ...
Page 94: ...BETA903A USER MANUAL 94 STEP 3 Add process code into message processing function ...
Page 95: ...BETA903A USER MANUAL 95 End of BETA903A User Manual ...