Commit Graph

1384 Commits

Author SHA1 Message Date
Denis Kenzior afedfcb486 simutil: Get rid of ugly-named functions
Replace them by macros
2010-05-25 16:52:51 -05:00
Andrzej Zaborowski 1c3060026e simutil: Add utilities for encoding BTLV and CTLV 2010-05-25 16:52:50 -05:00
Marcel Holtmann 6322542719 Break function declaration down to two lines 2010-05-25 11:08:58 +02:00
Gustavo F. Padovan d62548bfd0 Bring back -d option without need for argument 2010-05-25 11:08:22 +02:00
Denis Kenzior 73bfae4f46 sim: Read EFiccid after EFphase 2010-05-19 23:48:34 -05:00
Denis Kenzior bbd6a1d48a sim: No need for this define 2010-05-19 23:47:41 -05:00
Daniel Wagner b338033307 Read EF_ICCID property of SIM
Tested with phonesim.
2010-05-19 23:41:03 -05:00
Denis Kenzior 83fc72c95a core: Trivial whitespace error 2010-05-19 05:26:35 -05:00
Aki Niemi b8ec7553ef Add network time support
Adding a new notify function in the netreg atom for notifying a
received Network Identification and Timezone (NITZ) indication. This
data is consumed via a nettime plugin, of which there is also an
example.
2010-05-19 10:46:18 +03:00
Denis Kenzior ecf0c990cf stkutil: reorder command struct order 2010-05-13 15:36:35 -05:00
Yang Gu a1e3cb43ec stkutil: Add timer management command parser 2010-05-13 15:33:26 -05:00
Yang Gu 1a5d9bc8d5 stkutil: Add get reader status command parser 2010-05-13 15:32:49 -05:00
Yang Gu d6e1718a82 stkutil: Add power on card command parser 2010-05-13 15:32:18 -05:00
Yang Gu ee12e0fd50 stkutil: Add power off card command parser 2010-05-13 15:31:59 -05:00
Denis Kenzior 84ea89926f stkutil: Minor style issues and a typo 2010-05-13 15:31:21 -05:00
Yang Gu 5330612d28 stkutil: Add perform card apdu command parser 2010-05-13 15:25:59 -05:00
Yang Gu beb01428b7 stkutil: Add event list command parser 2010-05-13 13:57:11 -05:00
Denis Kenzior c02ae417f4 style: Whitespace errors 2010-05-13 13:55:35 -05:00
Yang Gu 2f1bb15dcf stkutil: Add provide local info command parser 2010-05-13 13:53:08 -05:00
Yang Gu 0dc5c5df6f stkutil: Add polling off proactive command parser 2010-05-13 13:52:20 -05:00
Denis Kenzior 57925606c0 stkutil: file_list instead of fl is better 2010-05-13 13:51:38 -05:00
Yang Gu 7e96402cc0 stkutil: Add refresh proactive command parser 2010-05-13 13:49:28 -05:00
Yang Gu 783bb70599 stkutil: Add setup call proactive command parser 2010-05-13 13:47:22 -05:00
Yang Gu 847539b39d stk: Adjust the sequence of dataobj 2010-05-13 13:46:21 -05:00
Denis Kenzior 1ddc7ebf19 stkutil: Refactor parse_list into parse_item_list
Makes the code much easier to follow
2010-05-13 13:43:16 -05:00
Yang Gu 352a03d537 stkutil: Add select item proactive command parser 2010-05-13 12:29:59 -05:00
Yang Gu d45219e049 stkutil: Add setup menu proactive command parse 2010-05-13 11:07:07 -05:00
Yang Gu 2cc037e136 style: remove extra whitespace 2010-05-13 11:05:33 -05:00
Yang Gu 9f3b2de6f0 stkutil: item objects can be NULL
ETSI 102.223 doesn't mention that alpha id objects can be NULL, however
such objects exist in the 102.384 test specification.
2010-05-13 11:05:06 -05:00
Yang Gu edcd03e570 stkutil: alpha id objects can be NULL
ETSI 102.223 doesn't mention that alpha id objects can be NULL, however
such objects exist in the 102.384 test specification.
2010-05-13 11:04:04 -05:00
Yang Gu 353d955dea simutil: Add comprehension tlv copy
Can be used to save the state of the current iterator and 'peek' ahead.
2010-05-13 11:02:52 -05:00
Yang Gu 5b030c4a19 stk: Add poll interval proactive command parser 2010-05-13 10:53:40 -05:00
Yang Gu 8a33071cd0 stkutil: Parse cdma tpdu in send sms parser 2010-05-11 14:36:37 -05:00
Yang Gu 4374123324 stkutil: Refactor parser for tone objects 2010-05-11 12:24:02 -05:00
Yang Gu 37c2bc8cf2 stkutil: Add play tone proactive command parser 2010-05-11 12:21:51 -05:00
Yang Gu 6e4f5c5122 stk: Unify variable names to use abbreviation 2010-05-11 12:19:09 -05:00
Yang Gu 2eff407957 stkutil: Free default text for get input parser 2010-05-11 12:15:36 -05:00
Andrzej Zaborowski 018ee10f92 Fix: Don't remove wrong atoms
When the state goes from INSERTED to NOT PRESENT and we have not
advanced past the SIM PIN entry, we remove the pre_sim atoms.

