Commit Graph

600 Commits

Author SHA1 Message Date
Marcel Holtmann 3ab79d8718 atutil: Handle empty SIM state polling request gracefully 2011-08-03 14:27:17 +02:00
Marcel Holtmann d41b584de5 atmodem: Handle SIM busy condition gracefully for phonebooks
Before the phonebook is ready, the SIM card needs certain amount of
time. Something between 20-30 seconds in general. So if the modem
returns an error indicating the SIM is busy, then try again in
regular intervals.
2011-07-29 17:35:44 +02:00
Marcel Holtmann a69690b3b5 atmodem: Add Huawei specific technology reporting 2011-07-29 13:11:44 +02:00
Marcel Holtmann 7cabd1075c atmodem: Add Huawei specific GPRS bearer notifications 2011-07-29 13:11:17 +02:00
Philippe Nunes 13b41706d1 atmodem: Add vendor entry for SpeedUp modems 2011-07-27 16:13:04 +02:00
Marcel Holtmann 95c9e12da2 atmodem: Add support for Huawei network time reports 2011-07-25 16:53:03 +02:00
Marcel Holtmann 476fab4ea1 atmodem: Add support for NW DEACT notifications on slave channel 2011-07-24 14:48:39 +02:00
Denis Kenzior 380c95ddcb atmodem: Implement generic CPIN polling 2011-07-22 08:22:52 -05:00
Marcel Holtmann 8d60016b23 atmodem: Request device capabilities from devinfo driver
The result of the capabilities command is currently not used to identify
GSM support or not. However for debugging purposes the information are
part of the AT command debug log now.
2011-07-11 15:03:38 +02:00
Bernhard Guillon 128f96d097 network-registration.c: add telit support
*add support for CIND=? tokens like ("signal",(0-7,99))
*add telit quirk for token encapsulation e.g.
    (("one",(0-7,99)),("two",(0-7,99)))
2011-06-06 17:50:03 -05:00
Bernhard Guillon a805d955b3 atmodem/vendor.h: add OFONO_VENDOR_TELIT 2011-06-06 17:50:03 -05:00
Denis Kenzior 17deacbfff atmodem: Update to new GAtPPP api 2011-05-24 12:25:08 -05:00
Denis Kenzior e40d6d708f ussd: Fix use of non-cloned gatchat object 2011-04-18 09:46:20 -05:00
Mika Liljeberg 2e444d1a51 atmodem: remove redundant code 2011-03-30 12:34:39 -05:00
Olivier Guiter 66705784f8 gnss: fix broken build 2011-03-29 10:03:12 -05:00
Denis Kenzior 819e39a791 gnss: Disable piecemeal CPOSR reporting 2011-03-28 18:06:59 -05:00
Denis Kenzior 3899056800 gnss: Minor style fix 2011-03-28 18:06:59 -05:00
Jarko Poutiainen acf687e216 atmodem: add gnss driver 2011-03-28 18:06:59 -05:00
Jeevaka Badrappan 97eea8144b atmodem: fix issue in time reporting with ifx 2011-03-18 09:51:57 -07:00
Bertrand Aygon 7617680d0d cbs: ignore any CBMs without a proper size
Cell Broadcasts are always fixed size, so improve PDU length check
2011-03-16 21:29:20 -05:00
Mika Liljeberg a8731aabb0 atmodem: update to new gprs context interface 2011-03-15 17:11:58 -05:00
Paavo Leinonen f2d3f232f2 atmodem: fix PB reading when fields are omitted
Fix SIM PB reading when numeric fields have been omitted.
2011-03-11 13:55:17 -06:00
Denis Kenzior 0f147e1cd5 voicecall: Minor nitpicks to previous commit 2011-03-11 13:50:31 -06:00
Andras Domokos 3370b45477 atmodem: implement SSN handling 2011-03-11 13:50:31 -06:00
Andras Domokos 4a36b93d6a ssn: remove SSN atom completely 2011-03-11 13:08:51 -06:00
Miia Leinonen 2cb3027dd6 atmodem: Add MBM vendor quirk for SIM record update 2011-03-02 22:53:35 -06:00
Jeevaka Badrappan f1396eaab6 atmodem: close the list in clvl_range_query 2011-02-14 14:36:15 -06:00
Jeevaka Badrappan 4534b1c328 atmodem: M16 coding style fix 2011-02-05 07:04:02 -08:00
Jeevaka Badrappan b9d24fc016 atmodem: use defined call_status enum 2011-02-05 05:07:18 -08:00
Lucas De Marchi 730891328c atmodem: use ofono_call initializer 2011-02-01 18:31:02 +01: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
Marcel Holtmann 1973805069 atmodem: The Gobi devices don't support SMS ACK PDUs either 2011-01-29 18:39:37 +01:00
Jeevaka Badrappan 4258fb5915 atmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Jeevaka Badrappan ac20890cc9 atutil: use g_new0 for callback data memory 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
Marcel Holtmann 141c18dd03 atmodem: Add vendor entry for Sierra Wireless 2011-01-27 15:47:16 +01:00
Jeevaka Badrappan 12c3cf6969 voicecall: remove ofono_cug_option 2011-01-26 16:38:15 -06:00
Lucas De Marchi b7fca84c93 atmodem: rename parameter according to header 2011-01-26 18:23:38 +01:00
Marcel Holtmann 89c4ea6130 atmodem: Add support for technology reporting via CNTI 2011-01-22 15:03:12 +01:00
Marcel Holtmann 62686f7719 atmodem: Add support for Gobi technology change handling 2011-01-22 13:12:15 +01:00
Marcel Holtmann ef0b594dfc atmodem: The Gobi devices have CI and LAC as unqouted strings 2011-01-22 12:37:19 +01:00
Marcel Holtmann 66032172ef atmodem: Use Qualcomm Gobi quirks for SMS, CBS and USSD 2011-01-22 11:36:43 +01:00
Marcel Holtmann b7739919f8 atmodem: Use switch statements for USSD vendor quirks 2011-01-22 11:27:53 +01:00
Marcel Holtmann 2253222069 atmodem: Use switch statements for CBS vendor quirks 2011-01-22 11:23:22 +01:00
Marcel Holtmann 503e5e0321 atmodem: Use switch statements for SMS vendor quirks 2011-01-22 11:20:10 +01:00
Marcel Holtmann ec0f0c2a68 atmodem: Add quirk for Qualcomm Gobi modems 2011-01-22 11:09:31 +01:00
Andrzej Zaborowski 03b294d194 sim-auth: Add atmodem driver 2011-01-20 11:20:57 -06:00
Aki Niemi 56b428dcd5 atmodem: Remove deregister implementation 2011-01-20 09:55:23 -06:00
Marcel Holtmann 63fd483fc9 atmodem: Always listen for bearer notifications 2011-01-20 12:13:17 +01:00
Rémi Denis-Courmont e3f51d7507 atmodem: packet switch bearer support 2011-01-20 12:10:32 +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
Denis Kenzior 16929cc978 voicecall: Be more explicit when copying structs 2011-01-18 16:09:28 -06:00
Lucas De Marchi 2c79277073 atmodem: add cdip to voicecall 2011-01-18 16:09:28 -06:00
Lucas De Marchi 700550e2f3 atmodem: add cdip to call-settings 2011-01-18 16:09:27 -06:00
Jeevaka Badrappan 3ae5e46b69 atmodem: fix signal strength issue with ifx 2011-01-18 16:05:29 +01:00
Jeevaka Badrappan d9ae1405f3 atmodem: coding style fix 2011-01-18 15:55:41 +01:00
Jeevaka Badrappan cfdad1d377 atutil: remove unused mpty 2011-01-13 12:31:54 -06:00
Rémi Denis-Courmont bcfd049853 atmodem: fix +COLR parsing
AT+COLR does not have a local presentation mode and thus it cannot be
factored with the other commands.

