Skip to content

Cellular: move RAT reading to better support ublox custom boards #11191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ void UBLOX_AT_CellularContext::do_connect()
{
_at.lock();
_cb_data.error = NSAPI_ERROR_NO_CONNECTION;
CellularNetwork::RadioAccessTechnology rat = read_radio_technology();

// Attempt to establish a connection
#ifndef TARGET_UBLOX_C030_R41XM
Expand All @@ -59,6 +58,7 @@ void UBLOX_AT_CellularContext::do_connect()
_is_context_activated = true;
_cb_data.error = NSAPI_ERROR_OK;
#elif TARGET_UBLOX_C030_R412M
CellularNetwork::RadioAccessTechnology rat = read_radio_technology();
if (rat == CellularNetwork::RadioAccessTechnology::RAT_EGPRS) {
if (!_is_context_active) {
_at.set_at_timeout(150 * 1000);
Expand Down Expand Up @@ -345,6 +345,7 @@ CellularContext::AuthenticationType UBLOX_AT_CellularContext::get_auth()
return _authentication_type;
}

#ifdef TARGET_UBLOX_C030_R412M
CellularNetwork::RadioAccessTechnology UBLOX_AT_CellularContext::read_radio_technology()
{
int act;
Expand Down Expand Up @@ -382,5 +383,6 @@ CellularNetwork::RadioAccessTechnology UBLOX_AT_CellularContext::read_radio_tech

return rat;
}
#endif // #ifdef TARGET_UBLOX_C030_R412M

} /* namespace mbed */
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class UBLOX_AT_CellularContext: public AT_CellularContext {
/** Get the next set of credentials from the database.
*/
void get_next_credentials(char **config);

#ifdef TARGET_UBLOX_C030_R412M
CellularNetwork::RadioAccessTechnology read_radio_technology(void);

#endif
protected:
virtual NetworkStack *get_stack();

Expand Down