Similarly, if we advanced past the SIM PIN stage and subsequently
removed the SIM, the pre_sim atom list should not be tampered with.
2010-05-10 15:26:09 -05:00
Yang Gu c5023690b7 stkutil: Make get inkey parser use its own struct 2010-04-27 09:35:01 -05:00
Yang Gu 1bd755bcdc stkutil: Use char* instead of char**
char ** should only be used for character arrays that are allocated by
the parser.  Static buffers should be passed as char*
2010-04-27 09:33:32 -05:00
Yang Gu 8516a38cf1 stkutil: Add 'more time' proactive command parser 2010-04-27 09:32:06 -05:00
Yang Gu 3ae32b6e51 stkutil: Use struct to represent frame id
Use a field has_id to indicate if we have frame id or not. Originally
we use 0xFF to indicate we don't have frame id. But in that way, we
have to initialize each test case of proactive command when it doesn't
have this comprehension tlv to be 0xFF. To use has_id will save this
effort, and keep consistency with other implementations.
2010-04-27 09:30:59 -05:00
Yang Gu def5c38094 stkutil: Move advance of ctlv to parse_dataobj
Not all the proactive commands have comprehension tlv other than
command details and device identities. So the appropriate code should
be moved to parse_dataobj() from stk_command_new_from_pdu().
2010-04-27 09:30:39 -05:00
Yang Gu 30644d8195 stkutil: Fix the assignment to minimum set 2010-04-26 11:30:52 -05:00
Yang Gu 89d19b37d9 stkutil: Add parser for broadcast network info 2010-04-23 11:52:18 -05:00
Yang Gu aa3c5807ad stkutil: Add parser for activate descriptor 2010-04-23 11:52:18 -05:00
Yang Gu 82f907e0bd stkutil: Add parser for registry app data objects 2010-04-23 11:52:18 -05:00
Yang Gu fe042d8036 stkutil: Add parser for last envelope objects 2010-04-23 11:52:18 -05:00
Yang Gu a6b7618478 stkutil: Add parser for MMS notification objects 2010-04-23 11:52:18 -05:00
Yang Gu e5ce1bb8eb stkutil: Add parser for mm cid objects 2010-04-23 11:52:18 -05:00
Yang Gu 61d89f7a73 stkutil: Add parser for MMS transfer status 2010-04-23 11:52:18 -05:00
Yang Gu 18ee08e598 stkutil: Add parser for MMS identifier objects 2010-04-23 11:52:18 -05:00
Yang Gu b1b75d90d5 stkutil: Add parser for MMS reference objects 2010-04-23 11:52:17 -05:00
Yang Gu d6c5def964 stkutil: Add parser for meid objects 2010-04-23 11:52:17 -05:00
Yang Gu 150e5f3f66 stkutil: Add parser for frames information objects 2010-04-23 11:52:17 -05:00
Yang Gu 642a7ed3ec stkutil: Add parser for frame layout objects 2010-04-23 11:52:17 -05:00
Yang Gu b0d9e6df17 stkutil: Add parser for browsing status objects 2010-04-23 11:52:17 -05:00
Zhenhua Zhang 7111325311 Fix a typo in telephony_error_to_str 2010-04-23 11:52:17 -05:00
Andrzej Zaborowski 6e28fd9396 Fix CTLV three-byte tag parsing. 2010-04-22 17:44:20 -05:00
Denis Kenzior a7fb1624fd stkutil: Another trivial indentation fix 2010-04-21 10:29:27 -05:00
Yang Gu 29e03d316b Add parser for battery state objects 2010-04-21 10:28:43 -05:00
Yang Gu 3e52bb0503 Add parser for network search mode objects 2010-04-21 10:28:21 -05:00
Yang Gu cabb1c89a8 Add parser for imeisv objects 2010-04-21 10:27:58 -05:00
Yang Gu e374b558a2 Add parser for item text attribute list objects 2010-04-21 10:26:04 -05:00
Yang Gu 3e5bf2f6bb Add parser for cdma sms tpdu objects 2010-04-21 10:25:38 -05:00
Denis Kenzior fdfff04073 stkutil: Refactor network access name
Don't allow 0 byte objects
2010-04-21 10:23:56 -05:00
Yang Gu ee85ca8d7a Add parser for network access name objects 2010-04-21 10:18:16 -05:00
Denis Kenzior d2830249c6 stkutil: Trivial indentation fix 2010-04-21 10:17:20 -05:00
Yang Gu 6ac8188ce2 Add parser for esn objects 2010-04-21 10:16:57 -05:00
Denis Kenzior d211da15b2 stkutil: Refactor remote entity address
Don't assign to the return structure until we know we can successfully
parse.
2010-04-21 10:14:04 -05:00
Yang Gu fdfb64d9f1 Add parser for remote entity address objects 2010-04-21 10:12:41 -05:00
Yang Gu f78de0f762 Add parser for service availability objects 2010-04-21 10:10:56 -05:00
Denis Kenzior 24aee7a6b0 stkutil: Refactor attribute information
Only Bluetooth & IRDA are really defined by the specification
2010-04-21 10:09:12 -05:00
Yang Gu 9b911a8d59 Add parser for attribute information objects 2010-04-21 10:08:28 -05:00
Denis Kenzior 9fa51c4fb5 stkutil: Refactor service search
Only Bluetooth & IRDA are really defined by the specification
2010-04-21 10:07:32 -05:00
Yang Gu 2c2bcced5e Add parser for service search objects 2010-04-21 10:05:43 -05:00
Denis Kenzior 432effa755 stkutil: refactor device filter
Only Bluetooth & IRDA are really defined by the specification
2010-04-21 10:04:13 -05:00
Yang Gu 515eef4db0 Add parser for device filter objects 2010-04-21 09:08:53 -05:00
Yang Gu 05e13603f4 Add parser for service record objects 2010-04-21 09:03:14 -05:00
Yang Gu aac9596714 Add parser for display parameters objects 2010-04-21 09:02:39 -05:00
Yang Gu 244d4d261e Add parser for access technology objects 2010-04-21 09:02:17 -05:00
Yang Gu 3dc106c627 Add parser for aid objects 2010-04-20 15:48:46 -05:00
Yang Gu 5bc4834c19 Add parser for UICC/TE transport interface level 2010-04-20 15:45:43 -05:00
Denis Kenzior 88be6109a2 Fix: Don't crash by calling sim watch too early
The modem sim watch is only watching for removed and ready conditions,
so no need to call it prematurely
2010-04-15 16:49:43 -05:00
Denis Kenzior 214c7dd776 Fix: Make distcheck happy 2010-04-15 16:49:43 -05:00
Denis Kenzior 50264a311d Style: Proper indentation 2010-04-15 16:49:42 -05:00
Denis Kenzior 9a9a05095d Refactor: Keep separate lists for pre/post atoms 2010-04-15 16:49:42 -05:00
Denis Kenzior 0ac64d66e8 Refactor: use a switch/case to make more readable 2010-04-15 16:49:42 -05:00
Andrzej Zaborowski f27946b4b0 Remove post-sim atoms after SIM is extracted. 2010-04-15 16:49:42 -05:00
Denis Kenzior 1786c17c3f Refactor: Store the sim object inside voicecalls
Makes the logic a bit easier to follow.  Also use a switch/case inside
the sim state watcher.
2010-04-15 16:49:42 -05:00
Denis Kenzior fa37f158d1 Style: Proper indentation 2010-04-15 16:49:42 -05:00
Denis Kenzior ab4cae5479 Fix: The null check should be done elsewhere 2010-04-15 16:49:41 -05:00
Denis Kenzior 9271842748 Fix: Make the name a bit clearer 2010-04-15 16:49:41 -05:00
Denis Kenzior 632dc4c7e9 Fix: No glib types in oFono public API 2010-04-15 16:49:41 -05:00
Andrzej Zaborowski 1ca8671d11 Handle EFen list when SIM inserted / removed 2010-04-15 16:49:41 -05:00
Denis Kenzior ee74f53160 Fix: Look for the STK atom, not SIM atom 2010-04-15 16:49:41 -05:00
Denis Kenzior 8f00272563 Fix: Process CBS sim downloads if STK atom exists 2010-04-15 16:49:41 -05:00
Andrzej Zaborowski aad4d0de78 Add Sim Toolkit atom
- Add ofono_stk atom in stk.c
- Move envelope command from sim driver to stk driver
2010-04-15 16:49:40 -05:00
Denis Kenzior 228e1e735c Fix: Minor style issues 2010-04-15 16:49:40 -05:00
Denis Kenzior c63b2c9d44 Fix: Uncomplicate the logic for SIM initialization
If we get a sim inserted notify before we are registered, we need to
initialize the SIM once ofono_sim_register is called.  The logic for
doing so is rather twisted, simplify it.
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski 6dc4799d1b Add SIM "Present" property. 2010-04-15 16:49:40 -05:00
Andrzej Zaborowski ddfe8acf11 Drivers can notify core of SIM insertion / removal
Add ofono_sim_inserted_notify function to notify the core of SIM
insertion / removal.

Make every plugin generate a sim inserted event on start.  For devices
with removable card, the event should be emitted after the
plugin detects such event.  For devices that need to wait for SIM card
initialization, they can emit this event later.
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski 22cbe98146 Extend sim-ready watch with card insert/eject 2010-04-15 16:49:40 -05:00
Denis Kenzior 962d2fff50 Fix: Use a union for other address objects 2010-04-14 13:10:45 -05:00
Yang Gu f86c13ce8b Add parser for other address objects 2010-04-14 12:57:28 -05:00
Yang Gu db1e61cf3c Add parser for card reader identifier objects 2010-04-14 12:52:09 -05:00
Yang Gu c48a6f0c21 Add parser for channel status objects 2010-04-14 12:50:58 -05:00
Yang Gu 491832b907 Add parser for buffer size objects 2010-04-14 12:49:13 -05:00
Yang Gu c25fba0f07 Add parser for channel data length objects 2010-04-14 12:41:33 -05:00
Yang Gu 4cf275ba8d Add parser for channel data objects 2010-04-14 12:41:19 -05:00
Yang Gu 3bc3d985ab Add parser for bearer description objects 2010-04-14 12:40:32 -05:00
Yang Gu 9b3d97d705 Add parser for browser termination cause objects 2010-04-14 12:38:58 -05:00
Yang Gu 03b6249f1e Add parser for provisioning file reference objects 2010-04-14 12:36:52 -05:00
Yang Gu b08d90c816 Refactor: Break out stk_file iterator
For use by other data object parsers besides file lists
2010-04-14 12:34:02 -05:00
Yang Gu 6780c0282a Add parser for bearer objects 2010-04-14 12:25:08 -05:00
Denis Kenzior d63e33d5e5 Fix: Handle NULL URLs 2010-04-14 12:23:42 -05:00
Yang Gu 97bd01ba1b Add parser for url objects 2010-04-14 12:22:22 -05:00
Yang Gu 7fce623ea9 Fix the logic when parsing c-apdu objects 2010-04-14 12:16:08 -05:00
Denis Kenzior 398acbc976 Fix: Make the C-APDU logic more readable 2010-04-02 11:28:02 -05:00
Denis Kenzior c2d46ba4eb Style: Multiline comments 2010-04-02 11:20:44 -05:00
Denis Kenzior 5665cefd47 Fix: Tweak the language parser 2010-04-02 11:19:03 -05:00
Denis Kenzior af3af57696 Fix: Remove erroneous comment 2010-04-02 11:11:53 -05:00
Denis Kenzior 30c07824ed Fix: AT Commands are probably just text 2010-04-02 11:11:13 -05:00
Denis Kenzior 6fb687b996 Fix: Trivial indentation issues 2010-04-02 11:08:41 -05:00
Yang Gu 46f5f65214 Add parser for browser identity objects 2010-04-02 11:05:42 -05:00
Yang Gu f5c0041240 Add parser for language objects 2010-04-02 11:05:17 -05:00
Yang Gu fa846bd4a4 Add parser for dtmf string objects 2010-04-02 11:04:44 -05:00
Yang Gu 2490058b08 Add parser for bc repeat indicator objects 2010-04-02 11:03:07 -05:00
Yang Gu 0958247c3f Add parser for at response objects 2010-04-02 11:02:53 -05:00
Yang Gu 94b4c25517 Add parser for at command objects 2010-04-02 11:02:42 -05:00
Yang Gu 1ae1fc8778 Add parser for date-time and time zone objects 2010-04-02 11:01:56 -05:00
Yang Gu b20e0d2bf5 Make function decode_scts public 2010-04-02 11:00:56 -05:00
Yang Gu 5b7de64aca Add parser for timer value objects 2010-04-02 10:59:45 -05:00
Yang Gu 8bc04ba93a Refactor: Break out semi-octet decoder
Refactor decode_scts to use this function
2010-04-02 10:58:53 -05:00
Yang Gu 8bad7e540a Add parser for timer identifier objects 2010-04-02 10:56:15 -05:00
Yang Gu 5f9f4fedee Add parser for r-apdu objects 2010-04-02 10:55:55 -05:00
Yang Gu afc2cb84e3 Add parser for c-apdu objects 2010-04-02 10:54:47 -05:00
Yang Gu 8e91f477f9 Add parser for card atr objects 2010-04-02 10:47:37 -05:00
Yang Gu eef57d221c Add parser for card reader status objects 2010-04-02 10:46:23 -05:00
Denis Kenzior 0aebcb342c Fix: Regression in PIN validity checking 2010-04-02 09:17:34 -05:00
Andrzej Zaborowski b6d4dd78c4 Refactor: Return a string from USSD Respond method
Return network's USSD reponses from the Respond method instead of
signaling over D-Bus.  This should make the UI writer's job a little
easier.
2010-03-31 13:49:31 -05:00
Andrzej Zaborowski 42ef218668 Use stkutil named constants in sim.c 2010-03-31 13:06:14 -05:00
Denis Kenzior 33e11e910c Fix: Be more consistent with other boundary checks 2010-03-31 12:22:57 -05:00
Denis Kenzior 8768afb6df Style: indentation fixes 2010-03-31 12:20:02 -05:00
Yang Gu 744c86a78b Fix: Increate iterator when parsing fails
If the comprehension TLV tag matches the expected handler, and the
handler fails to parse the tag, then increase the iterator.
2010-03-31 12:16:39 -05:00
Yang Gu 3436bcac05 Rename stk_icon_identifier to stk_icon_id 2010-03-31 12:15:31 -05:00
Yang Gu be20435b58 Add parser for item icon identifier list objects 2010-03-31 12:15:08 -05:00
Yang Gu 0300462b42 Add enum for icon qualifier 2010-03-31 12:14:33 -05:00
Yang Gu ee4a3d2b12 Add parser for call control requested action objects 2010-03-31 12:14:24 -05:00
Yang Gu f15a5c73b4 Add parser for transaction identifier objects 2010-03-31 12:13:46 -05:00
Yang Gu 8b57078825 Add parser for location status objects 2010-03-31 12:13:17 -05:00
Yang Gu 51889d7f03 Add parser for cause objects 2010-03-31 12:12:57 -05:00
Yang Gu fc85e158e9 Add parser for event list objects 2010-03-31 12:12:10 -05:00
Yang Gu a60ae2b7ba Add parser for items next action indicator objects 2010-03-31 12:11:39 -05:00
Yang Gu d9f063f431 Reorder the declarations of stk data objects 2010-03-31 12:10:40 -05:00
Denis Kenzior f60e6ce134 Refactor: Text / Default text parsing 2010-03-30 10:21:57 -05:00
Denis Kenzior 402c27f914 Refactor: Break out the STK text decoding utility
This can be used for other data objects than text and default text
2010-03-30 10:21:56 -05:00
Denis Kenzior f8140bf66b Refactor: generic boolean parsers 2010-03-30 10:21:54 -05:00
Denis Kenzior 8646e13bf3 Refactor: Don't repeat tag checking ad naseum
The tag checking can be done safely once inside the main parsing
function, no need to repeat it in the individual object parsers.
2010-03-30 10:21:54 -05:00
Denis Kenzior 5b9888ce3b Style: More consistent indentation 2010-03-30 10:21:53 -05:00
Denis Kenzior 1889070314 Fix: measurement results are binary data 2010-03-29 16:40:14 -05:00
Yang Gu 8045516d58 Add parser for network measurement results objects 2010-03-29 16:39:43 -05:00
Marcel Holtmann 9ee614b64b Check for capabilities support via libcap-ng 2010-03-29 11:06:04 -07:00
Denis Kenzior 7972f844c7 Refactor: Simplify the internal GPRS API
We no longer expose lac/ci/tech attributes obtained from CGREG
(some modems, like ISI, do not even report them for GPRS separately).
Simplify the internal gprs driver api to only report the registration
status (e.g. home, roaming, searching, not registered, etc)
2010-03-26 23:00:28 -05:00
Denis Kenzior 88994bbe81 Refactor: Get rid of DCM properties
Be conformant with the API changes from the previous commit
2010-03-26 23:00:28 -05:00
Denis Kenzior 59a2bcd380 Fix: No need to malloc memory for this 2010-03-25 11:39:45 -05:00
Yang Gu b42248b480 Add parser for help request objects 2010-03-25 11:37:09 -05:00
Yang Gu 765861b82b Refactor: Use common bool to implement imm resp 2010-03-25 11:36:49 -05:00
Yang Gu 77747fbc4f Add parser for common bool object 2010-03-25 11:36:11 -05:00
Yang Gu dcb62b8df1 Add parser for imei objects 2010-03-25 11:36:11 -05:00
Yang Gu cf38ef05ba Add parser for location information objects 2010-03-25 11:36:11 -05:00
Yang Gu a13db81229 Make the function to parse mcc and mnc public 2010-03-25 11:36:11 -05:00
Yang Gu 8ecf7fd24d Rename: stk data object enum names
Be more consistent
2010-03-25 11:35:32 -05:00
Denis Kenzior e05318aa5a Refactor: Rename netreg Operator property to Name 2010-03-25 10:57:52 -05:00
Denis Kenzior 538cd6a1cb Refactor: Rename radio setting type names 2010-03-25 10:42:48 -05:00
Denis Kenzior 77693b697d Rename AvailableOperators to Operators 2010-03-25 10:37:46 -05:00
Denis Kenzior 1e783b33d9 Refactor: Simplify Technology values
Applications don't really understand our current values very well and
would need to look up the spec.  Instead we change to much more commonly
accepted terms.
2010-03-25 10:29:01 -05:00
Denis Kenzior 9390dbaf31 Refactor: Remove MobileNetworkCodeLength property
Replaced by MNC/MCC properties which is more intuitive for use by
external applications.
2010-03-25 10:21:37 -05:00
Yang Gu dd2a1e648b Add enum for cdma sms tpdu data objects 2010-03-24 15:23:50 -05:00
Yang Gu 6e70b6eeea Fix enum for more time proactive command 2010-03-24 15:23:49 -05:00
Denis Kenzior d3ac9188f0 Fix: Handle broken modems that returns empty COPS 2010-03-23 21:16:50 -05:00
Denis Kenzior 01a4a93bee Move netreg interface definitions to dbus.h 2010-03-23 13:35:58 -05:00
Denis Kenzior 5609034d97 Style: Fixup some style issues
- Large if statements should be handled as switchcase
- Avoid initialization of variables, even if code needs to be rearranged
2010-03-23 12:31:00 -05:00
Yang Gu 0ef68e31e2 Add parser for file list objects 2010-03-23 12:12:03 -05:00
Denis Kenzior a5d54581ad Move sim manager interface definition to dbus.h 2010-03-22 15:39:13 -05:00
Denis Kenzior 0e09221ea5 Move cbs interface definition to dbus.h 2010-03-22 15:36:04 -05:00
Denis Kenzior 500f291030 Move call volume interface definition to dbus.h 2010-03-22 15:33:56 -05:00
Denis Kenzior bbfd7db3cc Move mwi interface definition to dbus.h 2010-03-22 15:31:03 -05:00
Denis Kenzior 6425706c9d Move radio settings interface definition to dbus.h 2010-03-22 15:29:03 -05:00
Denis Kenzior 5ab70ab5f2 Move sms interface definition to dbus.h 2010-03-22 15:28:08 -05:00
Denis Kenzior e1e036b5df Move voicecall interface definitions to dbus.h 2010-03-22 15:27:08 -05:00
Marcel Holtmann 256c6e14c7 Revert the default statement for PIN type checking
Also fix the coding style for the switch statement and remove the
number assignment for an internal enum.
2010-03-20 02:26:57 +01:00
Denis Kenzior d6e78f7828 Trivial: Add break statement
In case we ever extend the enum/switch and unwittingly introduce a bug.
2010-03-19 13:52:57 -05:00
Pekka Pessi 9a398a1087 Fix: Check password length based on its type
The different password types have different length requirements, so
update is_valid_pin to validate according to the password type being
validated (PIN / PUK / NET)
2010-03-19 13:48:04 -05:00
Pekka Pessi 3f6da155bd Fix: Interrogation of barring does not need pin 2010-03-18 11:36:19 -05:00
Pekka Pessi 7b62731ded Fix: Number of barring services is constant 2010-03-18 11:36:09 -05:00
Denis Kenzior d1c85bd14c Style: Remove the now unnecessary braces 2010-03-18 11:27:06 -05:00
Pekka Pessi cf18a9df27 Fix: Return newly-queried barring status
We were returning the contents of the old locks
2010-03-18 11:13:22 -05:00
Pekka Pessi 15a4ecf8a8 Fix: call barring can only be (de)activated 2010-03-18 11:09:36 -05:00
Denis Kenzior b3a6883125 Fix: Use g_try_malloc when parsing stk result 2010-03-16 17:42:18 -05:00
Denis Kenzior e246b414c9 Fix: Use g_try_malloc when parsing stk address 2010-03-16 17:42:08 -05:00
Denis Kenzior 213e1ed65a Fix: Use g_try_malloc instead of g_malloc in util
In these cases we were checking for NULL return, but the function used
should have been g_try_malloc instead.
2010-03-16 17:21:06 -05:00
Denis Kenzior 68b01ce93e Refactor: create_dirs logic
- Remove reference to g_malloc and replace with g_try_malloc
- Be extra pedantic on the inputs
- Refactor the logic to make it slightly easier to follow
2010-03-16 17:19:01 -05:00
Denis Kenzior 62007cd074 Fix: Fixup error paths in sim_op_check_cached 2010-03-16 15:45:04 -05:00
Denis Kenzior b025179101 Fix: avoid assigning to return structure on error 2010-03-16 15:30:07 -05:00
Denis Kenzior 66557e0d2b Style: Spaces before / after arithmetic operations 2010-03-16 15:30:07 -05:00
Denis Kenzior d18d66b712 Style: Align the enum values to be easier to read 2010-03-16 15:30:07 -05:00
Yang Gu 26f28df18a Handle the conversion failure when parsing item 2010-03-16 15:30:06 -05:00
Yang Gu 69846439e6 Fix the structure of stk_subaddress 2010-03-16 15:30:06 -05:00
Denis Kenzior 79630b2bd4 Add stk tone type enum 2010-03-15 21:11:11 -05:00
Denis Kenzior e64596f1dc Add parser for STK send sms proactive commands 2010-03-15 21:02:06 -05:00
Denis Kenzior a16f270eb1 Refactor: stk send_sms datastructure 2010-03-15 21:02:06 -05:00
Denis Kenzior 6986cc4760 Refactor: stk result dataobject 2010-03-15 21:02:06 -05:00
Denis Kenzior a74bd04edf Reorder: stk response length structure
Follow the order of the specification
2010-03-15 21:02:06 -05:00
Denis Kenzior 12e411e6fc Refactor: stk item id dataobj 2010-03-15 21:02:06 -05:00
Denis Kenzior 6404e7c4bd Refactor: stk item dataobject 2010-03-15 21:02:06 -05:00
Denis Kenzior 44476dac9e Refactor: stk configuration capability parameters 2010-03-15 21:02:06 -05:00
Denis Kenzior e5dff20ff5 Refactor: Update the subaddress structure 2010-03-15 21:02:06 -05:00
Denis Kenzior bbf67bd4a0 Refactor: stk alpha identifier object
Style issues, we must also return FALSE in case conversion fails
2010-03-15 21:02:02 -05:00
Denis Kenzior 1dfb59b610 Refactor: stk address structure 2010-03-10 13:17:22 -06:00
Yang Gu ea1dc4811f Add parser for tone objects 2010-03-10 13:14:12 -06:00
Yang Gu 3a826529e9 Add parser for sms tpdu objects 2010-03-10 13:14:12 -06:00
Yang Gu 81e01f82cc Add parser for result objects 2010-03-10 13:14:12 -06:00
Yang Gu a2beff9011 Add parser for item identifier objects 2010-03-10 13:14:12 -06:00
Yang Gu 08faed2287 Add parser for item objects 2010-03-10 13:14:12 -06:00
Yang Gu cb33d07764 Add parser for capability configuration parameters objects 2010-03-10 13:14:12 -06:00
Yang Gu 7b663e9474 Add parser for subaddress objects 2010-03-10 13:14:12 -06:00
Yang Gu 94848b6feb Add parser for alpha identifier objects 2010-03-10 13:14:11 -06:00
Yang Gu ec31f1eabb Add parser for address objects 2010-03-10 13:14:11 -06:00
Denis Kenzior 4c5aaabca4 Fix: warning
src/stkutil.c: In function ‘parse_dataobj_imm_resp’:
src/stkutil.c:191: error: unused variable ‘data’
2010-03-02 12:39:15 -06:00
Denis Kenzior b06cce24d8 stk: Validate src/dst combination 2010-03-01 18:16:23 -06:00
Denis Kenzior 2ea8877b48 Add support for Get Input proactive command 2010-03-01 18:00:57 -06:00
Denis Kenzior 700a0ece69 Support Default Text data objects 2010-03-01 18:00:57 -06:00
Denis Kenzior 2c1cdebd1a Add parser for Response Length objects 2010-03-01 18:00:54 -06:00
Denis Kenzior 704d6175b7 Cleanup: Move some stuff around to be more logical 2010-03-01 17:56:16 -06:00
Denis Kenzior 54ac375066 Add support for GET INKEY proactive command 2010-03-01 17:42:02 -06:00
Denis Kenzior f4f6284f26 Add parser for Frame Identifier object 2010-03-01 17:21:47 -06:00
Denis Kenzior c8c318d8b9 Add parser for text attribute objects 2010-03-01 16:18:17 -06:00
Denis Kenzior e0501c4930 Add parser for Duration objects 2010-03-01 16:02:33 -06:00
Denis Kenzior 36c9201246 Style: add relevant sections for dataobj parsers 2010-03-01 15:26:33 -06:00
Denis Kenzior 95d44f76b5 Add parser for STK Immediate Response objects 2010-03-01 15:26:31 -06:00
Denis Kenzior e8fab61c16 Add parsing for Icon Identifier objects 2010-03-01 15:15:37 -06:00
Andrzej Zaborowski 3a9cd4fc03 Use stk_envelope_type constant name in sim.c 2010-02-27 11:40:16 -06:00
Andrzej Zaborowski 9ee8e9f8f0 Fix: Enter RESPONSE_SENT state in ussd response cb 2010-02-27 11:22:31 -06:00
Denis Kenzior 172c68edf5 stk: Refactor proactive command parser
Make it a bit easier to extend by using va_args
2010-02-27 10:20:23 -06:00
Denis Kenzior 6497d29719 stk: Add text attribute structure 2010-02-27 10:19:51 -06:00
Denis Kenzior 5144254f62 stk: Add Duration structure 2010-02-27 10:19:19 -06:00
Denis Kenzior 4603965fc3 stk: Add icon identifier structure 2010-02-27 10:17:22 -06:00
Denis Kenzior 0418a682b8 Add duration type enum 2010-02-27 10:09:30 -06:00
Denis Kenzior d90aa1561f Add basic support for USAT/CAT proactive commands
Only display_text with mandatory fields is currently supported.
2010-02-23 17:10:26 -06:00
Denis Kenzior 19a20e4ccd Add COMPREHENSION TLV iterator utilities 2010-02-23 12:03:04 -06:00
Denis Kenzior d98be70fa9 Add Simple TLV iterator utilities 2010-02-23 12:03:03 -06:00
Denis Kenzior 0db0108120 Fix: EFspdi parsing
EFspdi is a nested BER-TLV structure.  The outside BER-TLV has the tag
A3, and the inside contains the PLMN list TLV with tag 0x80.
2010-02-23 12:03:03 -06:00
Denis Kenzior 5a86a7408a Rewrite ber_tlv_find_tag to use ber_tlv iterator 2010-02-23 12:03:03 -06:00
Denis Kenzior 077cfe284e Move from header to implementation 2010-02-23 12:03:03 -06:00
Denis Kenzior 0d163e6295 Add BER-TLV iterator utilities 2010-02-23 12:03:00 -06:00
Denis Kenzior 6e03aa7c0b Add STK device identity enum 2010-02-18 16:21:48 -06:00
Denis Kenzior 3bc0024817 Add enumeration for STK Comprehension TLV objects 2010-02-18 10:58:22 -06:00
Denis Kenzior 1da0ea3b1d Add Sim Toolkit Envelope type enum 2010-02-17 18:23:56 -06:00
Denis Kenzior 32a9931056 Add Sim Toolkit Proactive Command enum 2010-02-17 18:23:53 -06:00
Denis Kenzior 9aeed6dbcc Add stubs files for Sim Toolkit Utilities 2010-02-17 15:10:33 -06:00
Denis Kenzior 1c3aaaacc6 Refactor: ussd user response
When the user sends a response, the network can still continue the
dialog, it is not a final response and we cannot transition to an idle
state when the command finishes.  Instead we set it back to a special
state and treat subsequent network responses as unsolicited.
2010-02-16 10:18:04 -06:00
Denis Kenzior 1bebc1b469 Cleanup: Minor API tweaks for USSD 2010-02-16 10:17:52 -06:00
Andrzej Zaborowski 740f8e3f09 Handle network-initiated ussd requests.
This adds the methods on the D-bus interface to allow the
client to handle USSD requests from the network, according to 22.090.
Unfortunately this document is not clear on every point and some
details can't be implemented.  This includes reporting unsupported
request to the network, unsupported language, ME busy etc, because
there isn't an AT command for that.
2010-02-16 10:17:40 -06:00
Andrzej Zaborowski 0bac79f1a2 Fix: Use g_dbus_emit_signal in call-barring,meter 2010-02-15 14:57:25 -06:00
Denis Kenzior 1ab40c469b Cleanup: Get rid of USSD_FLAG_PENDING 2010-02-15 11:04:08 -06:00
Denis Kenzior af4d4aeaeb Fix: Trivial mistake 2010-02-12 18:48:32 -06:00
Denis Kenzior d87f285fdf Add support for modem names 2010-02-12 18:29:41 -06:00
Inaky Perez-Gonzalez ec7b597bd9 Fix: plugin version mismatch warning
When complaining about plugin version mismatch, print the
version information
2010-02-10 23:52:13 -06:00
Inaky Perez-Gonzalez 8b54792cdd Clean: no error path needed
Remove unneeded error path and document the rationale behind it in
__ofono_modem_get_list() and manager_get_properties().
2010-02-10 18:06:46 -06:00
Denis Kenzior 4b81513d95 Style: if statement 2010-02-10 16:41:31 -06:00
Aki Niemi 02acd8441d Enable USSD_STATE_USER_ACTION
If the network requests user action in the response to an MO USSD, we
cannot immediately return to USSD_STATE_USER_IDLE. Instead,
USSD_STATE_USER_ACTION is entered.

