u-blox USB modems (GSM and CDMA)

Dependencies:   CellularUSBModem

Dependents:   C027_CANInterfaceComm C027_ModemTransparentUSBCDC_revb UbloxModemHTTPClientTest C027_HTTPClientTest ... more

Legacy Networking Libray

This is an mbed 2 networking library. For an mbed OS 5 compatible library, please see:

Import libraryC027Interface

Socket interface for C027Interface. Implements the NetworkSocketAPI

Committer:
mbed_official
Date:
Mon Dec 16 09:00:36 2013 +0000
Revision:
5:60b48a013e86
Parent:
1:71286b99c1cb
Synchronized with git revision 170ac6562b7b2b5bb43f8ecf82b2af18b37eeb9c

Full URL: https://github.com/mbedmicro/mbed/commit/170ac6562b7b2b5bb43f8ecf82b2af18b37eeb9c/

improve USB host library and cellular modem stack

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 1:71286b99c1cb 1 /* Copyright (c) 2010-2012 mbed.org, MIT License
bogdanm 1:71286b99c1cb 2 *
bogdanm 1:71286b99c1cb 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
bogdanm 1:71286b99c1cb 4 * and associated documentation files (the "Software"), to deal in the Software without
bogdanm 1:71286b99c1cb 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
bogdanm 1:71286b99c1cb 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
bogdanm 1:71286b99c1cb 7 * Software is furnished to do so, subject to the following conditions:
bogdanm 1:71286b99c1cb 8 *
bogdanm 1:71286b99c1cb 9 * The above copyright notice and this permission notice shall be included in all copies or
bogdanm 1:71286b99c1cb 10 * substantial portions of the Software.
bogdanm 1:71286b99c1cb 11 *
bogdanm 1:71286b99c1cb 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
bogdanm 1:71286b99c1cb 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
bogdanm 1:71286b99c1cb 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
bogdanm 1:71286b99c1cb 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
bogdanm 1:71286b99c1cb 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
bogdanm 1:71286b99c1cb 17 */
bogdanm 1:71286b99c1cb 18
bogdanm 1:71286b99c1cb 19 #ifndef UBLOXGSMMODEMINITIALIZER_H
bogdanm 1:71286b99c1cb 20 #define UBLOXGSNMODEMINITIALIZER_H
bogdanm 1:71286b99c1cb 21
bogdanm 1:71286b99c1cb 22 #include "WANDongleInitializer.h"
bogdanm 1:71286b99c1cb 23
bogdanm 1:71286b99c1cb 24 enum
bogdanm 1:71286b99c1cb 25 {
mbed_official 5:60b48a013e86 26 WAN_DONGLE_TYPE_UBLOX_LISAU200 = 0x0200
bogdanm 1:71286b99c1cb 27 };
bogdanm 1:71286b99c1cb 28
bogdanm 1:71286b99c1cb 29 //-----------------------------------------------------------------------
bogdanm 1:71286b99c1cb 30 // mamm, u-blox Modem
bogdanm 1:71286b99c1cb 31 //-----------------------------------------------------------------------
bogdanm 1:71286b99c1cb 32
bogdanm 1:71286b99c1cb 33 class UbloxGSMModemInitializer : public WANDongleInitializer
bogdanm 1:71286b99c1cb 34 {
bogdanm 1:71286b99c1cb 35 public:
bogdanm 1:71286b99c1cb 36 UbloxGSMModemInitializer(USBHost* pHost);
bogdanm 1:71286b99c1cb 37
bogdanm 1:71286b99c1cb 38 virtual uint16_t getMSDVid();
bogdanm 1:71286b99c1cb 39 virtual uint16_t getMSDPid();
bogdanm 1:71286b99c1cb 40
bogdanm 1:71286b99c1cb 41 virtual uint16_t getSerialVid();
bogdanm 1:71286b99c1cb 42 virtual uint16_t getSerialPid();
bogdanm 1:71286b99c1cb 43
bogdanm 1:71286b99c1cb 44 virtual bool switchMode(USBDeviceConnected* pDev);
bogdanm 1:71286b99c1cb 45
bogdanm 1:71286b99c1cb 46 virtual int getSerialPortCount();
bogdanm 1:71286b99c1cb 47
bogdanm 1:71286b99c1cb 48 virtual void setVidPid(uint16_t vid, uint16_t pid);
bogdanm 1:71286b99c1cb 49
bogdanm 1:71286b99c1cb 50 virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol); //Must return true if the interface should be parsed
bogdanm 1:71286b99c1cb 51
bogdanm 1:71286b99c1cb 52 virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used
bogdanm 1:71286b99c1cb 53
bogdanm 1:71286b99c1cb 54 virtual int getType();
bogdanm 1:71286b99c1cb 55
bogdanm 1:71286b99c1cb 56 private:
bogdanm 1:71286b99c1cb 57
bogdanm 1:71286b99c1cb 58 bool m_hasSwitched;
bogdanm 1:71286b99c1cb 59 int m_currentSerialIntf;
bogdanm 1:71286b99c1cb 60 int m_endpointsToFetch;
bogdanm 1:71286b99c1cb 61 };
bogdanm 1:71286b99c1cb 62
bogdanm 1:71286b99c1cb 63 #endif