Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Socket USBHostWANDongle lwip-sys lwip
Dependents: VodafoneUSBModemHTTPClientTest VodafoneUSBModemNTPClientTest VodafoneUSBModemSMSTest VodafoneUSBModemUSSDTest ... more
Fork of VodafoneUSBModem_bleedingedge by
Diff: VodafoneUSBModem.cpp
- Revision:
- 71:0da249386019
- Parent:
- 69:9b475f458fbc
- Child:
- 74:b70519f17a22
diff -r f6d75c4bb9d9 -r 0da249386019 VodafoneUSBModem.cpp
--- a/VodafoneUSBModem.cpp Wed Feb 06 16:55:08 2013 +0000
+++ b/VodafoneUSBModem.cpp Sun Feb 10 16:23:44 2013 +0000
@@ -17,7 +17,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define __DEBUG__ 4
+#define __DEBUG__ 0
#ifndef __MODULE__
#define __MODULE__ "VodafoneUSBModem.cpp"
#endif
@@ -526,17 +526,19 @@
m_dongle.tryConnect();
if (m_dongle.connected())
{
- DBG("Great the dongle is connected");
+ DBG("Great the dongle is connected - I've tried %d times to connect", x);
detectConnectedModem = true; // OK we can break out this while loop now - the dongle has been connected
break; // Break out of the for loop once the dongle is connected - otherwise try for a while more
}
Thread::wait(10);
}
-
- // OK we got this far - so give up trying and let someone know you can't see the modem
- m_dongleConnected = false; // set the member variable of this object to false - so if we get called again we know we have to try to detect again
- ERR("There is no dongle pluged into the board, or the module does not respond. Is the module/modem switched on?");
- return HARDWARE_NO_RESPONSE;
+ if (!detectConnectedModem)
+ {
+ // OK we got this far - so give up trying and let someone know you can't see the modem
+ m_dongleConnected = false; // set the member variable of this object to false - so if we get called again we know we have to try to detect again
+ ERR("There is no dongle pluged into the board, or the module does not respond. Is the module/modem switched on?");
+ return HARDWARE_NO_RESPONSE;
+ }
}

Vodafone K3770 3G Modem