diff --git a/features/cellular/easy_cellular/CellularConnectionFSM.cpp b/features/cellular/easy_cellular/CellularConnectionFSM.cpp index 1c39e133ea..502ab5afba 100644 --- a/features/cellular/easy_cellular/CellularConnectionFSM.cpp +++ b/features/cellular/easy_cellular/CellularConnectionFSM.cpp @@ -38,7 +38,6 @@ namespace mbed { static events::EventQueue at_queue(8 * EVENTS_EVENT_SIZE); static CELLULAR_DEVICE cellularDevice(at_queue); -static char device_info_buf[2048]; CellularConnectionFSM::CellularConnectionFSM() : _serial(0), _state(STATE_INIT), _next_state(_state), _status_callback(0), _network(0), _power(0), _sim(0), _queue( @@ -160,6 +159,7 @@ bool CellularConnectionFSM::open_sim() void CellularConnectionFSM::device_ready() { CellularInformation *info = _cellularDevice->open_information(_serial); + char device_info_buf[2048]; // may be up to 2048 according to 3GPP if (info->get_manufacturer(device_info_buf, sizeof(device_info_buf)) == NSAPI_ERROR_OK) { tr_info("Cellular device manufacturer: %s", device_info_buf); diff --git a/features/cellular/framework/AT/ATHandler.cpp b/features/cellular/framework/AT/ATHandler.cpp index 2caa9d71e5..13b5f4e2d6 100644 --- a/features/cellular/framework/AT/ATHandler.cpp +++ b/features/cellular/framework/AT/ATHandler.cpp @@ -31,8 +31,7 @@ using namespace events; //#define MBED_TRACE_MAX_LEVEL TRACE_LEVEL_DEBUG #include "CellularLog.h" -// this is intentionally TRACE_LEVEL_INFO -#if MBED_TRACE_MAX_LEVEL >= TRACE_LEVEL_INFO +#if MBED_CONF_MBED_TRACE_ENABLE #define at_debug(format, ...) do { if (_debug_on) debug(format, ## __VA_ARGS__); } while (0) #else #define at_debug(...) @@ -78,11 +77,7 @@ ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char _urc_matched(false), _error_found(false), _max_resp_length(MAX_RESP_LENGTH), -#if MBED_TRACE_MAX_LEVEL == TRACE_LEVEL_DEBUG - _debug_on(true), -#else _debug_on(false), -#endif _cmd_start(false) { //enable_debug(true); diff --git a/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.cpp b/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.cpp index 6c823a383b..fbd111eff7 100644 --- a/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.cpp +++ b/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.cpp @@ -12,8 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include "OnboardCellularInterface.h" +#ifndef CELLULAR_DEVICE + #if MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE #include "onboard_modem_api.h" @@ -52,3 +55,5 @@ void OnboardCellularInterface::modem_power_down() ::onboard_modem_power_down(); } #endif + +#endif // CELLULAR_DEVICE diff --git a/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h b/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h index 1adc085e74..db3d651dc8 100644 --- a/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h +++ b/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h @@ -16,7 +16,10 @@ #ifndef ONBOARD_CELLULAR_INTERFACE_ #define ONBOARD_CELLULAR_INTERFACE_ -#if MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE +#include "EasyCellularConnection.h" +#ifdef CELLULAR_DEVICE +typedef mbed::EasyCellularConnection OnboardCellularInterface; +#elif MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE #include "UARTCellularInterface.h"