diff --git a/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.cpp b/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.cpp index 3b21c90c75..a2190872d0 100644 --- a/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.cpp +++ b/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.cpp @@ -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) { @@ -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; @@ -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 + 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() diff --git a/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.h b/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.h index d02fbf102f..e5013f3d13 100644 --- a/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.h +++ b/features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.h @@ -43,6 +43,7 @@ public: ModuleELS61, ModuleBGS2, ModuleEMS31, + ModuleEHS5E, }; static Module get_module(); @@ -59,6 +60,7 @@ private: void init_module_bgs2(); void init_module_els61(); void init_module_ems31(); + void init_module_ehs5e(); }; } // namespace mbed