This partially reverts commit f2baa88d75.
2011-01-13 10:31:54 -06:00
Denis Kenzior febb9014ca atutil: Break out attribute parser into atutil 2011-01-12 23:53:38 -06: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
Lucas De Marchi 45f2576bb6 atmodem: check for VENDOR_HUAWEI on sim atom 2011-01-10 15:38:29 -06:00
Marcel Holtmann 39599b9106 netreg: Report timezone updates if available 2010-12-26 11:47:32 -08:00
Denis Kenzior b68fb125b8 atmodem: Always poll clcc, even if cring + clip
Even in the case of CRING and CLIP being used, we should start a CLCC
poll.  This is because we must still rely on polling CLCC to detect when
an incoming call has been terminated by the remote side.
2010-12-16 18:40:19 -06:00
Denis Kenzior 3254e5e99f atmodem: Fix reporting of CLIP
When RING & CLCC polling is used, the CLIP will not be reported
correctly if the CLIP: notification does not arrive
2010-12-16 18:40:19 -06:00
Denis Kenzior 0597b3501a atmodem: Do not re-parse CLIP / CNAP
These needs to be parsed once and not parsed unnecessarily once the
information has been recorded
2010-12-16 18:40:19 -06:00
Denis Kenzior a1bf26f15d atmodem: Set cnap validity to not provided 2010-12-16 18:40:19 -06:00
Denis Kenzior f2baa88d75 atmodem: Unify COLR/CNAP/CLIP/COLP parser 2010-12-16 18:40:19 -06:00
Denis Kenzior f46e0fb73b atmodem: Fix parsing of CNAP status 2010-12-16 18:40:18 -06:00
Gustavo F. Padovan b01d8f5bf7 atmodem: add CNAP to call-settings 2010-12-16 18:40:18 -06:00
Gustavo F. Padovan f28f0b3dea atmodem: Add CNAP parsing to voicecall 2010-12-16 18:40:18 -06:00
Denis Kenzior 0512a6b740 atutil: Fix parsing of un-quoted CREG / CGREG
On broken hardware like the Huawei, it is possible to receive both an
unsolicited and a solicited version of the CREG / CGREG within within
the same response set.  Skipping of the unsolicited version was not
handled correctly.  This attempts to fix this issue.
2010-12-11 11:39:07 -06:00
Gustavo F. Padovan 5ca42255c5 atmodem: use macros for CLIP validity 2010-12-10 12:59:26 -06:00
Gustavo F. Padovan 8dec9a989b atmodem: cleanup DBG messages 2010-12-10 12:58:12 -06:00
Gustavo F. Padovan 169651314e atmodem: fix DBG message 2010-12-02 08:15:04 -06:00
Lucas De Marchi b82a7f8511 drivers: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 11:37:09 -06:00
Denis Kenzior 8f949a6d8c atmodem: Forgot to reset sms data on remove 2010-11-29 07:52:35 -06:00
Denis Kenzior 7cde43b4b6 call-settings: Add support for +COLR in atmodem 2010-11-22 16:48:45 -06:00
Marit Henriksen a25d57531c atmodem: Remove at_pin_send_puk_cb, and use at_pin_send_cb instead.
When adding the use of pin event *EPEV also to at_pin_send_puk_cb,
it becomes identical to at_pin_send_cb, and can be removed.
2010-11-04 10:40:17 +01:00
Marcel Holtmann 080ff41db9 atmodem: Add support for IFX specific GPRS suspend notification
The Infineon modem informs about GPRS suspend cases. For example when
GPRS is active and a call is made. If the status changes, inform the
core about this change.

This uses GPRS_SUSPENDED_UNKNOWN_CAUSE reason since the modem does not
give a clear reason why GPRS was suspended. With this reason there is
a delay before the status change gets send out as D-Bus signal.
2010-10-29 13:39:27 +02:00
Marcel Holtmann 0ec69a291d atmodem: Add dummy handler for generic time zone update 2010-10-28 19:11:18 +02:00
Marcel Holtmann ed7a22c867 atmodem: Time reporting on Infineon modem is IFX specific
The time reporting via +CTZV and +CTZDST on the Infineon modem is not
following the standard. So mark these clearly as IFX specific.
2010-10-28 19:05:29 +02:00
Marcel Holtmann 969e242d72 atmodem: Enable home zone reporting for IFX modems
For the Infineon modem the AT+XHOMEZR option can be set to get informed
about home zone labels. If this information is available, it it still
not properly used, but it shows up in the traces for reference.
2010-10-28 19:01:55 +02:00
Marcel Holtmann 65f1ad4ce2 atmodem: Print IP details after GPRS context setup 2010-10-27 14:54:46 +02:00
Marcel Holtmann 9b316185c6 atmodem: Add some more GPRS context debug statements 2010-10-27 01:29:55 +02:00
Marcel Holtmann 8da7e98ce4 atmodem: Enable time zone reporting for Option modems 2010-10-25 02:03:00 +02:00
Marcel Holtmann 033c772e7b atmodem: Enable time update reporting for MBM modems 2010-10-24 21:48:56 +02:00
Andrzej Zaborowski 9e46e27932 atmodem: Delay return from send_dtmf
AT+VTS responds with an OK immediately, so add a wait in the driver
before returning so that core knows when the tone has finished.  Note
that some modems actually do wait against 27.007, and other modems
use a manufacturer specific AT command and the drivers will need to
handle accordingly.
2010-10-22 22:28:50 -05:00
Marcel Holtmann cf2ba64872 atmodem: Parse optional PLMN parameter of AT+COPS=? result
The Infineon modem adds an optional <plmn_list> parameter after the
access technology parameter <AcT>. It is not always present, but when
present it makes the operator listing fail.

