Vodafone K3770/K3772-Z modems driver & networking library

Dependencies:   Socket USBHostWANDongle lwip-sys lwip

Dependents:   VodafoneUSBModemHTTPClientTest VodafoneUSBModemNTPClientTest VodafoneUSBModemSMSTest VodafoneUSBModemUSSDTest ... more

Fork of VodafoneUSBModem_bleedingedge by Donatien Garnier

This is the driver for the Vodafone K3700 & K3772-Z Dongles:

K3770

More details and instructions can be found here.

Files at this revision

API Documentation at this revision

Comitter:
nherriot
Date:
Thu Sep 27 10:13:44 2012 +0000
Parent:
48:aa66bfc3a3fb
Child:
50:8ad4cb12749d
Commit message:
changed AT string for getLinkStatus method so that it does not request cell ID. Also changed the init function so that it tells the modem to report operator in the CC and NC 5 digit BCD number.

Changed in this revision

link/LinkMonitor.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/link/LinkMonitor.cpp	Wed Sep 26 17:19:43 2012 +0000
+++ b/link/LinkMonitor.cpp	Thu Sep 27 10:13:44 2012 +0000
@@ -38,6 +38,17 @@
 
 int LinkMonitor::init()
 {
+  // we need to make sure that we setup the operator selection to be in 'numeric' format.
+  // i.e. it is made up of a network and country code when returned by the modem e.g. Operator = 23415. This allows easy logic parsing for
+  // setting up other network parameters in future.
+
+  DBG("LinkMonitor::init() being called. This should only happen once: executinging AT+COPS=0,2");  
+  int ret = m_pIf->execute("AT+COPS=0,2", this, NULL, DEFAULT_TIMEOUT); //Configure to set the operator string to Country Code and mobile network code
+  if(ret != OK)
+  {
+    WARN(" NET_PROTOCOL error from sending the AT+COPS command to the modem. ");
+    return NET_PROTOCOL;
+  }
   return OK;
 }
 
@@ -126,7 +137,7 @@
   m_rssi = 0;
   m_registrationState = REGISTRATION_STATE_UNKNOWN;
   m_bearer = BEARER_UNKNOWN;
-  int ret = m_pIf->execute("AT+CREG=2;+CREG?;+CREG=0;+COPS?;+CSQ", this, NULL, DEFAULT_TIMEOUT); //Configure to get registration info & get it; get signal quality
+  int ret = m_pIf->execute("AT+CREG=0;+CREG?;+COPS?;+CSQ", this, NULL, DEFAULT_TIMEOUT); //Configure to get registration info & get it; get signal quality
   if(ret != OK)
   {
     return NET_PROTOCOL;