mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10100 from ghseb/support-ehs5-e
Cellular: Support Cinterion EHS5-E cellular modulepull/10081/head
commit
05f18fc7f6
|
@ -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,24 @@ 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_EREG
|
||||
AT_CellularNetwork::RegistrationModeLAC, // C_GREG
|
||||
AT_CellularNetwork::RegistrationModeLAC, // C_REG
|
||||
0, // AT_CGSN_WITH_TYPE
|
||||
1, // AT_CGDATA
|
||||
1, // AT_CGAUTH
|
||||
1, // PROPERTY_IPV4_STACK
|
||||
1, // PROPERTY_IPV6_STACK
|
||||
0, // 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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue