Integrating the ublox LISA C200 modem
Fork of SprintUSBModemHTTPClientTest by
Revision 7:655438fd019f, committed 2013-09-26
- Comitter:
- mike.pulice@proxy-usa.com
- Date:
- Thu Sep 26 11:15:22 2013 -0700
- Parent:
- 6:404683315230
- Child:
- 8:301426550c6c
- Commit message:
- Correct issues with C200 parsing interface and endpoints.
Sprint USB Modem
Added a constructor variable for which serial port stream to use for AT.
The default is 0 in order to not break previous modems.
C200 uses serial stream 1
main.cpp
Sprint modem constructor pass 1 for the serial stream.
Changed in this revision
--- a/SprintUSBModem/SprintUSBModem.cpp Thu Sep 26 00:51:06 2013 -0500 +++ b/SprintUSBModem/SprintUSBModem.cpp Thu Sep 26 11:15:22 2013 -0700 @@ -17,7 +17,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#define __DEBUG__ 3 +#define __DEBUG__ 4 #ifndef __MODULE__ #define __MODULE__ "SprintUSBModem.cpp" #endif @@ -28,8 +28,8 @@ #define USE_ONE_PORT 1 -SprintUSBModem::SprintUSBModem(PinName powerGatingPin /*= NC*/, bool powerGatingOnWhenPinHigh /* = true*/) : m_dongle(), -m_stream(m_dongle.getSerial(0)), +SprintUSBModem::SprintUSBModem(PinName powerGatingPin /*= NC*/, bool powerGatingOnWhenPinHigh /* = true*/, int serial /* 0 */) : m_dongle(), +m_stream(m_dongle.getSerial(serial)), m_at(&m_stream), m_sms(&m_at), m_ppp(&m_stream), m_dongleConnected(false), m_ipInit(false), m_smsInit(false), m_atOpen(false),
--- a/SprintUSBModem/SprintUSBModem.h Thu Sep 26 00:51:06 2013 -0500 +++ b/SprintUSBModem/SprintUSBModem.h Thu Sep 26 11:15:22 2013 -0700 @@ -37,7 +37,7 @@ @param powerGatingPin Optional pin commanding a power gating transistor on the modem's power line @param powerGatingOnWhenPinHigh true if the pin needs to be high to power the dongle, defaults to true */ - SprintUSBModem(PinName powerGatingPin = NC, bool powerGatingOnWhenPinHigh = true); + SprintUSBModem(PinName powerGatingPin = NC, bool powerGatingOnWhenPinHigh = true, int serial = 0); //Internet-related functions
--- a/SprintUSBModem/USBHostWANDongleSprint/USB3GModule/WANDongleInitializer.cpp Thu Sep 26 00:51:06 2013 -0500 +++ b/SprintUSBModem/USBHostWANDongleSprint/USB3GModule/WANDongleInitializer.cpp Thu Sep 26 11:15:22 2013 -0700 @@ -16,7 +16,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#define __DEBUG__ 0 +#define __DEBUG__ 4 #ifndef __MODULE__ #define __MODULE__ "WANDongleInitializer.cpp" #endif @@ -274,7 +274,7 @@ { DBG("USBEndpoint on Interface #%d; Type:%d; Direction:%d Current %d", intf_nb, type, dir, m_currentEndpoint); if(type == BULK_ENDPOINT) { - if( (m_currentEndpoint >= 0) && (m_currentEndpoint < 6) ) { + if( intf_nb == 1 || intf_nb == 0) { m_currentEndpoint++; return true; } else { @@ -282,6 +282,17 @@ } } + /* + if(type == INTERRUPT_ENDPOINT) { + if( intf_nb == 1) { + m_currentEndpoint++; + return true; + } else { + m_currentEndpoint++; + } + } + */ + return false; }
--- a/main.cpp Thu Sep 26 00:51:06 2013 -0500 +++ b/main.cpp Thu Sep 26 11:15:22 2013 -0700 @@ -4,7 +4,7 @@ void test(void const*) { - SprintUSBModem modem(p18); + SprintUSBModem modem(p18, true, 1); HTTPClient http; char str[512];
--- a/ublox_C200Test.uvopt Thu Sep 26 00:51:06 2013 -0500 +++ b/ublox_C200Test.uvopt Thu Sep 26 11:15:22 2013 -0700 @@ -123,7 +123,7 @@ <SetRegEntry> <Number>0</Number> <Key>CMSIS_AGDI</Key> - <Name>-X"MBED CMSIS-DAP" -UA000000001 -O4559 -S0 -C0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000</Name> + <Name>-X"MBED CMSIS-DAP" -U101001e5cc206b20e494bf5f67a8218f -O4559 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000</Name> </SetRegEntry> <SetRegEntry> <Number>0</Number> @@ -1521,7 +1521,7 @@ <FileType>1</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>0</ColumnNumber> + <ColumnNumber>2</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> <TopLine>0</TopLine> <CurrentLine>0</CurrentLine> @@ -1713,10 +1713,10 @@ <FileType>8</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>0</ColumnNumber> + <ColumnNumber>11</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>1</TopLine> - <CurrentLine>1</CurrentLine> + <TopLine>4</TopLine> + <CurrentLine>17</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>main.cpp</PathWithFileName> <FilenameWithoutPath>main.cpp</FilenameWithoutPath> @@ -1841,10 +1841,10 @@ <FileType>8</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>0</ColumnNumber> + <ColumnNumber>31</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>22</TopLine> + <CurrentLine>34</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>SprintUSBModem/SprintUSBModem.cpp</PathWithFileName> <FilenameWithoutPath>SprintUSBModem.cpp</FilenameWithoutPath> @@ -1985,10 +1985,10 @@ <FileType>8</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>0</ColumnNumber> + <ColumnNumber>40</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>25</TopLine> + <CurrentLine>34</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>SprintUSBModem/at/ATCommandsInterface.cpp</PathWithFileName> <FilenameWithoutPath>ATCommandsInterface.cpp</FilenameWithoutPath> @@ -2067,8 +2067,8 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>150</TopLine> + <CurrentLine>158</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>SprintUSBModem/USBHostWANDongleSprint/USB3GModule/WANDongle.cpp</PathWithFileName> <FilenameWithoutPath>WANDongle.cpp</FilenameWithoutPath> @@ -2083,8 +2083,8 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>277</TopLine> + <CurrentLine>296</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>SprintUSBModem/USBHostWANDongleSprint/USB3GModule/WANDongleInitializer.cpp</PathWithFileName> <FilenameWithoutPath>WANDongleInitializer.cpp</FilenameWithoutPath> @@ -2099,8 +2099,8 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>11</TopLine> + <CurrentLine>23</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>SprintUSBModem/USBHostWANDongleSprint/USBHost/USBHost.cpp</PathWithFileName> <FilenameWithoutPath>USBHost.cpp</FilenameWithoutPath> @@ -2129,7 +2129,7 @@ <FileType>8</FileType> <tvExp>0</tvExp> <Focus>0</Focus> - <ColumnNumber>0</ColumnNumber> + <ColumnNumber>41</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> <TopLine>0</TopLine> <CurrentLine>0</CurrentLine> @@ -2147,8 +2147,8 @@ <Focus>0</Focus> <ColumnNumber>0</ColumnNumber> <tvExpOptDlg>0</tvExpOptDlg> - <TopLine>0</TopLine> - <CurrentLine>0</CurrentLine> + <TopLine>7</TopLine> + <CurrentLine>19</CurrentLine> <bDave2>0</bDave2> <PathWithFileName>SprintUSBModem/USBHostWANDongleSprint/USBHost/USBEndpoint.cpp</PathWithFileName> <FilenameWithoutPath>USBEndpoint.cpp</FilenameWithoutPath>