Added support for the WNC M14A2A Cellular LTE Data Module.

Dependencies:   WNC14A2AInterface

Easy Connect

Easily add all supported connectivity methods to your mbed OS project

This project is derived from https://developer.mbed.org/teams/sandbox/code/simple-mbed-client-example/file/dd6231df71bb/easy-connect.lib. It give user the ability to switch between connectivity methods and includes support for the WNC14A2A Data Module. The `NetworkInterface` API makes this easy, but you still need a mechanism for the user to select the connection method, The selection is made by modifying the `mbed_app.json` file and using `easy_connect()` from your application.

Specifying connectivity method

To add support for the WNC14A2A, add the following to your ``mbed_app.json`` file:

mbed_app.json

{
    "config": {
        "network-interface":{
            "help": "options are ETHERNET,WIFI_ESP8266,WIFI_ODIN,MESH_LOWPAN_ND,MESH_THREAD,WNC14A2A",
            "value": "WNC14A2A"
        }
    },
}

After you choose `WNC14A2A` you'll also need to indicate if you want debug output or not by Enabling (true) or Disabling (false) WNC_DEBUG.

If WNC_DEBUG is enabled, there are 3 different levels of debug output (selected via bit settings). These debug levels are set using the following values:

ValueDescription
1Basic WNC driver debug output
2Comprehensive WNC driver debug output
4Network Layer debug output

You can have any combination of these three bit values for a total value of 0 – 7.

WNC Debug Settings

    "config": {
        "WNC_DEBUG": {
            "value": false
        },
        "WNC_DEBUG_SETTING": {
            "value": 4
        },
    }

Using Easy Connect from your application

Easy Connect has just one function which will either return a `NetworkInterface`-pointer or `NULL`:

Sample Code

#include "easy-connect.h"

int main(int, char**) {
    NetworkInterface* network = easy_connect(true); /* has 1 argument, enable_logging (pass in true to log to serial port) */
    if (!network) {
        printf("Connecting to the network failed... See serial output.\r\n");
        return 1;
    }
 
    // Rest of your program
}

