support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

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.

Committer:
mazgch
Date:
Sun Nov 10 16:39:42 2013 +0000
Revision:
9:e7a5959ffae1
Parent:
2:b6012cd91657
Child:
13:e2446fcdc246
update support library (tx pipe)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mazgch 0:cb2d45baaca3 1 #pragma once
mazgch 0:cb2d45baaca3 2
mazgch 2:b6012cd91657 3 #include "mbed.h"
mazgch 0:cb2d45baaca3 4 #include "Pipe.h"
mazgch 0:cb2d45baaca3 5
mazgch 0:cb2d45baaca3 6 class SerialPipe : public Serial
mazgch 0:cb2d45baaca3 7 {
mazgch 9:e7a5959ffae1 8 public:
mazgch 9:e7a5959ffae1 9 SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL);
mazgch 9:e7a5959ffae1 10 virtual ~SerialPipe(void);
mazgch 9:e7a5959ffae1 11 // tx channel
mazgch 9:e7a5959ffae1 12 int put(const char* b, int s, bool t = false) ;
mazgch 9:e7a5959ffae1 13 // rx channel
mazgch 9:e7a5959ffae1 14 int readable(void);
mazgch 9:e7a5959ffae1 15 int getc(void);
mazgch 9:e7a5959ffae1 16 int get(char* b, int s, bool t = false);
mazgch 0:cb2d45baaca3 17 private:
mazgch 9:e7a5959ffae1 18 void rxIrqBuf(void);
mazgch 9:e7a5959ffae1 19 void txIrqBuf(void);
mazgch 9:e7a5959ffae1 20 protected:
mazgch 9:e7a5959ffae1 21 Pipe<char> _pipeRx;
mazgch 9:e7a5959ffae1 22 Pipe<char> _pipeTx;
mazgch 9:e7a5959ffae1 23 };
mazgch 0:cb2d45baaca3 24
mazgch 9:e7a5959ffae1 25 #define WAIT -1
mazgch 9:e7a5959ffae1 26 #define NOT_FOUND 0
mazgch 9:e7a5959ffae1 27
mazgch 9:e7a5959ffae1 28 // -----------------------------------------------------------------------
mazgch 0:cb2d45baaca3 29
mazgch 9:e7a5959ffae1 30 class SerialPipeEx : public SerialPipe
mazgch 9:e7a5959ffae1 31 {
mazgch 9:e7a5959ffae1 32 public:
mazgch 9:e7a5959ffae1 33 SerialPipeEx(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL);
mazgch 9:e7a5959ffae1 34 int getLine(char* b, int s);
mazgch 0:cb2d45baaca3 35 };