+COPS: (2,"T-Mobile D","TMO D","26201",0,0),(3,"E-Plus","E-Plus","26203",0,),(3,"Vodafone.de","Vodafone.de","26202",0,),(3,"o2 - de","o2 - de","26207",0,)

Not all networks have this parameter and maybe only the home network
has it anyway. And so far this feature seems to be Infineon specific,
but just in case, parse the parameter if present to make sure the
operator listing is available.
2010-10-22 01:00:58 +02:00
Marcel Holtmann ae6c0edeae atmodem: Add support for IFX specific phonebook ready notification 2010-10-21 20:31:25 +02:00
Marcel Holtmann 94d67b9c66 atmodem: Use g_try_new0 when checking for the result 2010-10-21 20:00:07 +02:00
Marcel Holtmann 49544d43d8 atmodem: Check for TUN/TAP support before enabling PPP 2010-10-21 18:23:20 +02:00
Marcel Holtmann 040a34cad2 atmodem: Decode and report time information from network 2010-10-20 13:55:20 +02:00
Marcel Holtmann 98eed08d29 atmodem: Add skeleton for time update reporting 2010-10-20 13:27:04 +02:00
Marcel Holtmann a917f094cb atmodem: Add SIM ready quirk for IFX when entering PUK
For the Infineon modem, also the PUK entering needs to be extended with
a quirk to wait for the SIM ready notification.
2010-10-18 15:10:05 +02:00
Marcel Holtmann 43a6ece561 atmodem: Remove workaround for SIM ready notifier removal 2010-10-15 16:07:51 +03:00
Denis Kenzior aa50067ccd sim: Use enums for EF valid / invalidated status 2010-10-15 07:25:50 -05:00
Petteri Tikander 84efadcf5a atmodem: returns file-status of SIM EF-file 2010-10-15 02:19:02 -05:00
Marcel Holtmann 4cacd3a76c atmodem: Send DTMF commands without quotes
The AT+VTS command takes a single character and should not use quotes.
2010-10-13 08:25:59 +03:00
Marcel Holtmann 3ad4e5ab21 atmodem: Update IFX specific SIM ready checking
It seems that the XSIM notification doesn't really send SIM ready
status. It sends ready to attach instead:

  > AT+CPIN="0000"\r
  < \r\nOK\r\n
  < \r\n+XLOCK: "PN",5,0,"PU",5,0,"PP",5,0,"PC",5,0,"PS",5,0\r\n
  < \r\n+XSIM: 7\r\n

