Connection Manager library for u-blox cellular modules. It manages the modem for keeping data connection always active.
CNLib.h@1:29ad1d1ac1f9, 2016-01-21 (annotated)
- Committer:
- msinig
- Date:
- Thu Jan 21 14:00:25 2016 +0000
- Revision:
- 1:29ad1d1ac1f9
- Parent:
- 0:86284a262735
fix bugs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
msinig | 0:86284a262735 | 1 | #pragma once |
msinig | 0:86284a262735 | 2 | |
msinig | 0:86284a262735 | 3 | #include "MDM.h" |
msinig | 0:86284a262735 | 4 | |
msinig | 0:86284a262735 | 5 | class CNLib : public MDMSerial { |
msinig | 0:86284a262735 | 6 | |
msinig | 0:86284a262735 | 7 | public: |
msinig | 0:86284a262735 | 8 | CNLib() : MDMSerial() {}; |
msinig | 0:86284a262735 | 9 | |
msinig | 0:86284a262735 | 10 | /** Power on the modem |
msinig | 0:86284a262735 | 11 | */ |
msinig | 0:86284a262735 | 12 | int powerOnModem(); |
msinig | 0:86284a262735 | 13 | |
msinig | 0:86284a262735 | 14 | /** Inti the modem |
msinig | 0:86284a262735 | 15 | */ |
msinig | 0:86284a262735 | 16 | int initModem(); |
msinig | 0:86284a262735 | 17 | |
msinig | 0:86284a262735 | 18 | /** init the sim card |
msinig | 0:86284a262735 | 19 | \simpin pin of the sim, NULL if no sim pin is used |
msinig | 0:86284a262735 | 20 | */ |
msinig | 0:86284a262735 | 21 | int simInit(const char* simpin); |
msinig | 0:86284a262735 | 22 | |
msinig | 0:86284a262735 | 23 | /** Get Sim Status |
msinig | 0:86284a262735 | 24 | */ |
msinig | 0:86284a262735 | 25 | int getSimInfo(); |
msinig | 0:86284a262735 | 26 | |
msinig | 0:86284a262735 | 27 | /** Get Network status info |
msinig | 0:86284a262735 | 28 | */ |
msinig | 0:86284a262735 | 29 | int getNetworkInfo(); |
msinig | 0:86284a262735 | 30 | |
msinig | 0:86284a262735 | 31 | /** Set module to auto registration |
msinig | 0:86284a262735 | 32 | */ |
msinig | 0:86284a262735 | 33 | int setNetAutoReg(); |
msinig | 0:86284a262735 | 34 | |
msinig | 0:86284a262735 | 35 | /** get Internal data context status |
msinig | 0:86284a262735 | 36 | */ |
msinig | 0:86284a262735 | 37 | int getInternalStatusContext(); |
msinig | 0:86284a262735 | 38 | |
msinig | 0:86284a262735 | 39 | /** Disable internal data Context |
msinig | 0:86284a262735 | 40 | */ |
msinig | 0:86284a262735 | 41 | int disableInternalContext(); |
msinig | 0:86284a262735 | 42 | |
msinig | 0:86284a262735 | 43 | /** |
msinig | 0:86284a262735 | 44 | \return NetStatus |
msinig | 0:86284a262735 | 45 | */ |
msinig | 0:86284a262735 | 46 | NetStatus* getNet(){return &_net;} |
msinig | 0:86284a262735 | 47 | |
msinig | 0:86284a262735 | 48 | /** |
msinig | 0:86284a262735 | 49 | \return DevStatus |
msinig | 0:86284a262735 | 50 | */ |
msinig | 0:86284a262735 | 51 | DevStatus* getDev(){return &_dev;} |
msinig | 0:86284a262735 | 52 | |
msinig | 0:86284a262735 | 53 | |
msinig | 0:86284a262735 | 54 | protected: |
msinig | 0:86284a262735 | 55 | static int _mcbCPIN(int type, const char* buf, int len, Sim* sim); |
msinig | 0:86284a262735 | 56 | }; |