Skip to content

Commit 05f18fc

Browse files
author
Cruz Monrreal
authored
Merge pull request #10100 from ghseb/support-ehs5-e
Cellular: Support Cinterion EHS5-E cellular module
2 parents c81a292 + 744e648 commit 05f18fc

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ nsapi_error_t GEMALTO_CINTERION::init()
5656
if (!information) {
5757
return NSAPI_ERROR_NO_MEMORY;
5858
}
59-
char model[sizeof("ELS61") + 1]; // sizeof need to be long enough to hold just the model text
59+
char model[sizeof("EHS5-E") + 1]; // sizeof need to be long enough to hold just the model text
6060
nsapi_error_t ret = information->get_model(model, sizeof(model));
6161
close_information();
6262
if (ret != NSAPI_ERROR_OK) {
@@ -70,6 +70,8 @@ nsapi_error_t GEMALTO_CINTERION::init()
7070
init_module_bgs2();
7171
} else if (memcmp(model, "EMS31", sizeof("EMS31") - 1) == 0) {
7272
init_module_ems31();
73+
} else if (memcmp(model, "EHS5-E", sizeof("EHS5-E") - 1) == 0) {
74+
init_module_ehs5e();
7375
} else {
7476
tr_error("Cinterion model unsupported %s", model);
7577
return NSAPI_ERROR_UNSUPPORTED;
@@ -147,6 +149,24 @@ void GEMALTO_CINTERION::init_module_ems31()
147149
_module = ModuleEMS31;
148150
}
149151

152+
void GEMALTO_CINTERION::init_module_ehs5e()
153+
{
154+
// EHS5-E
155+
static const intptr_t cellular_properties[AT_CellularBase::PROPERTY_MAX] = {
156+
AT_CellularNetwork::RegistrationModeDisable, // C_EREG
157+
AT_CellularNetwork::RegistrationModeLAC, // C_GREG
158+
AT_CellularNetwork::RegistrationModeLAC, // C_REG
159+
0, // AT_CGSN_WITH_TYPE
160+
1, // AT_CGDATA
161+
1, // AT_CGAUTH
162+
1, // PROPERTY_IPV4_STACK
163+
1, // PROPERTY_IPV6_STACK
164+
0, // PROPERTY_IPV4V6_STACK
165+
};
166+
AT_CellularBase::set_cellular_properties(cellular_properties);
167+
_module = ModuleEHS5E;
168+
}
169+
150170
#if MBED_CONF_GEMALTO_CINTERION_PROVIDE_DEFAULT
151171
#include "UARTSerial.h"
152172
CellularDevice *CellularDevice::get_default_instance()

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
4343
ModuleELS61,
4444
ModuleBGS2,
4545
ModuleEMS31,
46+
ModuleEHS5E,
4647
};
4748
static Module get_module();
4849

@@ -59,6 +60,7 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
5960
void init_module_bgs2();
6061
void init_module_els61();
6162
void init_module_ems31();
63+
void init_module_ehs5e();
6264
};
6365

6466
} // namespace mbed

0 commit comments

Comments
 (0)