So either SIM ready or ready to attach is received more to the
post_sim state.
2010-09-29 23:23:29 +09:00
Marcel Holtmann 590e154734 atmodem: Remove quirk for Huawei voice call support
The Huawei voice call support has its own driver now. So this quirk
is no longer needed.
2010-09-29 08:32:23 +09:00
Marcel Holtmann 6fbbd4ca3e atmodem: Some cleanups in voice call driver 2010-09-27 08:07:02 +09:00
Marcel Holtmann 25bb671d4e atmodem: Add special handling for Infineon SIM ready state 2010-09-25 11:32:40 +09:00
Marcel Holtmann ae2a9207a4 atmodem: Add support for Infineon CNMA without PDU
Seems like the Infineon modem can't handle a provided PDU to the CNMA
command. So just leave it out.
2010-09-24 18:28:32 +09:00
Marcel Holtmann 2be1c13dbb atmodem: Add special handling of Infineon signal strength reporting
The custom signal strength reporting could be done inside the modem
plugin actually, but Calypso, Huawei etc. add quirks to the generic
network registration driver. So for now do it the same way until
this gets cleaned up for all modem plugins.
2010-09-24 18:23:31 +09:00
Denis Kenzior 09c0ae8478 atmodem: Update comment 2010-09-24 00:18:40 -05:00
Marcel Holtmann 430259e38b atmodem: Add vendor quirk for Infineon modems 2010-09-24 02:38:23 +09:00
Marcel Holtmann 9f906504a5 atmodem: Allow setting PPP debug via environment variable 2010-09-20 08:28:13 +09:00
Denis Kenzior c97489a161 ussd: Tweak buffer size 2010-09-15 12:11:08 -05:00
Denis Kenzior f6a4d4a5ce ussd: Rework ussd_request
- Only allocate variables which are needed
- Make sure buffers are big enough
- converted is a simple string, no need to use fancy printf magic
2010-09-14 22:05:32 -05:00
Denis Kenzior 82e6ddfd4b ussd: Simplify ussd notification parser logic 2010-09-14 21:54:25 -05:00
Jeevaka Badrappan eb425a281f ussd: Driver API changes
To support 8bit and UCS2 formatted USSDs as well as Send USSD Proactive
Command.
2010-09-14 17:01:49 -05:00
Jeevaka Badrappan 09de3fdaab ussd: Read current CSCS charset 2010-09-14 11:50:28 -05:00
Lucas De Marchi 74125ff5d4 Fix common misspellings in drivers
Fix common misspellings by using the list available at
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

From the list cited above, the substitution script found the following
misspellings:

subsidary(-ies)->subsidiary(-ies)
transfering->transferring
2010-09-14 16:00:16 +09:00
Jeevaka Badrappan a632cfe11b atutil: Add parsing of CSCS queries 2010-09-10 12:00:43 -05:00
Marcel Holtmann a0fe9cbdbd atmodem: Add Huawei quirk for voice call handling 2010-09-04 23:44:30 +02:00
Denis Kenzior 150edce5c3 phonebook: Trivial style / wording fixes 2010-08-30 17:58:53 -05:00
Thadeu Lima de Souza Cascardo b452c29d42 atmodem/phonebook: parse text as hexstring
Some modems omit the quotes when dumping strings in UCS2. Parsing
them as hexstring already does the hex decoding and accepts missing
quotes.
2010-08-30 17:54:10 -05:00
Denis Kenzior 4292b2dbed sim: Turn around the order of arguments
The void *user argument was first.  It should be last instead to be
consistent with the other watch functions.
2010-08-30 14:29:34 -05:00
Denis Kenzior bdc8d02bc8 atmodem: Default to +CHUP to hangup_all 2010-08-20 16:15:11 -05:00
Marcel Holtmann 773b3a8088 atmodem: Add a few more debug statements for SMS support 2010-08-20 21:53:21 +02:00
Marcel Holtmann 6df7c1a1c6 atmodem: Add a few more debug statements for CBS support 2010-08-20 21:45:45 +02:00
Marcel Holtmann 240e3878ae atmodem: Add Nokia specific quirk for AT+CGEREP handling 2010-08-20 20:57:30 +02:00
Marcel Holtmann 1313a2fe01 atmodem: Fix copy and paste typo 2010-08-20 16:53:07 +02:00
Marcel Holtmann cda0fd9eff atmodem: Enable MBM specific notification for registration and bearer 2010-08-20 16:50:42 +02:00
Marcel Holtmann 205b3b813a atmodem: Turn a STE GPRS quirk into a MBM and STE quirk 2010-08-20 14:05:18 +02:00
Marcel Holtmann 3aa7e1b18e atmodem: Add really nasty hack for Nokia AT+COPS bug
The Nokia modem returns an invalid response when trying to read the
numeric value for MCC/MNC of the current network.

Control:> AT+COPS?\r
Control:< \r\n+COPS: 0,2,"26207,0\r\n\r\nOK\r\n

