Merge pull request #11772 from u-blox/ubx_context

Cellular: updated cellular context flags and cid in ublox-api
pull/11828/head
Martin Kojtal 2019-11-04 09:57:08 +01:00 committed by GitHub
commit f59d71f0b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -56,6 +56,13 @@ void UBLOX_AT_CellularContext::do_connect()
#ifndef TARGET_UBLOX_C030_R41XM
_cb_data.error = define_context();
#elif TARGET_UBLOX_C030_R410M
_at.cmd_start_stop("+CGACT", "?");
_at.resp_start("+CGACT:");
_cid = _at.read_int();
_at.skip_param(1);
_at.resp_stop();
_is_connected = true;
_is_context_active = true;
_is_context_activated = true;
_cb_data.error = NSAPI_ERROR_OK;
@ -74,11 +81,19 @@ void UBLOX_AT_CellularContext::do_connect()
_at.restore_at_timeout();
if (_is_context_activated == true) {
_cid = 1;
_is_connected = true;
_is_context_active = true;
_cb_data.error = NSAPI_ERROR_OK;
}
}
} else if (rat == CellularNetwork::RadioAccessTechnology::RAT_CATM1 || rat == CellularNetwork::RadioAccessTechnology::RAT_NB1) {
_at.cmd_start_stop("+CGACT", "?");
_at.resp_start("+CGACT:");
_cid = _at.read_int();
_at.skip_param(1);
_at.resp_stop();
_is_connected = true;
_is_context_active = true;
_is_context_activated = true;
_cb_data.error = NSAPI_ERROR_OK;