Use this interface to connect to and interact with the WNC M14A2A LTE Cellular Data Module which is provided by Wistron NeWeb Corporation (WNC) when using ARMmbed v5. The interface provides a Networking interface that can be used with the AT&T Cellular IoT Starter Kit that is sold by Avnet (http://cloudconnectkits.org/product/att-cellular-iot-starter-kit).

Dependencies:   WncControllerK64F

Dependents:   easy-connect-wnc easy-connect

Use this interface to connect to and interact with the WNC M14A2A LTE Cellular Data Module which is provided by Wistron NeWeb Corporation (WNC) when using ARMmbed v5. The interface provides a Networking interface that can be used with the AT&T Cellular IoT Starter Kit that is sold by Avnet (http://cloudconnectkits.org/product/att-cellular-iot-starter-kit).

To demonstrate the use of the Interface, a series of example programs have been provided. Links to these examples are provided below. All examples can be compiled using both the on-line compiler and the ARMmbed CLI (command line interface, see https://github.com/ARMmbed/mbed-cli)

NOTE: This library/class is specific to the AT&T Cellular IoT Starter Kit which uses a FRDM-K64F. The users mbed.org compiler should be configured to use the FRDM-K64F platform.

Example Programs

Import the example programs below and follow the README.md in each to run the example program.

  • several examples of the interface using easy_connect.
  • SMS demonstration program that demonstrates SMS usage
  • Sockets demonstration program demonstrating using TCP sockets to interact with others
  • As new example program are developed, this README will be updated

WNC FIRMWARE VERSION

The WNC14A2AInterface class currently supports the following version(s):

  • MPSS: M14A2A_v11.21.162331 APSS: M14A2A_v11.27.162331

License

This library is released under the Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License and may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Committer:
JMF
Date:
Fri Apr 21 18:12:14 2017 +0000
Revision:
8:1c11661da488
Parent:
6:7fd9e590c4e7
fixing virtual destructor warning.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JMF 6:7fd9e590c4e7 1
JMF 6:7fd9e590c4e7 2 #ifndef __WNCDEBUG__
JMF 6:7fd9e590c4e7 3 #define __WNCDEBUG__
JMF 6:7fd9e590c4e7 4 #include <stdio.h>
JMF 6:7fd9e590c4e7 5 #include "BufferedSerial.h"
JMF 6:7fd9e590c4e7 6
JMF 6:7fd9e590c4e7 7
JMF 6:7fd9e590c4e7 8 class WNCDebug
JMF 6:7fd9e590c4e7 9 {
JMF 6:7fd9e590c4e7 10 public:
JMF 6:7fd9e590c4e7 11 WNCDebug( FILE * fd = stderr ): m_puart(NULL) {m_stdiofp=fd;};
JMF 6:7fd9e590c4e7 12 WNCDebug( BufferedSerial * uart): m_stdiofp(NULL) {m_puart=uart;};
JMF 6:7fd9e590c4e7 13 ~WNCDebug() {};
JMF 6:7fd9e590c4e7 14
JMF 6:7fd9e590c4e7 15 int printf( char * fmt, ...) {
JMF 6:7fd9e590c4e7 16 char buffer[256];
JMF 6:7fd9e590c4e7 17 int ret=0;
JMF 6:7fd9e590c4e7 18 va_list args;
JMF 6:7fd9e590c4e7 19 va_start (args, fmt);
JMF 6:7fd9e590c4e7 20 vsnprintf(buffer, sizeof(buffer), fmt, args);
JMF 6:7fd9e590c4e7 21 if( m_stdiofp )
JMF 6:7fd9e590c4e7 22 ret=fputs(buffer,m_stdiofp);
JMF 6:7fd9e590c4e7 23 else
JMF 6:7fd9e590c4e7 24 ret=m_puart->puts(buffer);
JMF 6:7fd9e590c4e7 25 va_end (args);
JMF 6:7fd9e590c4e7 26 return ret;
JMF 6:7fd9e590c4e7 27 }
JMF 6:7fd9e590c4e7 28
JMF 6:7fd9e590c4e7 29 int putc( int c ) {
JMF 6:7fd9e590c4e7 30 int ret=0;
JMF 6:7fd9e590c4e7 31 if( m_stdiofp )
JMF 6:7fd9e590c4e7 32 ret=fputc(c, m_stdiofp);
JMF 6:7fd9e590c4e7 33 else
JMF 6:7fd9e590c4e7 34 ret=m_puart->putc(c);
JMF 6:7fd9e590c4e7 35 return ret;
JMF 6:7fd9e590c4e7 36 }
JMF 6:7fd9e590c4e7 37
JMF 6:7fd9e590c4e7 38 int puts( const char * str ) {
JMF 6:7fd9e590c4e7 39 int ret=0;
JMF 6:7fd9e590c4e7 40 if( m_stdiofp )
JMF 6:7fd9e590c4e7 41 ret=fputs(str,m_stdiofp);
JMF 6:7fd9e590c4e7 42 else
JMF 6:7fd9e590c4e7 43 ret=m_puart->puts(str);
JMF 6:7fd9e590c4e7 44 return ret;
JMF 6:7fd9e590c4e7 45 }
JMF 6:7fd9e590c4e7 46
JMF 6:7fd9e590c4e7 47 private:
JMF 6:7fd9e590c4e7 48 std::FILE *m_stdiofp;
JMF 6:7fd9e590c4e7 49 BufferedSerial *m_puart;
JMF 6:7fd9e590c4e7 50 };
JMF 6:7fd9e590c4e7 51 #endif