The closing " is just missing and this confuses the AT parser. In case
of a Nokia modem skip reading the numerical values for the network.
2010-08-20 03:00:49 +02:00
Marcel Holtmann 667c4eea84 atmodem: No CIND for Nokia data cards 2010-08-20 02:24:53 +02:00
Marcel Holtmann 814c11d872 atmodem: Add vendor quirk for Nokia data cards 2010-08-20 02:24:07 +02:00
Marcel Holtmann 3adf7a07ca atmodem: Allow missing DCS parameter in USSD result 2010-08-17 00:49:23 +02:00
Marcel Holtmann 10466f6664 atmodem: Add Qualcomm specific USSD quirk 2010-08-16 22:38:38 +02:00
Marcel Holtmann a79901e26f atmodem: Add support for storing USSD vendor quirks 2010-08-16 22:21:52 +02:00
Denis Kenzior 3ea7893108 ussd: Use cb_data instead of custom structure 2010-08-16 15:04:26 -05:00
Marcel Holtmann a8d3e7433a atmodem: Remove useless NULL checks before g_free 2010-08-16 22:02:01 +02:00
Marcel Holtmann 83a04505bf netreg: Add quirk for ZTE modem without CIND support 2010-08-16 15:14:17 +02:00
Denis Kenzior fa822e906e atutil: Don't try parsing lac/ci when unregistered 2010-08-13 18:29:42 -05:00
Denis Kenzior ac524be99f atmodem: Use g_at_chat_clone 2010-08-12 16:40:40 -05:00
Sjur Brændeland dde0a4ccb5 voicecall: Rename hangup to hangup_active 2010-08-12 11:32:12 -05:00
Andrzej Zaborowski 097640d118 atutil: Parse CMS and CME error codes 2010-08-06 12:04:28 -05:00
Zhenhua Zhang 26efde3d7b Fix busylooped in ppp_disconnect for huawei modem
Huawei modem closes the modem port after PPP disconnect. So the channel
of gatchat is NULL in ppp_disconnect. In such case, we resume the chat
and it causes huawei_disconnect() get called and the gprs context is
removed later.

Before removing this gprs context, we should reply the pending DBus
message to the client.
2010-08-02 14:10:37 -05:00
Denis Kenzior 56ba93f261 phonesim: Introduce End Session notification 2010-07-30 17:19:56 -05:00
Yang Gu 9a71ae891b atmodem: phonesim proactive command notification 2010-07-13 09:55:02 -05:00
Yang Gu c603efbf51 atmodem: Make fetch command function as external 2010-07-13 09:51:33 -05:00
Andrzej Zaborowski 79372d26f5 atmodem: Make sim operations return sim error codes. 2010-07-08 14:27:33 -05:00
Andrzej Zaborowski b450efafec atmodem: Don't unregister *EPEV in *EPEV handler.
Handlers are called when looping over the unsolicited responses hash,
registering or unregistering modifies that hash and confuses glib.
2010-06-29 13:59:13 -05:00
Zhenhua Zhang 8246463ef3 atmodem: Update to the new PPP API 2010-06-28 10:19:32 -05:00
Denis Kenzior 52da988816 atmodem: Add CGSMS support to sms driver 2010-06-25 14:25:46 -05:00
Denis Kenzior 7f1a923ebf hso: Don't query tech if not registered or roaming
{NetworkRegistration} [/hso0] LocationAreaCode = 34591
{NetworkRegistration} [/hso0] CellId = 5903759
{NetworkRegistration} [/hso0] Strength = 32
{NetworkRegistration} [/hso0] Strength = 22
{PrimaryDataContext} [/hso0/primarycontext1] Settings =
dbus.Dictionary({}, signature=dbus.Signature('sv'), variant_level=1)
{PrimaryDataContext} [/hso0/primarycontext1] Active = 0
{DataConnectionManager} [/hso0] Attached = 0
{NetworkRegistration} [/hso0] Status = searching
{NetworkRegistration} [/hso0] Technology = umts  <--- Oops
{NetworkOperator} [/hso0/operator/26201] Status = available
{NetworkRegistration} [/hso0] Name =
{NetworkRegistration} [/hso0] Status = registered
{NetworkRegistration} [/hso0] LocationAreaCode = 35342
{NetworkRegistration} [/hso0] CellId = 5903759
{NetworkRegistration} [/hso0] Technology = edge
2010-06-24 20:54:36 -05:00
Denis Kenzior 054ed2653a atmodem: Support CDS indicators for MBM
MBM does not advertise support for CNMA, yet only supports CDS style
notifications which do not need to be acknowledged.
2010-06-21 15:21:40 -05:00
Denis Kenzior 681aaef1ab atmodem: Use a switch/case in sim.c 2010-06-18 14:24:18 -05:00
Andrzej Zaborowski a2dc7dfee0 atmodem: Add PIN entry quirk for mbm.
Wait for *EPEV unsolicited response after PIN entered, otherwise the
next AT+CPIN? query still returns the old value for a fraction of a
second and ofono gets stuck until the next PIN entry attempt.
2010-06-18 14:14:39 -05:00
Denis Kenzior 412ed596b9 Fix: potential to crash in atmodem
Some callbacks in call-meter were assuming that a modem follows 27.007
and actually returns a string.  Some modems don't return a string that
is properly formatted (e.g. in quotes).  The strtol was thus accessing
uninitialized memory and crashing ofono.
2010-06-17 04:26:16 -05:00
Denis Kenzior 5a1c7eef08 atmodem: Couple tiny style fixes 2010-06-14 12:46:11 -05:00
Daniel Wagner b7401489b5 Report cell technology capability for Option HSO modems
Option modem use OCTI and OUWCTI commands
for reporting the cell capability.
2010-06-14 12:46:11 -05:00
Marcel Holtmann f566935f7a Fix memory leak introduced by HSO quirk 2010-06-13 11:46:29 +02:00
Marcel Holtmann 66c50b6a72 Add nasty quirk to allow HSO devices to read network code length
The AT+CRSM=192 commands are failing on HSO devices and thus it might
be needed to return its details from a predefined database. Start with
testing this for reading the network code length.
2010-06-13 08:10:13 +02:00
Denis Kenzior 76dc7e4acd atmodem: Shutdown ppp cleanly on remove
There is a race condition from udev / kernel when a USB dongle is
removed.  Sometimes all ports are removed first (and the io channels for
those ports are signaled as hupped) while other times the udev remove
event fires first.

