Skip to content

Cellular: Support Cinterion EHS5-E cellular module #10100

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 5 commits into from
Mar 17, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -56,7 +56,7 @@ nsapi_error_t GEMALTO_CINTERION::init()
if (!information) {
return NSAPI_ERROR_NO_MEMORY;
}
char model[sizeof("ELS61") + 1]; // sizeof need to be long enough to hold just the model text
char model[sizeof("EHS5-E") + 1]; // sizeof need to be long enough to hold just the model text
nsapi_error_t ret = information->get_model(model, sizeof(model));
close_information();
if (ret != NSAPI_ERROR_OK) {
Expand All @@ -70,6 +70,8 @@ nsapi_error_t GEMALTO_CINTERION::init()
init_module_bgs2();
} else if (memcmp(model, "EMS31", sizeof("EMS31") - 1) == 0) {
init_module_ems31();
} else if (memcmp(model, "EHS5-E", sizeof("EHS5-E") - 1) == 0) {
init_module_ehs5e();
} else {
tr_error("Cinterion model unsupported %s", model);
return NSAPI_ERROR_UNSUPPORTED;
Expand Down Expand Up @@ -147,6 +149,23 @@ void GEMALTO_CINTERION::init_module_ems31()
_module = ModuleEMS31;
}

void GEMALTO_CINTERION::init_module_ehs5e()
{
// EHS5-E
static const intptr_t cellular_properties[AT_CellularBase::PROPERTY_MAX] = {
AT_CellularNetwork::RegistrationModeDisable, // C_GREG

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be like below due to EHS5-E seems to be:

  • 2G/3G modem
  • With support for IPv4 and IPv6 but not for dual-stack
        AT_CellularNetwork::RegistrationModeDisable,    // C_EREG
        AT_CellularNetwork::RegistrationModeLAC,    // C_GREG
        AT_CellularNetwork::RegistrationModeLAC,    // C_REG
...
        1,  // PROPERTY_IPV4_STACK
        1,  // PROPERTY_IPV6_STACK
        0,  // PROPERTY_IPV4V6_STACK

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right the registration modes need to be fixed. But i think the module does support dual stack mode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About dual-stack, according to ehs5-e_atc_v03001.pdf connection must be GPRS0 or GPRS6 and the current driver creates only one internet connection so it can't handle dual-stack yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, im going to disable it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghseb not for ModuleEMS31 :)

AT_CellularNetwork::RegistrationModeDisable, // C_REG
1, // AT_CGSN_WITH_TYPE
1, // AT_CGDATA
1, // AT_CGAUTH
1, // PROPERTY_IPV4_STACK
1, // PROPERTY_IPV6_STACK
1, // PROPERTY_IPV4V6_STACK
};
AT_CellularBase::set_cellular_properties(cellular_properties);
_module = ModuleEHS5E;
}

#if MBED_CONF_GEMALTO_CINTERION_PROVIDE_DEFAULT
#include "UARTSerial.h"
CellularDevice *CellularDevice::get_default_instance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
ModuleELS61,
ModuleBGS2,
ModuleEMS31,
ModuleEHS5E,
};
static Module get_module();

Expand All @@ -59,6 +60,7 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
void init_module_bgs2();
void init_module_els61();
void init_module_ems31();
void init_module_ehs5e();
};

} // namespace mbed
Expand Down