Optional init sequence (#59653)
Raphaƫl <[email protected]> Thu, 10 Dec 2020 23:44:35 -0300
| Newsgroups | gmane.linux.drivers.gnokii |
|---|---|
| Message-ID | <20201211024435.GA108998@acer> |
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
# https://savannah.nongnu.org/bugs/?59653
Back in 2011 December (98a87466), after 0.6.31 release, a change was
introduced so that if any of ATZ, ATE1, AT+CMEE=1) returns the error,
fail Initialize()
If find this a bit bold.
I just encountered a "MTT Mini" feature phone which replies an
"ERROR 100" to ATZ (but "OK" to ATE1 and CMEE).
This model also throw an ERROR 100 to CGMI/GMI
I think the init-sequence should be may (optionally) tolerant to buggy
phone AT implementation.
It looks like the usb-modeswitch "quirks" and I tried to make that
optional-init-sequence a flag but couldn't figure how to do that for the
AT pseudo-model so I'd let that to you.
--17pEHd4RhPHOinZp
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="optional-init-sequence.patch"
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index 81d585d6..513d600c 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -3311,8 +3311,6 @@ static gn_error Initialise(gn_data *setupdata, struct gn_statemachine *state)
*/
if (!state->config.connect_script[0]) {
ret = SoftReset(&data, state);
- if (ret)
- goto out;
}
/*
* These might be done in the connect script as well, but gnokii
@@ -3341,8 +3339,6 @@ static gn_error Initialise(gn_data *setupdata, struct gn_statemachine *state)
goto out;
data.manufacturer = manufacturer;
ret = state->driver.functions(GN_OP_GetManufacturer, &data, state);
- if (ret)
- goto out;
dprintf("Manufacturer: \"%s\"\n", manufacturer);
if (!at_manufacturer_compare("bosch"))
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZ25va2lpLXVz
ZXJzIG1haWxpbmcgbGlzdApnbm9raWktdXNlcnNAbm9uZ251Lm9yZwpodHRwczovL2xpc3RzLm5v
bmdudS5vcmcvbWFpbG1hbi9saXN0aW5mby9nbm9raWktdXNlcnMK
--17pEHd4RhPHOinZp--