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 # pack-refs with: peeled
group-Avnet 0:478cfd88041f 2 a2d72a667b7ed3ac4e70ae743fd3c02a6e02afda refs/remotes/origin/alpha2-release
group-Avnet 0:478cfd88041f 3 d11d8a2564ef5f946c99f8003533caea13599d7b refs/remotes/origin/alpha3-release
group-Avnet 0:478cfd88041f 4 6a5156bea2dc8981a7efd86bcdf341dc398307e3 refs/remotes/origin/dep_update
group-Avnet 0:478cfd88041f 5 dc0c089e6782d66f3ef379736f3062afae708ef2 refs/remotes/origin/eui_chip_check
group-Avnet 0:478cfd88041f 6 1bf67eedce0f85a16376876670d525144d887892 refs/remotes/origin/eui_mac_chip_check
group-Avnet 0:478cfd88041f 7 b4357d79d7421a7e2bb629c7e22eff8f109054e7 refs/remotes/origin/feature_cmsis5
group-Avnet 0:478cfd88041f 8 f29a7aaefdba350fee57572a7d56bba66a87464e refs/remotes/origin/fhss_dev
group-Avnet 0:478cfd88041f 9 06296efdcc38e2719895af98e1f5ec911a1f00f8 refs/remotes/origin/mac_class_update
group-Avnet 0:478cfd88041f 10 a41e721bbb81e4e15b812909cd36005a000b03f9 refs/remotes/origin/maint_merge
group-Avnet 0:478cfd88041f 11 57f22763f4d3649d4ac0b1df1f568f4cc45e491a refs/remotes/origin/master
group-Avnet 0:478cfd88041f 12 b73c78b4f8ccbfa3295fd419173ce576ff9ddcf6 refs/remotes/origin/morpheus_dependency
group-Avnet 0:478cfd88041f 13 248d04582db6ba2db423cf8eb4e3535d5ef4cb72 refs/remotes/origin/ns_minar_take2
group-Avnet 0:478cfd88041f 14 a36e17a728732268b404fc727940257830e208ac refs/remotes/origin/retries
group-Avnet 0:478cfd88041f 15 a729202ba68a7537e4bdbea5f6d91d1522280ccd refs/remotes/origin/spi_timing_fix
group-Avnet 0:478cfd88041f 16 a82eda14afc4bd57c0574d0d58443d4aa4dddf31 refs/remotes/origin/thread_start_cond
group-Avnet 0:478cfd88041f 17 37e636728520d0d6d4e6caafff5e36962e5ceec0 refs/remotes/origin/update_mbed_dep
group-Avnet 0:478cfd88041f 18 0f7255a79b69c09469f4b3377513a39a9e6b25f5 refs/remotes/origin/v1.0-maint
group-Avnet 0:478cfd88041f 19 a7ff1a1ea2b3060139a345a09b72bdbf244cf4dc refs/remotes/origin/v2.1-maint
group-Avnet 0:478cfd88041f 20 453e4e2324d1d634dad87b1e107a1bc762c8ff2f refs/tags/beta-release
group-Avnet 0:478cfd88041f 21 a16a4ed6f6e8d5f2d009f25b6ab7c38affb5019c refs/tags/mbed-os-5.1.0-rc3
group-Avnet 0:478cfd88041f 22 a16a4ed6f6e8d5f2d009f25b6ab7c38affb5019c refs/tags/mbed-os-5.1.0-rc4
group-Avnet 0:478cfd88041f 23 a2d72a667b7ed3ac4e70ae743fd3c02a6e02afda refs/tags/mbedOS-alpha2
group-Avnet 0:478cfd88041f 24 4d2d328030c538a15cde01baa6c6e8f15ba7e0f4 refs/tags/mbedos-16.01-release
group-Avnet 0:478cfd88041f 25 4d2d328030c538a15cde01baa6c6e8f15ba7e0f4 refs/tags/mbedos-16.03-release
group-Avnet 0:478cfd88041f 26 4a7b2df89566412ab1f78c34acd66e114c210965 refs/tags/mbedos-2016q1-oob1
group-Avnet 0:478cfd88041f 27 4a7b2df89566412ab1f78c34acd66e114c210965 refs/tags/mbedos-2016q1-oob2
group-Avnet 0:478cfd88041f 28 4d2d328030c538a15cde01baa6c6e8f15ba7e0f4 refs/tags/mbedos-2016q1-oob3
group-Avnet 0:478cfd88041f 29 dcd91e50e2cef8a8944ec4acc30a9186fd250838 refs/tags/mbedos-release-15-11
group-Avnet 0:478cfd88041f 30 083d0d49ede86c2bf6417bf0a951ff37e497480c refs/tags/mbedos-techcon-oob2
group-Avnet 0:478cfd88041f 31 cf743c8ed7a61cd9217d010415b872629afa92ca refs/tags/v0.0.10
group-Avnet 0:478cfd88041f 32 d11d8a2564ef5f946c99f8003533caea13599d7b refs/tags/v0.0.11
group-Avnet 0:478cfd88041f 33 3b4d57bc558e26d357280c56908a2e0a211541dc refs/tags/v0.0.12
group-Avnet 0:478cfd88041f 34 7ee6cb249980d2b9f4e18744273ddd4da446e43b refs/tags/v0.0.13
group-Avnet 0:478cfd88041f 35 0ab8f39aebb09c3d57b1b612f562c5f2ea8e8217 refs/tags/v0.0.14
group-Avnet 0:478cfd88041f 36 ^607843bac2c6677f69805fa45b169a9f4a89147c
group-Avnet 0:478cfd88041f 37 5ddc1deddcabe511d9e92d82ba2943d4ab272901 refs/tags/v0.0.15
group-Avnet 0:478cfd88041f 38 ^f2fa5831d8d80deaeff177fffb628c06f5e3f4ce
group-Avnet 0:478cfd88041f 39 1b68214c528ef2fa41827292d0a8b919f530d4e6 refs/tags/v0.0.16
group-Avnet 0:478cfd88041f 40 ^60256bb25d369570403ca27e752a6847b35b1424
group-Avnet 0:478cfd88041f 41 761c9ed3ee0e01563a1fa4783c03f3d4b40eb87b refs/tags/v0.0.18
group-Avnet 0:478cfd88041f 42 ^f245f7ae3556436d017827d097904d85f8d7061c
group-Avnet 0:478cfd88041f 43 83e3d05272235be8e2fbd671ecd0489f05974dd0 refs/tags/v0.0.19
group-Avnet 0:478cfd88041f 44 ^7d53d340711421f2ceffa43bbc036530c1cab6d3
group-Avnet 0:478cfd88041f 45 4b57c221f603ec186f2939d25c17481954468ca4 refs/tags/v0.0.20
group-Avnet 0:478cfd88041f 46 ^ec465a0701cf62542dea77b6a4933adcb3275028
group-Avnet 0:478cfd88041f 47 66cb6974dd688bb99be556ff87305a99cf6ff584 refs/tags/v0.0.21
group-Avnet 0:478cfd88041f 48 ^453e4e2324d1d634dad87b1e107a1bc762c8ff2f
group-Avnet 0:478cfd88041f 49 a8ed93388a3952da5c2a15d1bda443f092afb746 refs/tags/v0.0.22
group-Avnet 0:478cfd88041f 50 ^a293db7a32e00d4e96e2c0af3692c047d2126037
group-Avnet 0:478cfd88041f 51 05edb4fd8c8503181aa07c2cad5ab262d748cb27 refs/tags/v0.0.23
group-Avnet 0:478cfd88041f 52 ^d57710cdad5df1e55af0a1be179b98a6e59c4ebd
group-Avnet 0:478cfd88041f 53 844097fe55cfcc3658bed3452469137badca2798 refs/tags/v0.0.24
group-Avnet 0:478cfd88041f 54 ^6269d5ea5e313b33f011ece34318ecac79d6a626
group-Avnet 0:478cfd88041f 55 876b12b8b4f2bbe9399345259b68259d33d59909 refs/tags/v0.0.25
group-Avnet 0:478cfd88041f 56 ^4614966ca81530bc1fb376062af078c120f24241
group-Avnet 0:478cfd88041f 57 1874e9cf58468a41e25450dcffeb0e0ca08d9ca6 refs/tags/v0.0.8
group-Avnet 0:478cfd88041f 58 cc0a6379a081f4fddc1dc98e96f1bc7c4573115c refs/tags/v0.0.9
group-Avnet 0:478cfd88041f 59 9b2561ff19aa36d2176cae99d05e883ddabcb70a refs/tags/v1.0.0
group-Avnet 0:478cfd88041f 60 ^083d0d49ede86c2bf6417bf0a951ff37e497480c
group-Avnet 0:478cfd88041f 61 303705bca8f05d221c1f2a44290d46147af52b6f refs/tags/v1.0.1
group-Avnet 0:478cfd88041f 62 ^dcd91e50e2cef8a8944ec4acc30a9186fd250838
group-Avnet 0:478cfd88041f 63 755358c39f9484546ef1330932e63d430550c825 refs/tags/v1.0.2
group-Avnet 0:478cfd88041f 64 ^efe496dcf42e2eed98f6d70c33f8d6bd7cfd430e
group-Avnet 0:478cfd88041f 65 eeb91783261991c06f0541a547ccea44afea7370 refs/tags/v1.0.3
group-Avnet 0:478cfd88041f 66 ^0f7255a79b69c09469f4b3377513a39a9e6b25f5
group-Avnet 0:478cfd88041f 67 b17a8d9177c6985379176ffa41cb836632644162 refs/tags/v2.0.0
group-Avnet 0:478cfd88041f 68 ^a7a63cfea3492f9693f1904cda264b99037fe475
group-Avnet 0:478cfd88041f 69 8a6fb2273f4b1cbd9b6b6cb7d4aa58774f06a0be refs/tags/v2.0.1
group-Avnet 0:478cfd88041f 70 ^232e2508475626865679b5b4e43e21f19e2d2b88
group-Avnet 0:478cfd88041f 71 91c188f0c616ce47b5d1d832bed97aeb5cc02384 refs/tags/v2.0.2
group-Avnet 0:478cfd88041f 72 ^4a7b2df89566412ab1f78c34acd66e114c210965
group-Avnet 0:478cfd88041f 73 ca1cad744508e1abc981b4dbd359401385b4da75 refs/tags/v2.0.3
group-Avnet 0:478cfd88041f 74 ^41441226a87109a7405e4c8ba048311484a4b1c4
group-Avnet 0:478cfd88041f 75 d382c3d7e1a3656176bbf1d05180928cded5217d refs/tags/v2.1.0
group-Avnet 0:478cfd88041f 76 ^4d2d328030c538a15cde01baa6c6e8f15ba7e0f4
group-Avnet 0:478cfd88041f 77 17393a1acefd268c75c0376aaa24c3ae6617f2f3 refs/tags/v2.1.1
group-Avnet 0:478cfd88041f 78 ^a7ff1a1ea2b3060139a345a09b72bdbf244cf4dc
group-Avnet 0:478cfd88041f 79 c81741ac293409229df9c2343398016205797eae refs/tags/v3.0.0
group-Avnet 0:478cfd88041f 80 ^50889f6c316d0b80520c781841f053b3a8aa8cd3
group-Avnet 0:478cfd88041f 81 b13508e3cd625d723a153d10626bdd3b342382f7 refs/tags/v3.0.1
group-Avnet 0:478cfd88041f 82 ^3de9de8fa23b2a699cef382dd49e7f9a1dec6e5d
group-Avnet 0:478cfd88041f 83 80b2af683c02ca10f40917dcf60dc0e5973504d8 refs/tags/v3.0.2
group-Avnet 0:478cfd88041f 84 ^160ce634ac16723c18bb2be61f1ed21c776252c9