From 30ea858f5125f6da701387a7fec9181ee499d5ff Mon Sep 17 00:00:00 2001 From: Antti Kauppila Date: Fri, 29 Nov 2019 11:07:50 +0200 Subject: [PATCH] Disable APN lookup by default --- features/cellular/framework/AT/AT_CellularContext.cpp | 10 ++++------ features/cellular/mbed_lib.json | 2 +- features/netsocket/cellular/mbed_lib.json | 9 --------- 3 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 features/netsocket/cellular/mbed_lib.json diff --git a/features/cellular/framework/AT/AT_CellularContext.cpp b/features/cellular/framework/AT/AT_CellularContext.cpp index 89112f0a87..c72ce6711a 100644 --- a/features/cellular/framework/AT/AT_CellularContext.cpp +++ b/features/cellular/framework/AT/AT_CellularContext.cpp @@ -36,12 +36,10 @@ #include "nsapi_ppp.h" #endif -#define USE_APN_LOOKUP (MBED_CONF_CELLULAR_USE_APN_LOOKUP || (NSAPI_PPP_AVAILABLE && MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP)) - -#if USE_APN_LOOKUP +#if MBED_CONF_CELLULAR_USE_APN_LOOKUP #include "CellularInformation.h" #include "APN_db.h" -#endif //USE_APN_LOOKUP +#endif //MBED_CONF_CELLULAR_USE_APN_LOOKUP using namespace mbed_cellular_util; using namespace mbed; @@ -917,7 +915,7 @@ void AT_CellularContext::cellular_callback(nsapi_event_t ev, intptr_t ptr) _semaphore.release(); } } -#if USE_APN_LOOKUP +#if MBED_CONF_CELLULAR_USE_APN_LOOKUP if (st == CellularSIMStatusChanged && data->status_data == CellularDevice::SimStateReady && _cb_data.error == NSAPI_ERROR_OK) { if (!_apn) { @@ -946,7 +944,7 @@ void AT_CellularContext::cellular_callback(nsapi_event_t ev, intptr_t ptr) _device->close_information(); } } -#endif // USE_APN_LOOKUP +#endif // MBED_CONF_CELLULAR_USE_APN_LOOKUP if (!_nw && st == CellularDeviceReady && _cb_data.error == NSAPI_ERROR_OK) { _nw = _device->open_network(_fh); diff --git a/features/cellular/mbed_lib.json b/features/cellular/mbed_lib.json index ca4dfcaf58..bf0e85328d 100644 --- a/features/cellular/mbed_lib.json +++ b/features/cellular/mbed_lib.json @@ -3,7 +3,7 @@ "config": { "use-apn-lookup": { "help": "Use APN database lookup", - "value": true + "value": false }, "use-sms": { "help": "Enable or disable SMS functionality in Cellular stack.", diff --git a/features/netsocket/cellular/mbed_lib.json b/features/netsocket/cellular/mbed_lib.json deleted file mode 100644 index 542221e609..0000000000 --- a/features/netsocket/cellular/mbed_lib.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "ppp-cell-iface", - "config": { - "baud-rate": 115200, - "apn-lookup": true, - "at-parser-buffer-size": 256, - "at-parser-timeout": 8000 - } -} \ No newline at end of file