Note that it is left up to the driver to notify() when the USSD
transaction is closed by the network due to inactivity. Another way to
return to USSD_STATE_IDLE is for the user to cancel() the transaction.
2010-02-09 23:19:11 +02:00
Aki Niemi 8730339f40 Move USSD status enum to header 2010-02-09 22:31:32 +02:00
Denis Kenzior ea771ec186 Fix: Tweak gprs attach logic
We use driver_attached to track whether the driver is attached /
attaching.  Unfortunately we only set it when set_attached succeeds.
Instead we should set it right away when calling set_attached, so we
cover pending attaches as well.
2010-02-08 15:33:17 -06:00
Denis Kenzior d11505f751 Fix: Add recheck flag to gprs
When a powered is toggled quickly, we ignore the second request.  This
flag tells us that we should recheck what the attach status should be
once the current operation finishes
2010-02-08 15:32:04 -06:00
Denis Kenzior 87ca1b0c8f Fix: Don't use ofono_debug directly in the core
Use DBG macro which is integrated with the new debug framework.
2010-02-08 11:54:03 -06:00
Denis Kenzior dc16aa7937 Fix: Use snprintf instead of sprintf in the core 2010-02-05 10:33:58 -06:00
Aki Niemi 8d4004d182 Add radio settings atom and driver API
This interface exposes a read-write property for radio access technology
selection mode.
2010-02-04 23:43:18 +02:00
Denis Kenzior ad5b2fd26f Fix: Unnecessary initializations 2010-02-04 00:24:14 -06:00
Denis Kenzior 08b26238c1 Fix: missing break statement 2010-02-04 00:05:57 -06:00
Denis Kenzior e5bcf50a0c Fix: Wrong variables use
Copy/paste error from above resulted in incorrect variables being used
for comparison.
2010-02-03 23:58:27 -06:00
Denis Kenzior fa433a6acc Fix: Check for \r in UCS2 alphabets 2010-02-03 23:28:41 -06:00
Marcel Holtmann 7d7a61f933 Fix some leftover oudated copyrights 2010-01-28 22:10:51 +01:00
Marcel Holtmann a82a62bd31 Remove empty block for SIGPIPE handling 2010-01-26 10:07:56 +01:00
Marcel Holtmann e4850f2eeb Add support for dynamic debug feature 2010-01-26 10:06:53 +01:00
Denis Kenzior 675ef623c7 Fix: Process CBS settings even if no EFcbmid
If EFcbmid is not present, corrupt or empty the code that bootstraps the
CBS settings is never called.
2010-01-20 21:35:33 -06:00
Denis Kenzior 03fd69ace9 Fix: Print errors for unlikely CBS failures
These indicate driver / hardware issues rather than anything else.
2010-01-20 21:34:19 -06:00
Denis Kenzior ea6ab1ea2b Fix: NULL check both set_topics and clear_topics 2010-01-20 21:08:52 -06:00
Denis Kenzior 11de395af9 Fix: Make the powered setting actually work 2010-01-20 21:03:17 -06:00
Denis Kenzior e829727224 Fix: Default to powered=true for CBS 2010-01-20 10:26:02 -06:00
Marcel Holtmann e433ddc100 Add command line option for printing version number 2010-01-16 19:29:43 -08:00
Denis Kenzior d9bb71e521 Fix: Don't try to unregister a null mcc/mnc
Network operators with null MCC & MNC are not registered, but we try to
unregister them.  Don't do this as it causes a crash.
2010-01-13 11:40:15 -06:00
Denis Kenzior 506eb11b02 Make setting CPHS MWIS actually work 2010-01-12 18:20:51 -06:00
Andrzej Zaborowski 6c1a997902 Persist CBS Topics list, handle EF-CBMI, EF-CBMIR.
The two SIM files are only used to bootstrap the topics list value
if there's no previous value.
2010-01-12 18:03:34 -06:00
Denis Kenzior 9bed04ca2f Style: Trailing whitespace & extra lines 2010-01-12 17:54:37 -06:00
Denis Kenzior bb0dfd9b6d Fix: Make the CPHS MWIS version actually work 2010-01-12 17:54:18 -06:00
Denis Kenzior 0fb3873e6d Refactor: Move copy-pasted code into a function 2010-01-12 17:53:56 -06:00
Denis Kenzior 5206f9a9dc Fix: Refactor error conditions 2010-01-12 15:57:23 -06:00
Denis Kenzior deb9d88669 Reorder CPHS initializatin order
Two issues
  - CPHS MWIS file must always be read, the specification isn't clear
    whether it depends on the Mailbox service to be available
  - CPHS MBDN file must be read after we read EFmbdn, otherwise it will
    not be processed properly
