Commit Graph

117 Commits

Author SHA1 Message Date
Dragos Tatulea 6970a289c2 atmodem: add support for U-Blox TOBY L2 modems
Besides exceptions below, act like normal U-Blox devices.

gprs-context: don't set auth for TOBY L2. U-Blox Toby L2
doesn't support PAP/CHAP APN auth method.

atmodem: TOBY L2 supports only CMER mode 1. Also chaged original
mode variable to ind, which is a more appropriate name.
mode is what is being set first.
2016-03-16 13:15:08 -05:00
Cedric Jehasse d539ed19f3 atmodem: fix retries reporting from AT+CPINR
The retries array was not correctly filled in.
2015-02-02 09:22:21 -06:00
Cedric Jehasse 25f926c733 atmodem: Sierra modems should be polled after CPIN
Sierra modem will return "CME ERROR: 14" when polled right after pin has
been entered. Use the existing vendor quirk to handle this.
2015-02-02 09:21:10 -06:00
Philip Paeps cca3e085b3 sim: query u-blox PIN retries with AT+UPINCNT 2014-07-08 08:51:54 -05:00
Denis Kenzior b2bfdd69d2 atmodem: Minor style fixups 2014-06-30 13:44:40 -05:00
Philip Paeps 1588e7c082 sim: query Quectel UC15 PIN retries with AT+QPINC? 2014-06-30 13:35:19 -05:00
Anthony Viallard d3e8218b50 SIMCOM: add a quirk to fix crsm request 2013-07-22 15:49:59 -05:00
Anthony Viallard 8650c1019a sim: Add SIMCOM SIM card ready quirk
SIM is busy right after pin is entered. Use the quirk which
add a CPIN? pooling check until having "CPIN: READY" answer.
2013-04-01 21:38:26 -05:00
Christopher Vogl 404f2e3cb9 sim: return from cpin when sim ready for telit
Especially for Telit HE910 it is not enough to wait for
entering a PIN code.
If we do not wait for #QSS: 3, subsequent commands,
like +CMER will report SIM BUSY and the network registration
atom will be removed as a consequence.
2012-12-17 09:50:22 -06:00
Mingli Wu 911eeb6565 atmodem: remove pending idle callbacks at removal
If device probe and removal happen in short succession, it's possible
that the idle handler registered in the probe function doesn't run before
the device is removed.  In this case, the idle handler needs to be
unregistered so that it does not run and try to access the data that's
destroyed during the removal.
2012-12-04 23:48:14 -06:00
Denis Kenzior b26f7c73d3 atmodem: For IFX XSIMSTATE 7 should never occur
in the case of a PIN entry, XSIMSTATE of 7 (Ready to Attach) should
never occur
2012-11-28 10:31:14 -06:00
Denis Kenzior 2528b74491 atmodem: Always quote data in CRSM write operations 2012-11-23 07:22:25 -06:00
Denis Kenzior 291f4e0bb0 atmodem: Support CRSM with paths
For GET STATUS and READ BINARY variations, support appending of the
optional path in the CRSM command
2012-11-23 07:22:25 -06:00
Denis Kenzior 57692483a9 atmodem: Update sim driver to the new api 2012-11-22 10:26:34 -06:00
Cedric Jehasse b728a02981 atmodem: add PIN retry count for Alcatel modems 2012-11-15 12:31:06 -06:00
Cedric Jehasse 5f9c1e9e34 atmodem: Poll SIM state after entering PIN
Encountered a problem of CME ERROR 14: SIM busy on Alcatel and Huawei modem.
The Huawei modem has a ^SIMST unsollicited sim state indication, but not all
Huawei modems support this.
So poll the SIM state, as was already done for ZTE modems.
2012-11-12 13:30:38 -06:00
Holger Hans Peter Freyther 2b9b1ae6d3 sim: Fix the quirk handling of CPIN for Wavecom
The Wavecom Q2XXX support broke in commit 72ce19bf3e.
This is because at_cpin_cb called decode_at_error with final and not
with OK. This lead to an error being set in the error variable and the
new code returns early when an error is set.

The addition of the terminator in at_sim_probe for Wavecom broke in
git commit ac524be99f because
terminators can not be added on cloned chats.

Move the addition of the terminator from the atmodem to the wavecom
plugin. Use the same terminator for Q2XXX and the normal Wavecom
class. The WAVECOM terminator has been tested on a Q2XXX modem.

