mirror of https://github.com/ARMmbed/mbed-os.git
Cellular: Make Quectel EC2x modem start up timeout configurable
Default timeout also increase from 5sec to 15sec.pull/12651/head
parent
696467976f
commit
4f7d7750e4
|
@ -46,6 +46,11 @@ using namespace events;
|
||||||
#define MBED_CONF_QUECTEL_EC2X_POLARITY 1 // active high
|
#define MBED_CONF_QUECTEL_EC2X_POLARITY 1 // active high
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_CONF_QUECTEL_EC2X_START_TIMEOUT)
|
||||||
|
#define MBED_CONF_QUECTEL_EC2X_START_TIMEOUT 15000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const intptr_t cellular_properties[AT_CellularDevice::PROPERTY_MAX] = {
|
static const intptr_t cellular_properties[AT_CellularDevice::PROPERTY_MAX] = {
|
||||||
AT_CellularNetwork::RegistrationModeLAC, // C_EREG
|
AT_CellularNetwork::RegistrationModeLAC, // C_EREG
|
||||||
AT_CellularNetwork::RegistrationModeLAC, // C_GREG
|
AT_CellularNetwork::RegistrationModeLAC, // C_GREG
|
||||||
|
@ -128,7 +133,7 @@ nsapi_error_t QUECTEL_EC2X::soft_power_on()
|
||||||
|
|
||||||
_at.lock();
|
_at.lock();
|
||||||
|
|
||||||
_at.set_at_timeout(5000);
|
_at.set_at_timeout(MBED_CONF_QUECTEL_EC2X_START_TIMEOUT);
|
||||||
_at.resp_start();
|
_at.resp_start();
|
||||||
_at.set_stop_tag("RDY");
|
_at.set_stop_tag("RDY");
|
||||||
bool rdy = _at.consume_to_stop_tag();
|
bool rdy = _at.consume_to_stop_tag();
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
"help": "Serial connection baud rate",
|
"help": "Serial connection baud rate",
|
||||||
"value": 115200
|
"value": 115200
|
||||||
},
|
},
|
||||||
|
"start-timeout": {
|
||||||
|
"help": "How long to wait for modem to start after reset (milliseconds)",
|
||||||
|
"value": 15000
|
||||||
|
},
|
||||||
"provide-default": {
|
"provide-default": {
|
||||||
"help": "Provide as default CellularDevice [true/false]",
|
"help": "Provide as default CellularDevice [true/false]",
|
||||||
"value": false
|
"value": false
|
||||||
|
|
Loading…
Reference in New Issue