Skip to content

Commit f59d71f

Browse files
authored
Merge pull request #11772 from u-blox/ubx_context
Cellular: updated cellular context flags and cid in ublox-api
2 parents d3fb5fb + fa6c69c commit f59d71f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

features/cellular/framework/targets/UBLOX/AT/UBLOX_AT_CellularContext.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ void UBLOX_AT_CellularContext::do_connect()
5656
#ifndef TARGET_UBLOX_C030_R41XM
5757
_cb_data.error = define_context();
5858
#elif TARGET_UBLOX_C030_R410M
59+
_at.cmd_start_stop("+CGACT", "?");
60+
_at.resp_start("+CGACT:");
61+
_cid = _at.read_int();
62+
_at.skip_param(1);
63+
_at.resp_stop();
64+
65+
_is_connected = true;
5966
_is_context_active = true;
6067
_is_context_activated = true;
6168
_cb_data.error = NSAPI_ERROR_OK;
@@ -74,11 +81,19 @@ void UBLOX_AT_CellularContext::do_connect()
7481
_at.restore_at_timeout();
7582
if (_is_context_activated == true) {
7683
_cid = 1;
84+
_is_connected = true;
7785
_is_context_active = true;
7886
_cb_data.error = NSAPI_ERROR_OK;
7987
}
8088
}
8189
} else if (rat == CellularNetwork::RadioAccessTechnology::RAT_CATM1 || rat == CellularNetwork::RadioAccessTechnology::RAT_NB1) {
90+
_at.cmd_start_stop("+CGACT", "?");
91+
_at.resp_start("+CGACT:");
92+
_cid = _at.read_int();
93+
_at.skip_param(1);
94+
_at.resp_stop();
95+
96+
_is_connected = true;
8297
_is_context_active = true;
8398
_is_context_activated = true;
8499
_cb_data.error = NSAPI_ERROR_OK;

0 commit comments

Comments
 (0)