Skip to content

Commit 5d64e55

Browse files
authored
Merge pull request #12651 from kivaisan/add_ec2x_start_timout_configuration
Cellular: Make Quectel EC2x modem start up timeout configurable
2 parents 2c5660a + 4f7d775 commit 5d64e55

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ using namespace events;
4646
#define MBED_CONF_QUECTEL_EC2X_POLARITY 1 // active high
4747
#endif
4848

49+
#if !defined(MBED_CONF_QUECTEL_EC2X_START_TIMEOUT)
50+
#define MBED_CONF_QUECTEL_EC2X_START_TIMEOUT 15000
51+
#endif
52+
53+
4954
static const intptr_t cellular_properties[AT_CellularDevice::PROPERTY_MAX] = {
5055
AT_CellularNetwork::RegistrationModeLAC, // C_EREG
5156
AT_CellularNetwork::RegistrationModeLAC, // C_GREG
@@ -128,7 +133,7 @@ nsapi_error_t QUECTEL_EC2X::soft_power_on()
128133

129134
_at.lock();
130135

131-
_at.set_at_timeout(5000);
136+
_at.set_at_timeout(MBED_CONF_QUECTEL_EC2X_START_TIMEOUT);
132137
_at.resp_start();
133138
_at.set_stop_tag("RDY");
134139
bool rdy = _at.consume_to_stop_tag();

features/cellular/framework/targets/QUECTEL/EC2X/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
"help": "Serial connection baud rate",
3434
"value": 115200
3535
},
36+
"start-timeout": {
37+
"help": "How long to wait for modem to start after reset (milliseconds)",
38+
"value": 15000
39+
},
3640
"provide-default": {
3741
"help": "Provide as default CellularDevice [true/false]",
3842
"value": false

0 commit comments

Comments
 (0)