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.
Dependents: HTTPClient_Cellular_HelloWorld Cellular_HelloMQTT MbedSmartRestMain Car_Bon_car_module ... more
This library is intended to be used with u-blox products such as the C027 or a shield with u-blox cellular and GPS modules like the cellular and positioning shield from Embedded Artist.
For 2G/GSM and 3G/UMTS you need to:
- have a SIM card and know its PIN number
- need to know you network operators APN setting These setting should be passed to the connect or init and join functions. You can also extend the APN database in MDMAPN.h.
For CDMA products you need to make sure that you have provisioned and activated the modem with either Sprint or Verizon.
Revision 139:fd9fe498f142, committed 2017-04-20
- Comitter:
- mazgch
- Date:
- Thu Apr 20 08:44:47 2017 +0000
- Parent:
- 138:dafbbf31bf76
- Commit message:
- update for additional baud rate parameter in new mbed 5
Changed in this revision
--- a/GPS.cpp Thu Feb 25 13:22:34 2016 +0000 +++ b/GPS.cpp Thu Apr 20 08:44:47 2017 +0000 @@ -238,7 +238,7 @@ GPSSerial::GPSSerial(PinName tx /*= GPSTXD*/, PinName rx /*= GPSRXD*/, int baudrate /*= GPSBAUD*/, int rxSize /*= 256*/, int txSize /*= 128*/) : - SerialPipe(tx, rx, rxSize, txSize) + SerialPipe(tx, rx, baudrate, rxSize, txSize) { baud(baudrate); #ifdef TARGET_UBLOX_C027
--- a/MDM.cpp Thu Feb 25 13:22:34 2016 +0000 +++ b/MDM.cpp Thu Apr 20 08:44:47 2017 +0000 @@ -2271,7 +2271,7 @@ PinName rts /*= MDMRTS*/, PinName cts /*= MDMCTS*/, #endif int rxSize /*= 256*/, int txSize /*= 128*/) : - SerialPipe(tx, rx, rxSize, txSize) + SerialPipe(tx, rx, baudrate, rxSize, txSize) { if (rx == USBRX) null.claim("r", stdin);
--- a/SerialPipe.cpp Thu Feb 25 13:22:34 2016 +0000 +++ b/SerialPipe.cpp Thu Apr 20 08:44:47 2017 +0000 @@ -1,7 +1,7 @@ #include "SerialPipe.h" -SerialPipe::SerialPipe(PinName tx, PinName rx, int rxSize, int txSize) : - _SerialPipeBase(tx,rx), +SerialPipe::SerialPipe(PinName tx, PinName rx, int baudrate, int rxSize, int txSize) : + _SerialPipeBase(tx,rx,baudrate), _pipeRx( (rx!=NC) ? rxSize : 0), _pipeTx( (tx!=NC) ? txSize : 0) {
--- a/SerialPipe.h Thu Feb 25 13:22:34 2016 +0000 +++ b/SerialPipe.h Thu Apr 20 08:44:47 2017 +0000 @@ -13,10 +13,11 @@ /** Constructor \param tx the trasmitting pin \param rx the receiving pin + \param baud the initial baudrate \param rxSize the size of the receiving buffer \param txSize the size of the transmitting buffer */ - SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128); + SerialPipe(PinName tx, PinName rx, int baudrate, int rxSize = 128, int txSize = 128); /** Destructor */