2010-01-12 15:55:19 -06:00
Denis Kenzior 0d7f8933ff Fix: Create a dedicated callback for syncs
When synchronizing CPHS MBDN, create a separate callback that doesn't
try to emit signals, etc since the main work has already been done when
EFmbdn was set successfully.
2010-01-12 15:53:19 -06:00
Denis Kenzior 476bd84b98 Remove #if 0 2010-01-12 15:51:28 -06:00
Denis Kenzior e9b40dbe7a Fix: Don't recurse infinitely
We try to keep the CPHS MBDN elementary file in sync with EFmbdn,
unfortunately we share the same callback, which leads to infinite
recursive writes.

Also cleanup the set_mbdn_request structure if the write fails.
2010-01-12 15:45:30 -06:00
Denis Kenzior 0382f64353 Refactor: Rename & Restructure cphs_support
- Rename to cphs_service_table to be more inline with the specification.
- Since the spec allows arbitrary length service tables, use an unsigned
  char * return instead of a short.
- Use bit_field function instead of defining an enum
2010-01-12 11:27:31 -06:00
Denis Kenzior 2b231c3f84 Rename: Rename CPHS Phase enums
Be more consistent with the 3GPP Phase names
2010-01-12 11:23:21 -06:00
Andrzej Zaborowski 96a93b5829 If EF-MWIS is not available use the CPHS version. 2010-01-12 11:12:41 -06:00
Andrzej Zaborowski f97d203392 Use CPHS version of mailbox numbers on SIM if 3GPP version not available.
Otherwise just try to keep the CPHS version of the files in sync.
2010-01-12 11:12:01 -06:00
Andrzej Zaborowski 637ca18af4 Retrieve CPHS phase (if any) from SIM. 2010-01-12 10:35:51 -06:00
Aki Niemi 8f99e50ce5 Remove trailing/leading whitespace 2010-01-11 11:08:42 +02:00
Denis Kenzior 20db731484 Make primary context ids persistent 2010-01-07 14:43:21 -06:00
Denis Kenzior 230bddf30e Fix: Be paranoid and check that last is in range 2010-01-07 14:42:46 -06:00
Denis Kenzior bdfa90bd14 Add idmap_take utility 2010-01-07 14:42:29 -06:00
Denis Kenzior bf209425e5 Use idmap to allocate primary context ids 2010-01-07 14:07:52 -06:00
Denis Kenzior 4e621f3ad3 Change the semantics to return id > max on failure 2010-01-07 14:06:45 -06:00
Denis Kenzior 0ed5c70010 Fix: Fail if no driver or id range set 2010-01-07 13:25:32 -06:00
Denis Kenzior cdfe6dd342 Use the new from_range idmap constructor 2010-01-07 13:25:10 -06:00
Denis Kenzior af007cde66 Add idmap_from_range constructor 2010-01-07 13:20:48 -06:00
Denis Kenzior 6051d0bdde Refactor: Use idmap to allocate CIDs 2010-01-07 13:01:12 -06:00
Denis Kenzior 35cbb135f6 Add initial implementation of idmap utilities 2010-01-07 12:59:51 -06:00
Denis Kenzior 1b5c314f9a Refactor: Allow persisent modem names 2010-01-06 15:50:25 -06:00
Denis Kenzior 45f2f9315f Set phase to unknown until we probe it 2010-01-06 14:17:27 -06:00
Denis Kenzior beb3e032e4 Refactor: Preserve Phase obtained from the SIM 2010-01-06 13:19:47 -06:00
Andrzej Zaborowski b4c3e1c1cc Index SIM cache by phase also. 2010-01-06 13:14:20 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Marcel Holtmann 0b359e89db Use error label instead of err or err_out 2009-12-24 07:09:09 -08:00
Denis Kenzior 955e6a61ee Style: Fix a few more occurences of if/else
See Linux coding style document for details
2009-12-17 21:45:39 -06:00
Denis Kenzior 7ffd9cb8e8 Style: Flip the if statement
The if case should have the multiple expressions
2009-12-17 21:45:39 -06:00
Denis Kenzior 3b9b6201c1 Style: Add empty lines where needed 2009-12-17 21:45:39 -06:00
Andrzej Zaborowski 8365fc1206 Add Powered property to CbsManager. 2009-12-17 21:45:39 -06:00
Denis Kenzior 0bd6739766 Style: Fixup style issues 2009-12-17 21:45:39 -06:00
Andrzej Zaborowski da6f3e63e0 Handle EF-CBSMID contents. 2009-12-17 21:45:39 -06:00
Andrzej Zaborowski a964411180 Add utility for checking if CBS topic is in range 2009-12-17 21:45:38 -06:00
Andrzej Zaborowski 50d855d91f Support 51.011 EFecc format.
EFecc has different formats in G2 and G3 UICC specs.
2009-12-16 11:10:33 -06:00
Denis Kenzior 7a5de89f32 Fix: Concatenation of datagram SMS messages
The 16 bit port address was not being computed correctly.
2009-12-14 10:14:29 -06:00
Denis Kenzior 70e1d47baa Add context-id allocation / deallocation code
This also disables attempts to use multiple active contexts.  The code
isn't setup to do this yet.
2009-12-09 21:02:47 -06:00
Denis Kenzior 8495e047e6 Refactor: use unsigned ints for cids 2009-12-09 21:02:47 -06:00
Denis Kenzior 58c8a33adf Fix: Reset active contexts if gprs is detached
When we lose network registration or are forcefully detached from the
network we must reset all active contexts to inactive.
2009-12-08 17:19:40 -06:00
Denis Kenzior 2ac70c7f27 Reset context settings when context is deactivated 2009-12-08 17:19:23 -06:00
Denis Kenzior a1ea26cd9d Style: Remove extra blank line 2009-12-08 17:11:35 -06:00
Denis Kenzior bea0fd608e Fix: Be more paranoid even during shutdown 2009-12-08 04:25:43 -06:00
Denis Kenzior 430e8755dc Fix: Print a warning in set_powered
If ofono_modem_set_powered is used with no driver set, print a warning
2009-12-08 04:24:38 -06:00
Zhenhua Zhang 06d17397c5 Fix remove all atoms in ofono_modem_set_powered
We should remove all atoms when we disable the modem. In function
set_powered, we remove all atoms if modem is powered down by dbus
call.
2009-12-08 04:05:10 -06:00
Denis Kenzior 070ea1d339 Remove: Unused code related to modem powered prefs 2009-12-08 04:03:30 -06:00
Denis Kenzior b15eccf0f4 Revert: Previous powered patch 2009-12-08 03:44:55 -06:00
Alexander Kanavin 81d7cd4e12 Fix a crash during isimodem initialization 2009-12-08 17:09:15 +02:00
Denis Kenzior 5745292cca Don't generate multiple g_sources, 1 is enough 2009-12-04 20:51:19 -06:00
Denis Kenzior adfb6c9d60 Use signalfd for signal handling 2009-12-04 20:44:04 -06:00
Denis Kenzior e1ceeafe5f Optimize: call list signal emission 2009-12-04 16:52:31 -06:00
Denis Kenzior 752c5af2f0 Update voicecall atom to use new callid api 2009-12-04 16:52:31 -06:00
Denis Kenzior 0b754835f5 Add utility to get the next free call id 2009-12-04 16:52:30 -06:00
Denis Kenzior c7ac706de1 Refactor: call id allocation / release 2009-12-04 16:52:30 -06:00
Denis Kenzior bcef5a1dd6 Fix: Exit right away
If no plugin needs to run the eventloop to shutdown cleanly, exit right
away.
2009-12-03 00:42:59 -06:00
Denis Kenzior 0500fadc63 Fix: Be a bit more signal-handler safe 2009-12-02 20:10:18 -06:00
Denis Kenzior 39568bbef7 Fix: Paste error 2009-12-02 19:24:37 -06:00
Denis Kenzior b0f0e248e9 When SIGTERM is received, run the event loop
This feature will continue running the event loop for another 10 seconds
or so or until all the modems have been shut down.  This will allow the
modem drivers to properly shutdown their respective devices.
2009-12-02 19:11:36 -06:00
Denis Kenzior 9c63c7dc20 Refactor: Set powered to false if disable timedout 2009-12-02 19:11:32 -06:00
Denis Kenzior b787745b00 Fix: unregister modem when unregistering driver 2009-12-02 19:10:07 -06:00
Denis Kenzior 6266e3f679 Refactor: modem de-registration 2009-12-02 19:10:07 -06:00
Denis Kenzior dac0ccc8a8 Fix: Remove all atoms when attempting to power off
The current behavior is to remove atoms when the modem has powered off
successfully.  The modem driver must now take special precautions to
cancel all pending actions of the atom drivers, since they would have
been destroyed.
2009-12-02 19:10:07 -06:00
Denis Kenzior 83a03d5fbf Fix: Store refs as 16 bits, not 8
Refs are handled as 16 bits properly everywhere, yet are stored as 8
bits in the assembly.
2009-12-02 09:55:57 -06:00
Denis Kenzior da496112b7 Fix: Don't forget to cleanup the atom watch 2009-12-01 22:53:45 -06:00
Denis Kenzior d2bcc0921d Fix: Simplify logic to use g_memdup 2009-12-01 12:45:40 -06:00
Denis Kenzior e8ac4e5368 Fix: Be more signed/unsigned correct 2009-12-01 12:42:23 -06:00
Denis Kenzior 55572b6e69 Style: Use unsigned int instead of unsigned 2009-12-01 12:42:23 -06:00
Zhenhua Zhang 7254f8ac86 Fix: Reset call_ids when modem is powered off 2009-11-26 08:08:17 -06:00
Zhenhua Zhang c77f1d0cc9 Fix: Add check for register_auto method
Add check for register_auto method to avoid crash. HFP backend
does not provide implementation for register_auto.
2009-11-24 20:36:56 -06:00
Zhigang Li 3aec8d4ac7 Fix: Send all SMS segments 2009-11-24 14:49:48 -06:00
Marcel Holtmann 231aca4a69 Get rid of the pointless checks before g_free in GPRS engine 2009-11-24 00:27:22 +01:00
Marcel Holtmann 5253d82057 Add support bringing GPRS interfaces up and down as needed 2009-11-24 00:26:09 +01:00
Martin Xu 040d660d41 Emit settings signal before active signal 2009-11-23 09:07:57 +01:00
Denis Kenzior 9777d244ec Report AttachInProgress Error
If one tries to activate a context and we're currently attaching or
detaching from GPRS, report the AttachInProgress error
2009-11-18 13:24:20 -06:00
Denis Kenzior e1e44e772a Refactor: Send NotAttached error
If one tries to activate the context and we're currently not attached to
GPRS, report a NotAttached error instead of a failure
2009-11-18 13:23:13 -06:00
Denis Kenzior 06632f8192 Add ProposeScan method
This is the replacement for automatic operator scanning
2009-11-18 12:49:26 -06:00
Denis Kenzior ac144e40a2 Fix: Use a different function for initial register
Just in case pending variable gets set to something
2009-11-18 12:28:45 -06:00
Denis Kenzior d87e0e86f7 Refactor: Reshuffle bit flags 2009-11-18 12:21:45 -06:00
Denis Kenzior bbfb17366c Refactor: Remove period operator scan 2009-11-18 12:21:30 -06:00
Denis Kenzior cd9b7c07b6 Refactor: Get rid of PENDING flag in netreg 2009-11-18 12:20:39 -06:00
Denis Kenzior 41050ef7b1 Implement CGREG query
Some modems do not properly send CGREG notifications when the context is
attached / detached.  We manually query the registration state of GPRS
to make sure that if the modem is indeed attached, the state is
reflected properly
2009-11-18 10:34:23 -06:00
Denis Kenzior d111fc3cee Refactor: Move functions up to avoid declaration 2009-11-18 10:34:00 -06:00
Denis Kenzior ec7f95de7e Fix: Again, uncross the wires 2009-11-18 10:33:09 -06:00
Denis Kenzior acb4e127c6 Fix: Uncross the wires 2009-11-18 10:00:04 -06:00
Denis Kenzior 9b4e898702 Support Settings property of PrimaryContext 2009-11-17 18:55:32 -06:00
Martin Xu 26413141be Add ofono_gprs_context_get_modem 2009-11-17 15:56:31 -06:00
Denis Kenzior 6b223870bd Fix: Make sure we don't dial with an incoming call 2009-11-13 16:04:45 -06:00
Denis Kenzior 27cb260d07 Refactor: Simplify code and add have_incoming 2009-11-13 16:03:33 -06:00
Denis Kenzior f9580e7b3e Revert: Go back to the old dial behavior
The driver has a better idea of how to handle ATD being invoked when
a waiting/held/active call(s) is/are already present.  Generally most
modems will swap the call automatically preserving the state of the
waiting call.

