The WDCInterface is is a drop-in replacement for an EthernetInterface class that allows the user to connect to the Internet with a Wistron NeWeb Corporation (WNC) M14A2A Series data module using the standard network Socket API's. This interface class is used in the AT&T Cellular IoT Starter Kit which is sold by Avnet (http://cloudconnectkits.org/product/att-cellular-iot-starter-kit).

Dependencies:   WncControllerK64F

Dependents:   WNCProximityMqtt Pubnub_ATT_IoT_SK_WNC_sync BluemixDemo BluemixQS ... more

See the WNCInterface README in the Wiki tab for detailed information on this library.

Revision:
9:9f0578ff157a
Parent:
8:4b38bfb1704d
Child:
25:52bad4105cac
--- a/WNCInterface.cpp	Fri Oct 07 00:36:47 2016 +0000
+++ b/WNCInterface.cpp	Fri Oct 07 13:26:00 2016 +0000
@@ -135,8 +135,7 @@
 char * WNCInterface::getIPAddress() {
     M_LOCK;
     if ( _pwnc->getWncNetworkingStats(&myNetStats) ) {
-        if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-            FATAL_WNC_ERROR(null);
+        CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null);
         M_ULOCK;
         return &myNetStats.ip[0];
     }
@@ -150,8 +149,7 @@
 char * WNCInterface::getGateway() {
     M_LOCK;
     if ( _pwnc->getWncNetworkingStats(&myNetStats) ) {
-        if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-            FATAL_WNC_ERROR(null);
+        CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null);
         M_ULOCK;
         return &WNCInterface::myNetStats.gateway[0];
     }
@@ -165,8 +163,7 @@
 char * WNCInterface::getNetworkMask() {
     M_LOCK;
     if ( _pwnc->getWncNetworkingStats(&myNetStats) ) {
-        if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-            FATAL_WNC_ERROR(null);
+        CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null);
         M_ULOCK;    
         return &WNCInterface::myNetStats.mask[0];
     }
@@ -182,8 +179,7 @@
     
     M_LOCK;
     if( _pwnc->getICCID(&str) ) {
-        if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG )
-            FATAL_WNC_ERROR(null);
+        CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), null);
         mac = str.substr(3,20);
         mac[2]=mac[5]=mac[8]=mac[11]=mac[14]=':';
         M_ULOCK;