summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/dialer.cpp
authorzecke <zecke>2002-10-24 20:43:25 (UTC)
committer zecke <zecke>2002-10-24 20:43:25 (UTC)
commit81a2bb8073b95d438911a62a7f4d8244ef58e20a (patch) (side-by-side diff)
tree2521c88de626caf818b715776934da204d6b0f8f /noncore/apps/opie-console/dialer.cpp
parent0fc598a0ee9151f82f5a78383645a758d5f6cad9 (diff)
downloadopie-81a2bb8073b95d438911a62a7f4d8244ef58e20a.zip
opie-81a2bb8073b95d438911a62a7f4d8244ef58e20a.tar.gz
opie-81a2bb8073b95d438911a62a7f4d8244ef58e20a.tar.bz2
Modem is now working
Kindly called from Germany to Switzerland via rfcomm( affix) + Nokia6210 + Vodafone... But now it's working might be a hangup problem somewhere
Diffstat (limited to 'noncore/apps/opie-console/dialer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/dialer.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp
index ce2b688..8524422 100644
--- a/noncore/apps/opie-console/dialer.cpp
+++ b/noncore/apps/opie-console/dialer.cpp
@@ -90,4 +90,5 @@ void Dialer::setHangupOnly()
state = state_cancel;
usercancel = 1;
+ send("+++ATH\r");
}
@@ -99,5 +100,7 @@ void Dialer::slotCancel()
reset();
}
- else accept();
+ else {
+ accept();
+ }
}
@@ -141,7 +144,7 @@ void Dialer::trydial(const QString& number)
{
qWarning("HangupString " + m_profile.readEntry("HangupString"));
- send(m_profile.readEntry("HangupString"));
- //send("+++ATH");
- send("");
+ //send(m_profile.readEntry("HangupString"));
+ send("+++ATH\r");
+ //send("");
}
@@ -188,5 +191,5 @@ void Dialer::trydial(const QString& number)
// send(QString("%1 %2").arg(m_profile.readEntry("DialPrefix1")).arg(number));
QString response5 = receive();
- if(!response5.contains("\n" + m_profile.readEntry("DefaultConnect")))
+ if(!response5.contains("CONNECT") )
{
if(response5.contains("BUSY"))
@@ -202,7 +205,9 @@ void Dialer::trydial(const QString& number)
}
+
if(state != state_cancel)
{
- switchState(state_online);
+ state = state_online;
+ slotCancel();
}
}
@@ -247,5 +252,5 @@ QString Dialer::receive()
buffer[i] = buffer[i] & 0x7F;
buffer[ret] = 0;
- //qWarning("Got: '%s'", buffer);
+ qWarning("Got: %s", buffer);
buf.append(QString(buffer));
if(buf.contains("OK") || buf.contains("ERROR") || buf.contains("CONNECT") || (buf.contains("BUSY")))
@@ -254,5 +259,8 @@ QString Dialer::receive()
cleanshutdown = 1;
return buf;
- }
+ }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) {
+ cleanshutdown = 1;
+ return QString::null;
+ }
}
else if(ret < 0)