From 6e97d7edb65489d4c17d13d5ee09a262005d7e8e Mon Sep 17 00:00:00 2001 From: cedrick kukela Date: Fri, 22 Jun 2018 20:41:48 -0400 Subject: [PATCH] changes to support mts dragonfly nano ppp --- features/cellular/framework/AT/AT_CellularNetwork.cpp | 11 +++++++++++ features/cellular/framework/common/CellularTargets.h | 4 +++- .../targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/features/cellular/framework/AT/AT_CellularNetwork.cpp b/features/cellular/framework/AT/AT_CellularNetwork.cpp index 4c6a960c56..5451d5a6fa 100644 --- a/features/cellular/framework/AT/AT_CellularNetwork.cpp +++ b/features/cellular/framework/AT/AT_CellularNetwork.cpp @@ -388,6 +388,7 @@ nsapi_error_t AT_CellularNetwork::open_data_channel() { #if NSAPI_PPP_AVAILABLE tr_info("Open data channel in PPP mode"); +//<<<<<<< HEAD if (is_supported(AT_CGDATA)) { _at.cmd_start("AT+CGDATA=\"PPP\","); _at.write_int(_cid); @@ -397,6 +398,16 @@ nsapi_error_t AT_CellularNetwork::open_data_channel() std::sprintf(cmd_buf, "ATD*99***%d#", _cid); _at.cmd_start(cmd_buf); } +//======= +// +//#ifdef TARGET_MTS_DRAGONFLY_L471QG +// _at.cmd_start("ATD*99***1#"); +//#else +// _at.cmd_start("AT+CGDATA=\"PPP\","); +// _at.write_int(_cid); +//#endif +// +//>>>>>>> changes to support mts dragonfly nano ppp _at.cmd_stop(); _at.resp_start("CONNECT", true); diff --git a/features/cellular/framework/common/CellularTargets.h b/features/cellular/framework/common/CellularTargets.h index 5bfb1b45c1..79b6ad56b9 100644 --- a/features/cellular/framework/common/CellularTargets.h +++ b/features/cellular/framework/common/CellularTargets.h @@ -37,7 +37,9 @@ namespace mbed { #endif #elif TARGET_UBLOX_C027 #define CELLULAR_DEVICE UBLOX_PPP -#else +#elif TARGET_DRAGONFLY_L471QG +#define CELLULAR_DEVICE UBLOX_PPP +//#else //#error Cellular target not defined, see cellular/targets.h //#define CELLULAR_TARGET //#define MDMTXD diff --git a/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp index d996aec4ab..1c526f8eb3 100644 --- a/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp +++ b/features/cellular/framework/targets/UBLOX/PPP/UBLOX_PPP_CellularNetwork.cpp @@ -34,7 +34,15 @@ bool UBLOX_PPP_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_ AT_CellularNetwork::RegistrationMode UBLOX_PPP_CellularNetwork::has_registration(RegistrationType reg_type) { +//<<<<<<< HEAD return (reg_type == C_REG || reg_type == C_GREG) ? RegistrationModeLAC : RegistrationModeDisable; +//======= +//#ifdef TARGET_DRAGONFLY_L471QG +// return (reg_type == C_REG || reg_type == C_EREG); +//#else +// return (reg_type == C_REG || reg_type == C_GREG || reg_type == C_EREG); +//#endif +//>>>>>>> changes to support mts dragonfly nano ppp } nsapi_error_t UBLOX_PPP_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opRat)