If the latter happens, then gprs_context remove is called with a
potentially live ppp object.  This patch shuts it down cleanly.
2010-06-11 09:20:05 -05:00
Denis Kenzior c3dddcb5b3 atmodem: Always unref ppp when context is down 2010-06-11 09:20:05 -05:00
Marcel Holtmann 45c1bcb1d9 Disable CNMA support for Novatel based devices 2010-06-10 21:06:48 -07:00
Denis Kenzior 6c8d2f0e5b atmodem: Allow ME & SM for status report store 2010-06-10 22:23:05 -05:00
Denis Kenzior a128cbff8b atmodem: Force CDSI delivery for Novatel devices 2010-06-10 20:21:33 -05:00
Denis Kenzior d8e7a7b5e3 atmodem: Add support for status report via CDSI 2010-06-10 20:13:50 -05:00
Denis Kenzior 39391cf32b atmodem: Use atutil based functions 2010-06-10 20:08:10 -05:00
Denis Kenzior 1b36d1cd43 atmodem: Add utility for parsing CMTI/CDSI/CBMI 2010-06-10 20:06:26 -05:00
Denis Kenzior 5a883d1c76 atmodem: Register for notifications after CMGL 2010-06-10 18:43:30 -05:00
Denis Kenzior 150c1e753f atmodem: Split out the +CPMS sender
Just before sending a CMGR for +CMTI notification, use need to
optionally send a CPMS to select the proper storage.  This should be
done in a separate function for potential re-use by CDSI
2010-06-10 18:41:29 -05:00
Marcel Holtmann 2aeb7df627 And some more minor coding style cleanup in SMS driver 2010-06-09 19:13:57 -07:00
Marcel Holtmann 1125ffa7f6 Fix coding style for one comment in SMS driver 2010-06-09 19:12:24 -07:00
Marcel Holtmann a774d9ed49 Add quirk for Qualcomm issues with setting CBS topic ranges 2010-06-09 18:40:59 -07:00
Marcel Holtmann 88d083c4fd Coding style fix for the PIN type table 2010-06-09 18:23:05 -07:00
Denis Kenzior 1d8bb1bab6 atmodem: Fix CPUC parser
Apparently some modems are extra stupid:

AT+CPUC?\r
\r\n+CPUC: \r\nOK\r\n

So if we fail to parse the response, return an error
2010-06-07 20:36:40 -05:00
Denis Kenzior 588b689d2b netreg: whitespace style 2010-06-07 19:06:57 -05:00
Denis Kenzior 6a480bb861 netreg: Add Huawei RSSI unsolicited callback 2010-06-07 19:06:36 -05:00
Denis Kenzior 11c8156543 atmodem: Optimize cops queries
This patch is meant to do two things:
- Some modems, like the Novatel, report bogus operator information when
  not registered, as opposed to simply returning empty strings.  In this
  case we're a little bit more explicit about checking the returned
  mcc/mnc string
