endpoint C207 radio support

Dependents:   mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular

Committer:
ansond
Date:
Tue Jul 29 19:35:20 2014 +0000
Revision:
21:05af8f1a4303
Parent:
20:9572d860cb54
Child:
23:a12a6b3910a9
updated for UK sims config in cellular

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 1:76d2da9e2b84 1 /* Copyright C2013 Doug Anson, MIT License
ansond 1:76d2da9e2b84 2 *
ansond 1:76d2da9e2b84 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 1:76d2da9e2b84 4 * and associated documentation files the "Software", to deal in the Software without restriction,
ansond 1:76d2da9e2b84 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 1:76d2da9e2b84 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 1:76d2da9e2b84 7 * furnished to do so, subject to the following conditions:
ansond 1:76d2da9e2b84 8 *
ansond 1:76d2da9e2b84 9 * The above copyright notice and this permission notice shall be included in all copies or
ansond 1:76d2da9e2b84 10 * substantial portions of the Software.
ansond 1:76d2da9e2b84 11 *
ansond 1:76d2da9e2b84 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 1:76d2da9e2b84 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 1:76d2da9e2b84 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 1:76d2da9e2b84 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 1:76d2da9e2b84 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 1:76d2da9e2b84 17 */
ansond 1:76d2da9e2b84 18
ansond 3:6acc6c8143b7 19 #ifndef _MBED_UBLOX_CELL_RADIO_H_
ansond 3:6acc6c8143b7 20 #define _MBED_UBLOX_CELL_RADIO_H_
ansond 4:0cc421d46a2b 21
ansond 20:9572d860cb54 22 // BaseClass support
ansond 20:9572d860cb54 23 #include "BaseClass.h"
ansond 20:9572d860cb54 24
ansond 20:9572d860cb54 25 // Cellular support
ansond 16:19f597d8048f 26 #include "MDM.h"
ansond 16:19f597d8048f 27
ansond 16:19f597d8048f 28 // SIM settings
ansond 16:19f597d8048f 29 #define SIMPIN NULL
ansond 21:05af8f1a4303 30
ansond 21:05af8f1a4303 31 // UK
ansond 21:05af8f1a4303 32 #define APN "internet"
ansond 21:05af8f1a4303 33 #define USERNAME "web"
ansond 21:05af8f1a4303 34 #define PASSWORD "web"
ansond 21:05af8f1a4303 35
ansond 21:05af8f1a4303 36 // US
ansond 21:05af8f1a4303 37 //#define APN "phone"
ansond 21:05af8f1a4303 38 //#define USERNAME NULL
ansond 21:05af8f1a4303 39 //#define PASSWORD NULL
ansond 2:a28f19f39f2b 40
ansond 5:a8fd1fa0f0d0 41 class MBEDUbloxCellRadio : public BaseClass {
ansond 1:76d2da9e2b84 42 private:
ansond 20:9572d860cb54 43 #ifdef NSP_CELLULAR_NETWORK
ansond 20:9572d860cb54 44 MDMRtos<MDMSerial> *m_modem;
ansond 20:9572d860cb54 45 #else
ansond 20:9572d860cb54 46 MDMSerial *m_modem;
ansond 20:9572d860cb54 47 #endif
ansond 20:9572d860cb54 48 bool m_connected;
ansond 1:76d2da9e2b84 49
ansond 1:76d2da9e2b84 50 public:
ansond 16:19f597d8048f 51 MBEDUbloxCellRadio(ErrorHandler *error_handler,void *endpoint,void *modem);
ansond 5:a8fd1fa0f0d0 52 virtual ~MBEDUbloxCellRadio();
ansond 1:76d2da9e2b84 53
ansond 1:76d2da9e2b84 54 bool connect();
ansond 5:a8fd1fa0f0d0 55 bool disconnect();
ansond 5:a8fd1fa0f0d0 56 };
ansond 1:76d2da9e2b84 57
ansond 3:6acc6c8143b7 58 #endif // _MBED_UBLOX_CELL_RADIO_H_
ansond 1:76d2da9e2b84 59
ansond 1:76d2da9e2b84 60