We do block dialing another call while a dial is still in progress.
2009-11-13 15:29:30 -06:00
Denis Kenzior 0b4b41c6a9 Style: add new line 2009-11-13 00:05:42 -06:00
Denis Kenzior 9a703cd378 Use release_all_held to release a single held call 2009-11-12 19:16:32 -06:00
Denis Kenzior e9341c5203 Remove Voicecall.Busy method
According to 22.030, UDUB or CHLD=0 can only be invoked on waiting
calls.  Most AT command based modems do not support using CHLD=0 on an
incoming call.  So we remove the Busy method and invoke set_udub on
a call that is in the waiting state.
2009-11-12 19:16:31 -06:00
Denis Kenzior 7600c4b3ac Fix: Emit Manufacturer, not Serial 2009-11-11 22:09:36 -06:00
Zhenhua Zhang 0825070655 Fix: Invoke microphone_volume, not speaker 2009-11-11 15:51:23 -06:00
Denis Kenzior a4189db20f Add basic state saving for SMS atom
Message ID and Reference number for concatenated messages should be
persisted.
2009-11-05 17:06:21 -06:00
Denis Kenzior f14e7c30bc Add hooks to call into sms history for SMS atom 2009-11-05 16:47:12 -06:00
Denis Kenzior 9afdf1a35b Add SMS history capability 2009-11-05 16:46:43 -06:00
Denis Kenzior 61260c298f Refactor: Make SendMessage async
This commit does two things.  First it makes SendMessage an async
method, which returns only when the SMS message has been successfully
sent or failed.