- If we determine that the mcc/mnc string is bogus, we don't schedule
  the alphanumeric cops query and return early.
2010-06-07 12:57:50 -05:00
Marcel Holtmann 45ba3b9a7c Add special SMS handling for Huawei based devices 2010-06-06 18:21:30 -07:00
Marcel Holtmann f1c209d973 Move AT_ODO quirk into HSO driver instead of network registration 2010-06-06 15:27:34 -07:00
Marcel Holtmann 5340901ad3 Use unquoted strings for cell information of Novatel devices 2010-06-06 13:14:57 -07:00
Marcel Holtmann 45bf4cf396 Add support for handling CNTI=0 request with Novatel devices 2010-06-06 13:12:37 -07:00
Denis Kenzior 2b1c433daa hso: Enable OUWCTI notifications 2010-06-04 14:21:58 -05:00
Denis Kenzior 56d14e1fe1 atmodem: Put some common code into a utility 2010-06-04 14:21:57 -05:00
Pasi Miettinen 6220c01f4a Change in at_cds_notify for status report 2010-06-04 14:21:57 -05:00
Marcel Holtmann 50a7d3d741 Send OWCTI query when bringing up Option based devices 2010-06-04 12:17:35 -07:00
Marcel Holtmann 1f5432abd6 Use AT_OUWCTI instead of AT_OWCTI as expected
The Option firmware is so funny. It has a typo in the AT command :)
2010-06-04 12:13:27 -07:00
Marcel Holtmann a4fda8a378 Enable Option specific OWCTI unsolicited notifications 2010-06-04 12:08:21 -07:00
Marcel Holtmann 48d210bac6 The ack pdu support is not working on Novatel or Option devices 2010-06-03 18:15:27 -07:00
Marcel Holtmann 23d97f2c0a Quirk SMS handling for Novatel based devices
The Novatel based devices with Qualcomm chips seems to have various
problems. First they advertise CNMI mode 2, but don't support it. And
second they don't support CNMA acknowledgement with a PDU. So fall back
to acks without PDU.
2010-06-03 08:54:08 -07:00
Marcel Holtmann 22d0cc7df2 Add special quirk for Novatel based devices 2010-06-03 01:20:47 -07:00
Marcel Holtmann 24fd3e2f15 The default PPP netmask should be 255.255.255.255 2010-06-03 00:00:42 -07:00
Kalle Valo 125c7c392f atmodem: fix crash during context deactivation
Ofono either crashed or busy looped with my Huawei E1552 3G modem when I
tried to deactivate GPRS context. The reason was that gcd->chat was
unreferenced already in setup_ppp() but the chat was still accessed
later in at_gprs_deactivate_primary().

To fix the problem, change the logic instead to suspend chat session
for PPP and resume when PPP has disconnected. Now it doesn't crash
anymore.

Deactivation still doesn't work properly with Huawei E1552, and most
probably with other Huawei modems, because the modem hangs up the chat
line after PPP deactivation. This needs to be fixed separately. The
workaround is to reboot the modem, for example physically unplug and plug
it in again.
2010-05-26 12:34:07 -05:00
Kalle Valo bf7243eda4 atmodem: refactor context deactivation
The old way of using CGACT is no longer needed.  It is enough
that we shutdown PPP. Recommended by Denis.
2010-05-26 12:32:03 -05:00
Denis Kenzior 96480e44b2 netreg: Fix crash when CREG is reported too early
If we register for CREG notifications before the netreg atom is
registered (e.g. in MBM due to CIND queries) we crash if the CREG
notification arrives before the CIND is queried.
2010-05-19 23:33:17 -05:00
Kalle Valo 36e9803cdc huawei: add gprs context
Tested with Huawei E1552 HSDPA USB stick using a finnish Saunalahti prepaid
SIM.
2010-05-19 23:09:21 -05:00
Kalle Valo bf5b31e8a8 Move report_signal_strength to atutil
The function is needed in two different places, better to move it
to atutil.h.
2010-05-19 23:08:36 -05:00
Andrzej Zaborowski 5e11442ef7 atmodem: Pass allowed response prefixes to gatchat
Not doing this creates a race condition where any notification
comming in in the middle of a sequence of commands may be counted
as a response to one of the commands and get lost.
2010-05-12 12:18:33 -05:00