Skip to content

Commit 6bd28ec

Browse files
committed
Remove string literal values and revert back to using CTX macro .
The previous fix to replace CTX with string literals was the wrong solution. All that was actually required was to insert a space before the macro.
1 parent 0132d31 commit 6bd28ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static bool set_CNMI(ATCmdParser *at)
110110
// New SMS indication configuration
111111
// set AT+CMTI=[mode, index] , 0 PDU mode, 1 text mode
112112
// Multiple URCs for SMS, i.e., CMT, CMTI, UCMT, CBMI, CDSI as DTE could be following any of these SMS formats
113-
bool success = at->send("AT+CNMI=2,""1") && at->recv("OK");
113+
bool success = at->send("AT+CNMI=2," CTX) && at->recv("OK");
114114
return success;
115115
}
116116

@@ -141,7 +141,7 @@ static void CMT_URC(ATCmdParser *at)
141141

142142
static bool set_atd(ATCmdParser *at)
143143
{
144-
bool success = at->send("ATD*99***""1""#") && at->recv("CONNECT");
144+
bool success = at->send("ATD*99***" CTX"#") && at->recv("CONNECT");
145145

146146
return success;
147147
}
@@ -469,7 +469,7 @@ nsapi_error_t PPPCellularInterface::setup_context_and_credentials()
469469
#endif
470470
success = _at->send("AT"
471471
"+FCLASS=0;" // set to connection (ATD) to data mode
472-
"+CGDCONT=""1"",\"%s\",\"%s%s\"",
472+
"+CGDCONT=" CTX",\"%s\",\"%s%s\"",
473473
pdp_type, auth, _apn
474474
)
475475
&& _at->recv("OK");

0 commit comments

Comments
 (0)