This also adds a set number of tries that oFono will resubmit the PDU to
the SMSC.  If any fragment fails to be submitted, the entire send
message attempt is deemed a failure and an error is returned to the caller.
2009-11-05 16:44:22 -06:00
Denis Kenzior 1fb5d7191e Rename sms assembly path to sms_assembly from sms
Not to interfere with sms settings storage
2009-11-05 16:42:15 -06:00
Denis Kenzior 1cabf97fe8 Use localtime_r instead of localtime 2009-11-05 16:00:34 -06:00
Denis Kenzior 3c4dfdcb7f Refactor: Move SMS SendMessage to 1 recipient only 2009-11-05 10:27:25 -06:00
Denis Kenzior e75fef59f2 Fix: Load GPRS settings before finding netreg
GPRS Settings should be loaded before we try to find netreg atom and
potentially try to make the attach/detach decisions.
2009-11-05 10:25:59 -06:00
Denis Kenzior 24a7d9a673 Fix: Handle the case where only PLMN name is given
HFP does not allow the use of register / unregister or scan for operator
functionality.  It only allows the name of the operator to be given, not
even an MCC/MNC.  Handle this situation inside netreg atom.
2009-11-04 11:43:57 -06:00
Denis Kenzior ac5f67c46d Add ability to restore GPRS contexts from settings 2009-11-02 16:02:09 -06:00