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 lwip-sys lwip
Fork of AbitUSBModem by
Diff: ip/PPPIPInterface.cpp
- Revision:
- 97:7d9cc95e2ea7
- Parent:
- 96:b50f5f795684
- Child:
- 98:1b851249d70b
--- a/ip/PPPIPInterface.cpp Wed Feb 18 09:40:07 2015 +0000 +++ b/ip/PPPIPInterface.cpp Wed Feb 18 14:11:24 2015 +0000 @@ -1,4 +1,7 @@ /* PPPIPInterface.cpp */ +/* Modified by 2015 phsfan + * for ABIT SMA-01 + */ /* Copyright (C) 2012 mbed.org, MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software @@ -30,6 +33,8 @@ #include "PPPIPInterface.h" +#define DEFAULT_TIMEOUT 10000 + #define MSISDN "0570570711##64" #define CONNECT_CMD "ATD" MSISDN "\x0D" @@ -114,16 +119,16 @@ DBG("Expect %s", EXPECTED_RESP); - Thread::wait(100); + Thread::wait(500); len = 0; size_t readLen; - ret = m_pStream->read((uint8_t*)buf + len, &readLen, EXPECTED_RESP_MIN_LEN, 10000); + ret = m_pStream->read((uint8_t*)buf + len, &readLen, EXPECTED_RESP_MIN_LEN, DEFAULT_TIMEOUT); if( ret != OK ) { return NET_UNKNOWN; } len += readLen; while( (len < EXPECTED_RESP_MIN_LEN) || (buf[len-1] != LF) ) { - ret = m_pStream->read((uint8_t*)buf + len, &readLen, 1, 10000); + ret = m_pStream->read((uint8_t*)buf + len, &readLen, 1, DEFAULT_TIMEOUT); if( ret != OK ) { return NET_UNKNOWN; }