Tested on

  • K64F with Ethernet.
  • AT&T Cellular IoT Starter Kit with WNC M14A2A Cellular Data Module

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

  • MPSS: M14A2A_v11.50.164451 APSS: M14A2A_v11.53.164451

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:
group-Avnet
Date:
Wed Apr 19 01:08:11 2017 +0000
Revision:
0:478cfd88041f
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
group-Avnet 0:478cfd88041f 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
group-Avnet 0:478cfd88041f 2 <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
group-Avnet 0:478cfd88041f 3
group-Avnet 0:478cfd88041f 4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
group-Avnet 0:478cfd88041f 5 <link rel="File-List" href="Library_files/filelist.xml">
group-Avnet 0:478cfd88041f 6 <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for SPIRIT1 Driver</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
group-Avnet 0:478cfd88041f 7
group-Avnet 0:478cfd88041f 8
group-Avnet 0:478cfd88041f 9
group-Avnet 0:478cfd88041f 10 <style>
group-Avnet 0:478cfd88041f 11 <!--
group-Avnet 0:478cfd88041f 12 /* Style Definitions */
group-Avnet 0:478cfd88041f 13 p.MsoNormal, li.MsoNormal, div.MsoNormal
group-Avnet 0:478cfd88041f 14 {mso-style-parent:"";
group-Avnet 0:478cfd88041f 15 margin:0in;
group-Avnet 0:478cfd88041f 16 margin-bottom:.0001pt;
group-Avnet 0:478cfd88041f 17 mso-pagination:widow-orphan;
group-Avnet 0:478cfd88041f 18 font-size:12.0pt;
group-Avnet 0:478cfd88041f 19 font-family:"Times New Roman";
group-Avnet 0:478cfd88041f 20 mso-fareast-font-family:"Times New Roman";}
group-Avnet 0:478cfd88041f 21 h2
group-Avnet 0:478cfd88041f 22 {mso-style-next:Normal;
group-Avnet 0:478cfd88041f 23 margin-top:12.0pt;
group-Avnet 0:478cfd88041f 24 margin-right:0in;
group-Avnet 0:478cfd88041f 25 margin-bottom:3.0pt;
group-Avnet 0:478cfd88041f 26 margin-left:0in;
group-Avnet 0:478cfd88041f 27 mso-pagination:widow-orphan;
group-Avnet 0:478cfd88041f 28 page-break-after:avoid;
group-Avnet 0:478cfd88041f 29 mso-outline-level:2;
group-Avnet 0:478cfd88041f 30 font-size:14.0pt;
group-Avnet 0:478cfd88041f 31 font-family:Arial;
group-Avnet 0:478cfd88041f 32 font-weight:bold;
group-Avnet 0:478cfd88041f 33 font-style:italic;}
group-Avnet 0:478cfd88041f 34 a:link, span.MsoHyperlink
group-Avnet 0:478cfd88041f 35 {color:blue;
group-Avnet 0:478cfd88041f 36 text-decoration:underline;
group-Avnet 0:478cfd88041f 37 text-underline:single;}
group-Avnet 0:478cfd88041f 38 a:visited, span.MsoHyperlinkFollowed
group-Avnet 0:478cfd88041f 39 {color:blue;
group-Avnet 0:478cfd88041f 40 text-decoration:underline;
group-Avnet 0:478cfd88041f 41 text-underline:single;}
group-Avnet 0:478cfd88041f 42 p
group-Avnet 0:478cfd88041f 43 {mso-margin-top-alt:auto;
group-Avnet 0:478cfd88041f 44 margin-right:0in;
group-Avnet 0:478cfd88041f 45 mso-margin-bottom-alt:auto;
group-Avnet 0:478cfd88041f 46 margin-left:0in;
group-Avnet 0:478cfd88041f 47 mso-pagination:widow-orphan;
group-Avnet 0:478cfd88041f 48 font-size:12.0pt;
group-Avnet 0:478cfd88041f 49 font-family:"Times New Roman";
group-Avnet 0:478cfd88041f 50 mso-fareast-font-family:"Times New Roman";}
group-Avnet 0:478cfd88041f 51 @page Section1
group-Avnet 0:478cfd88041f 52 {size:8.5in 11.0in;
group-Avnet 0:478cfd88041f 53 margin:1.0in 1.25in 1.0in 1.25in;
group-Avnet 0:478cfd88041f 54 mso-header-margin:.5in;
group-Avnet 0:478cfd88041f 55 mso-footer-margin:.5in;
group-Avnet 0:478cfd88041f 56 mso-paper-source:0;}
group-Avnet 0:478cfd88041f 57 div.Section1
group-Avnet 0:478cfd88041f 58 {page:Section1;}
group-Avnet 0:478cfd88041f 59 -->
group-Avnet 0:478cfd88041f 60 </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
group-Avnet 0:478cfd88041f 61 <meta content="MCD Application Team" name="author"></head><body link="blue" vlink="blue">
group-Avnet 0:478cfd88041f 62 <div class="Section1">
group-Avnet 0:478cfd88041f 63 <p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
group-Avnet 0:478cfd88041f 64 </o:p></span></p>
group-Avnet 0:478cfd88041f 65 <div align="center">
group-Avnet 0:478cfd88041f 66 <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
group-Avnet 0:478cfd88041f 67 <tbody>
group-Avnet 0:478cfd88041f 68 <tr>
group-Avnet 0:478cfd88041f 69 <td style="padding: 0cm;" valign="top">
group-Avnet 0:478cfd88041f 70 <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
group-Avnet 0:478cfd88041f 71 <tbody>
group-Avnet 0:478cfd88041f 72 <tr>
group-Avnet 0:478cfd88041f 73 <td style="vertical-align: top;">
group-Avnet 0:478cfd88041f 74 <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
group-Avnet 0:478cfd88041f 75 </td>
group-Avnet 0:478cfd88041f 76 </tr>
group-Avnet 0:478cfd88041f 77 <tr style="">
group-Avnet 0:478cfd88041f 78 <td style="padding: 1.5pt;">
group-Avnet 0:478cfd88041f 79 <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
group-Avnet 0:478cfd88041f 80 Notes for SPIRIT1 Driver</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
group-Avnet 0:478cfd88041f 81 <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
group-Avnet 0:478cfd88041f 82 2014 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
group-Avnet 0:478cfd88041f 83 <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
group-Avnet 0:478cfd88041f 84 </td>
group-Avnet 0:478cfd88041f 85 </tr>
group-Avnet 0:478cfd88041f 86 </tbody>
group-Avnet 0:478cfd88041f 87 </table>
group-Avnet 0:478cfd88041f 88 <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
group-Avnet 0:478cfd88041f 89 <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
group-Avnet 0:478cfd88041f 90 <tbody>
group-Avnet 0:478cfd88041f 91 <tr style="">
group-Avnet 0:478cfd88041f 92 <td style="padding: 0cm;" valign="top">
group-Avnet 0:478cfd88041f 93 <span style="font-family: &quot;Times New Roman&quot;;">
group-Avnet 0:478cfd88041f 94 </span>
group-Avnet 0:478cfd88041f 95 <h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
group-Avnet 0:478cfd88041f 96 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 97 <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V3.0.1
group-Avnet 0:478cfd88041f 98 / 10-Oct-2014</span></h3>
group-Avnet 0:478cfd88041f 99 <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
group-Avnet 0:478cfd88041f 100 Changes<o:p></o:p></span></u></b></p>
group-Avnet 0:478cfd88041f 101 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 102 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 103 <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 104 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 105 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 106 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 107 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 108 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 109 <span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 110 <ul style="list-style-type: square;">
group-Avnet 0:478cfd88041f 111 <li><span style="font-size: 10pt; font-family: Verdana;">First
group-Avnet 0:478cfd88041f 112 official release.</span><span style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline ! important; float: none;"></span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span></li>
group-Avnet 0:478cfd88041f 113 </ul>
group-Avnet 0:478cfd88041f 114 <span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span>
group-Avnet 0:478cfd88041f 115 <h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span><br>
group-Avnet 0:478cfd88041f 116 </h2>
group-Avnet 0:478cfd88041f 117
group-Avnet 0:478cfd88041f 118
group-Avnet 0:478cfd88041f 119 <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at:</span><br><br>
group-Avnet 0:478cfd88041f 120
group-Avnet 0:478cfd88041f 121
group-Avnet 0:478cfd88041f 122 <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><center>
group-Avnet 0:478cfd88041f 123 <a href=http://www.st.com/software_license_agreement_liberty_v2> http://www.st.com/software_license_agreement_liberty_v2</a></center></span><br><br>
group-Avnet 0:478cfd88041f 124
group-Avnet 0:478cfd88041f 125 <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Unless required by applicable law or agreed to in writing, software
group-Avnet 0:478cfd88041f 126 distributed under the License is distributed on an "AS IS" BASIS,
group-Avnet 0:478cfd88041f 127 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
group-Avnet 0:478cfd88041f 128 See the License for the specific language governing permissions and
group-Avnet 0:478cfd88041f 129 limitations under the License.
group-Avnet 0:478cfd88041f 130 </a></span>
group-Avnet 0:478cfd88041f 131
group-Avnet 0:478cfd88041f 132 </font>
group-Avnet 0:478cfd88041f 133
group-Avnet 0:478cfd88041f 134
group-Avnet 0:478cfd88041f 135 <p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
group-Avnet 0:478cfd88041f 136 <b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
group-Avnet 0:478cfd88041f 137 <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
group-Avnet 0:478cfd88041f 138 <hr align="center" size="2" width="100%"></span></div>
group-Avnet 0:478cfd88041f 139 <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
group-Avnet 0:478cfd88041f 140 complete documentation on</span><span style="font-size: 10pt; font-family: Verdana;"><span style="color: black;">&nbsp;SPIRIT1 Driver
group-Avnet 0:478cfd88041f 141 visit </span><u><span style="color: blue;"><a href="http://www.st.com/web/catalog/sense_power/FM1968/CL1976/SC1845/PF253167" target="_blank">www.st.com/SPIRIT1</a></span></u></span><span style="font-size: 10pt; font-family: Verdana;"><a target="_blank" href="http://www.st.com/web/catalog/sense_power/FM1968/CL1976/SC1898/PF258646"><u><span style="color: blue;"></span></u></a></span><span style="font-size: 10pt; font-family: Verdana;"><u><span style="color: blue;"></span></u></span><span style="color: black;"><o:p></o:p></span></p>
group-Avnet 0:478cfd88041f 142 </td>
group-Avnet 0:478cfd88041f 143 </tr>
group-Avnet 0:478cfd88041f 144 </tbody>
group-Avnet 0:478cfd88041f 145 </table>
group-Avnet 0:478cfd88041f 146 <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
group-Avnet 0:478cfd88041f 147 </td>
group-Avnet 0:478cfd88041f 148 </tr>
group-Avnet 0:478cfd88041f 149 </tbody>
group-Avnet 0:478cfd88041f 150 </table>
group-Avnet 0:478cfd88041f 151 </div>
group-Avnet 0:478cfd88041f 152 <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
group-Avnet 0:478cfd88041f 153 </div>
group-Avnet 0:478cfd88041f 154 </body></html>