Diffstat (limited to 'noncore/apps/opie-console/dialer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/dialer.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index 8524422..67ad10e 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp @@ -14,4 +14,6 @@ #include <errno.h> +#include "io_modem.h" + // State machine: | When an error occurs, we don't have to // | reset everything. @@ -54,12 +56,8 @@ Dialer::Dialer(const Profile& profile, int fd, QWidget *parent, const char *name QLabel *desc; - //m_profile.writeEntry("InitString", "ATZ"); - //m_profile.writeEntry("DialPrefix1", "ATDT"); - //m_profile.writeEntry("Termination", "\n"); usercancel = 0; cleanshutdown = 0; -// fcntl(m_fd, F_SETFL, O_NONBLOCK); desc = new QLabel(QObject::tr("Dialing number: %1").arg(m_profile.readEntry("Number")), this); @@ -90,5 +88,5 @@ void Dialer::setHangupOnly() state = state_cancel; usercancel = 1; - send("+++ATH\r"); + send( m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING )+"\r" ); } @@ -143,8 +141,6 @@ void Dialer::trydial(const QString& number) if(cleanshutdown) { - qWarning("HangupString " + m_profile.readEntry("HangupString")); - //send(m_profile.readEntry("HangupString")); - send("+++ATH\r"); - //send(""); + qWarning("HangupString " + m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING)); + send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r"); } @@ -152,8 +148,6 @@ void Dialer::trydial(const QString& number) { switchState(state_init); - //send("ATZ"); - qWarning("Init String " + m_profile.readEntry("InitString") ); -// send(m_profile.readEntry("InitString", "AT")); - send("AT\r"); +// qWarning("Init String " + m_profile.readEntry("InitString") ); + send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r"); QString response2 = receive(); if(!response2.contains("\nOK\r")) @@ -188,6 +182,8 @@ void Dialer::trydial(const QString& number) switchState(state_dialing); - send(QString("ATDT %1\r").arg(number)); -// send(QString("%1 %2").arg(m_profile.readEntry("DialPrefix1")).arg(number)); +// send(QString("ATDT %1\r").arg(number)); + send(QString("%1 %2\r").arg(m_profile.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 )) + .arg(number)); + QString response5 = receive(); if(!response5.contains("CONNECT") ) |