Apply the CPIN quirk for both WAVECOM and WAVECOM_Q2XXX inside the
sim.c file. Introduce needs_wavecom_sim_quirk to handle it for
WAVECOM and WAVECOM_Q2XXX.
2012-11-01 04:56:51 -05:00
Christopher Vogl 90c7bdfc8d sim: return from CPIN when SIM unlocked for telit
Only return from CPIN when the modem informs that the SIM is ready
2012-08-22 18:44:18 -05:00
Denis Kenzior b264440737 sim: Minor formatting nitpicks 2012-08-16 01:05:54 -05:00
Denis Kenzior aec21db6cb sim: Fix warning
drivers/atmodem/sim.c: In function ‘at_pct_cb’:
drivers/atmodem/sim.c:872:2: error: ISO C90 forbids mixed declarations
and code
2012-08-16 01:05:46 -05:00
August Mayer ee8ba6f2ff sim: support PIN retry counters for telit modems 2012-08-16 01:00:28 -05:00
Pablo Neira Ayuso 78637b130d sim: Quirk Wavecom Q2XXX CPIN behavior 2012-05-31 09:48:12 -05:00
Pablo Neira Ayuso 1ccecfe01e sim: Handle quirky CPIN of Wavecom Q2XXX 2012-05-30 00:03:10 -05:00
Marcel Holtmann 1698d720ce atmodem: Add support for Icera PIN retry counters 2012-05-25 14:32:28 +02:00
Guillaume Zajac d0232dee06 atmodem: Poll SIM state after having entered PIN
We encountered the problem of CME ERROR 14: SIM busy on ZTE modems.
ZTE modems don't use SIM notification to check SIM state.
We poll SIM ready state before confirming PIN is entered.
2012-04-18 04:22:19 -05:00
Denis Kenzior 31e1b2e6ce sim: Don't use sprintf unnecessarily
Using sprintf for a single quote is quite wasteful
2012-03-23 08:28:37 -05:00
Denis Kenzior 95e7982938 sim: Fix up various coding style violations 2012-03-23 08:27:44 -05:00
Nicolas Bertrand ad29b6d18f sim: Use quoted string with AT+CRSM data parameter
Fix issue with some modems preventing to update elementary files
(speedup, ZTE, huawei, MBM)
2012-03-23 08:12:24 -05:00
Renat Zaripov 409b0f01b6 sim: Add SIMCOM specific PIN retry handling
Use AT+SPIC for obtaining retries remaining for SIM PIN / PUK

AT+SPIC Retries Remaining to Input SIM PIN/PUK

+SPIC: <pin1>,<pin2>,<puk1>,<puk2>

Parameters
<pin1> Times remained to input chv1
<pin2> Times remained to input chv2
<puk1> Times remained to input puk1
<puk2> Times remained to input puk2
2012-02-22 04:14:16 -06:00
Guillaume Zajac 38056fdd50 atmodem: Create new sim driver without EF entries
This driver will be used by CDMA modems to support PIN
management and IMSI retreival.
EF entries for CDMA modems cannot be implemented without
manufacturers specifications.
2012-01-11 06:46:24 -06:00
Marcel Holtmann 2e0f1f79c1 atmodem: Add support for Option HSO specific PIN retry counters 2011-12-29 12:08:38 -08:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Marcel Holtmann 703d0a1237 speedup: Add support for retrieving PIN retry counters 2011-08-04 17:00:05 +02:00
Marcel Holtmann 4c8ae3f9ec atmodem: Add Speedup vendor quirk to SIM file reading 2011-08-04 15:54:26 +02:00
Marcel Holtmann 5b7d2329dc atmodem: Enable support for PIN retry counters of ZTE modems 2011-08-03 23:54:39 +02:00
Miia Leinonen 2cb3027dd6 atmodem: Add MBM vendor quirk for SIM record update 2011-03-02 22:53:35 -06:00
Jeevaka Badrappan fa96b806bd atmodem: Add pin retry count support for mbm 2011-02-01 16:36:43 +01:00
Rémi Denis-Courmont 56dfe5066b atmodem: implement standard PIN retries 2011-02-01 13:51:21 +01:00
Jeevaka Badrappan e4ef929aee atmodem: fix memory leak 2011-01-29 12:43:17 -06:00
Jeevaka Badrappan 4258fb5915 atmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Marcel Holtmann 938e635ae6 atmodem: Add Sierra vendor quirk for SIM file reading 2011-01-27 15:49:32 +01:00
Lucas De Marchi b7fca84c93 atmodem: rename parameter according to header 2011-01-26 18:23:38 +01:00
Denis Kenzior 58f223da5f sim: Add a missing break statement just in case 2011-01-19 14:57:12 -06:00
Jeevaka Badrappan 508b93eecb atmodem: add ifx support for pin retry count 2011-01-19 14:57:12 -06:00
Jeevaka Badrappan d9ae1405f3 atmodem: coding style fix 2011-01-18 15:55:41 +01:00
Jeevaka Badrappan b97676acc3 atmodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Marcel Holtmann 4bab8d3ad3 atmodem: Use switch statement for vendor quirks 2011-01-10 15:35:39 -08:00
Denis Kenzior 94c104b25f sim: Fix missing return in the atmodem driver
In some circumstances it was possible to call the callback with both
failure and success
2011-01-10 16:21:16 -06:00
Denis Kenzior 55d47dcac1 sim: Prefer not using _ prefix for style reasons 2011-01-10 16:14:50 -06:00
Lucas De Marchi 5dfd568a2a atmodem: implement query for remaining pin retries
Implement query method for the remaining pin retries on huawei modem.
2011-01-10 16:08:55 -06:00