Skip to content

Commit 8767ab4

Browse files
authored
Merge pull request #11191 from jarvte/fix_ublox_board_support
Cellular: move RAT reading to better support ublox custom boards
2 parents de84004 + 6e71932 commit 8767ab4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ void UBLOX_AT_CellularContext::do_connect()
4949
{
5050
_at.lock();
5151
_cb_data.error = NSAPI_ERROR_NO_CONNECTION;
52-
CellularNetwork::RadioAccessTechnology rat = read_radio_technology();
5352

5453
// Attempt to establish a connection
5554
#ifndef TARGET_UBLOX_C030_R41XM
@@ -59,6 +58,7 @@ void UBLOX_AT_CellularContext::do_connect()
5958
_is_context_activated = true;
6059
_cb_data.error = NSAPI_ERROR_OK;
6160
#elif TARGET_UBLOX_C030_R412M
61+
CellularNetwork::RadioAccessTechnology rat = read_radio_technology();
6262
if (rat == CellularNetwork::RadioAccessTechnology::RAT_EGPRS) {
6363
if (!_is_context_active) {
6464
_at.set_at_timeout(150 * 1000);
@@ -345,6 +345,7 @@ CellularContext::AuthenticationType UBLOX_AT_CellularContext::get_auth()
345345
return _authentication_type;
346346
}
347347

348+
#ifdef TARGET_UBLOX_C030_R412M
348349
CellularNetwork::RadioAccessTechnology UBLOX_AT_CellularContext::read_radio_technology()
349350
{
350351
int act;
@@ -382,5 +383,6 @@ CellularNetwork::RadioAccessTechnology UBLOX_AT_CellularContext::read_radio_tech
382383

383384
return rat;
384385
}
386+
#endif // #ifdef TARGET_UBLOX_C030_R412M
385387

386388
} /* namespace mbed */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class UBLOX_AT_CellularContext: public AT_CellularContext {
4545
/** Get the next set of credentials from the database.
4646
*/
4747
void get_next_credentials(char **config);
48-
48+
#ifdef TARGET_UBLOX_C030_R412M
4949
CellularNetwork::RadioAccessTechnology read_radio_technology(void);
50-
50+
#endif
5151
protected:
5252
virtual NetworkStack *get_stack();
5353

0 commit comments

Comments
 (0)