mirror of https://github.com/ARMmbed/mbed-os.git
Support Cinterion EHS5-E cellular module
parent
943254c78c
commit
febcea00f3
|
@ -56,7 +56,7 @@ nsapi_error_t GEMALTO_CINTERION::init()
|
||||||
if (!information) {
|
if (!information) {
|
||||||
return NSAPI_ERROR_NO_MEMORY;
|
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));
|
nsapi_error_t ret = information->get_model(model, sizeof(model));
|
||||||
close_information();
|
close_information();
|
||||||
if (ret != NSAPI_ERROR_OK) {
|
if (ret != NSAPI_ERROR_OK) {
|
||||||
|
@ -70,6 +70,8 @@ nsapi_error_t GEMALTO_CINTERION::init()
|
||||||
init_module_bgs2();
|
init_module_bgs2();
|
||||||
} else if (memcmp(model, "EMS31", sizeof("EMS31") - 1) == 0) {
|
} else if (memcmp(model, "EMS31", sizeof("EMS31") - 1) == 0) {
|
||||||
init_module_ems31();
|
init_module_ems31();
|
||||||
|
} else if (memcmp(model, "EHS5-E", sizeof("EHS5-E") - 1) == 0) {
|
||||||
|
init_module_ehs5e();
|
||||||
} else {
|
} else {
|
||||||
tr_error("Cinterion model unsupported %s", model);
|
tr_error("Cinterion model unsupported %s", model);
|
||||||
return NSAPI_ERROR_UNSUPPORTED;
|
return NSAPI_ERROR_UNSUPPORTED;
|
||||||
|
@ -147,6 +149,23 @@ void GEMALTO_CINTERION::init_module_ems31()
|
||||||
_module = ModuleEMS31;
|
_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
|
#if MBED_CONF_GEMALTO_CINTERION_PROVIDE_DEFAULT
|
||||||
#include "UARTSerial.h"
|
#include "UARTSerial.h"
|
||||||
CellularDevice *CellularDevice::get_default_instance()
|
CellularDevice *CellularDevice::get_default_instance()
|
||||||
|
|
|
@ -43,6 +43,7 @@ public:
|
||||||
ModuleELS61,
|
ModuleELS61,
|
||||||
ModuleBGS2,
|
ModuleBGS2,
|
||||||
ModuleEMS31,
|
ModuleEMS31,
|
||||||
|
ModuleEHS5E,
|
||||||
};
|
};
|
||||||
static Module get_module();
|
static Module get_module();
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ private:
|
||||||
void init_module_bgs2();
|
void init_module_bgs2();
|
||||||
void init_module_els61();
|
void init_module_els61();
|
||||||
void init_module_ems31();
|
void init_module_ems31();
|
||||||
|
void init_module_ehs5e();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
Loading…
Reference in New Issue