Skip to content

Commit 9cbbf6e

Browse files
author
Mirela Chirica
committed
- Removed extra whitespaces from AT prefix definitions. The format is modem specific and AT handler is handling whitespaces in case they are present
- Reverted the "smaller thread stack size for dispatcher thread". 1KB is not enough, was causing CMSIS-RTOS error: Stack underflow.
1 parent 0e41da3 commit 9cbbf6e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

features/cellular/easy_cellular/CellularConnectionUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ nsapi_error_t CellularConnectionUtil::start_dispatch()
456456

457457
MBED_ASSERT(!_queue_thread);
458458

459-
_queue_thread = new rtos::Thread(osPriorityNormal, 1024);
459+
_queue_thread = new rtos::Thread;
460460
if (!_queue_thread) {
461461
stop();
462462
return NSAPI_ERROR_NO_MEMORY;

features/cellular/framework/AT/AT_CellularNetwork.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ nsapi_error_t AT_CellularNetwork::get_registration_status(RegistrationType type,
398398

399399
RegistrationType reg_types[] = { C_EREG, C_GREG, C_REG};
400400
const char *cmd[] = { "AT+CEREG", "AT+CGREG", "AT+CREG"};
401-
const char *rsp[] = { "+CEREG: ", "+CGREG: ", "+CREG: "};
401+
const char *rsp[] = { "+CEREG:", "+CGREG:", "+CREG:"};
402402

403403
const int LAC_LENGTH = 5, CELL_ID_LENGTH = 9;
404404
char lac_string[LAC_LENGTH] = {0}, cell_id_string[CELL_ID_LENGTH] = {0};
@@ -874,7 +874,7 @@ nsapi_error_t AT_CellularNetwork::get_operator_params(int &format, operator_t &o
874874
_at.cmd_start("AT+COPS?");
875875
_at.cmd_stop();
876876

877-
_at.resp_start("+COPS: ");
877+
_at.resp_start("+COPS:");
878878
_at.read_int(); //ignore mode
879879
format = _at.read_int();
880880

features/cellular/framework/AT/AT_CellularSMS.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ AT_CellularSMS::AT_CellularSMS(ATHandler &at) : AT_CellularBase(at), _cb(0), _mo
177177
_use_8bit_encoding(false), _sim_wait_time(0), _sms_message_ref_number(1), _sms_info(NULL)
178178
{
179179
/* URCs, handled out of band */
180-
_at.set_urc_handler("+CMTI: ", callback(this, &AT_CellularSMS::cmti_urc));
181-
_at.set_urc_handler("+CMT: ", callback(this, &AT_CellularSMS::cmt_urc));
180+
_at.set_urc_handler("+CMTI:", callback(this, &AT_CellularSMS::cmti_urc));
181+
_at.set_urc_handler("+CMT:", callback(this, &AT_CellularSMS::cmt_urc));
182182
}
183183

184184
AT_CellularSMS::~AT_CellularSMS()
@@ -457,7 +457,7 @@ nsapi_size_or_error_t AT_CellularSMS::send_sms(const char* phone_number, const c
457457
// <ctrl-Z> (IRA 26) must be used to indicate the ending of the message body.
458458
_at.cmd_start(CTRL_Z);
459459
_at.cmd_stop();
460-
_at.resp_start("+CMGS: ");
460+
_at.resp_start("+CMGS:");
461461
_at.resp_stop();
462462
}
463463
} else {
@@ -520,7 +520,7 @@ nsapi_size_or_error_t AT_CellularSMS::send_sms(const char* phone_number, const c
520520
// <ctrl-Z> (IRA 26) must be used to indicate the ending of the message body.
521521
_at.cmd_start(CTRL_Z);
522522
_at.cmd_stop();
523-
_at.resp_start("+CMGS: ");
523+
_at.resp_start("+CMGS:");
524524
_at.resp_stop();
525525
}
526526
free(pdu_str);
@@ -630,7 +630,7 @@ nsapi_size_or_error_t AT_CellularSMS::read_sms_from_index(int msg_index, char* b
630630
if (_at.get_last_error() == NSAPI_ERROR_OK) {
631631
char status[SMS_STATUS_SIZE];
632632
// first we read msg status and with that we can decide how the rest of message format
633-
_at.resp_start("+CMGR: ");
633+
_at.resp_start("+CMGR:");
634634

635635
if (_at.info_resp()) {
636636
_at.read_string(status, SMS_STATUS_SIZE);
@@ -678,7 +678,7 @@ nsapi_size_or_error_t AT_CellularSMS::read_sms(sms_info_t* sms, char* buf, char*
678678
_at.cmd_start("AT+CMGR=");
679679
_at.write_int(sms->msg_index[i]);
680680
_at.cmd_stop();
681-
_at.resp_start("+CMGR: ");
681+
_at.resp_start("+CMGR:");
682682

683683
if (_at.info_resp()) {
684684
status = _at.read_int();
@@ -1057,7 +1057,7 @@ nsapi_error_t AT_CellularSMS::list_messages()
10571057
int length = 0;
10581058
char *pdu = NULL;
10591059

1060-
_at.resp_start("+CMGL: ");
1060+
_at.resp_start("+CMGL:");
10611061
while (_at.info_resp()) {
10621062
info = new sms_info_t();
10631063
if (!info) {

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using namespace mbed;
2222

2323
QUECTEL_BG96_CellularStack::QUECTEL_BG96_CellularStack(ATHandler &atHandler, int cid, nsapi_ip_stack_t stack_type) : AT_CellularStack(atHandler, cid, stack_type)
2424
{
25-
_at.set_urc_handler("+QIURC: ", mbed::Callback<void()>(this, &QUECTEL_BG96_CellularStack::urc_qiurc));
25+
_at.set_urc_handler("+QIURC:", mbed::Callback<void()>(this, &QUECTEL_BG96_CellularStack::urc_qiurc));
2626
}
2727

2828
QUECTEL_BG96_CellularStack::~QUECTEL_BG96_CellularStack()

0 commit comments

Comments
 (0)