Commit Graph

258 Commits

Author SHA1 Message Date
Denis Kenzior ffd7c1920a Fix: Some modems report PDP_type in a list 2009-10-23 17:05:57 -05:00
Denis Kenzior a66de6880a Add initial implementation of MBM gprs context 2009-10-23 17:05:56 -05:00
Denis Kenzior 3408fc5094 Register for CGEV indications in gprs context 2009-10-23 17:05:56 -05:00
Denis Kenzior 14c116be36 Remove unused code and make compiler happy 2009-10-23 17:05:56 -05:00
Denis Kenzior d6161ddb61 Add basic atmodem gprs context implementation 2009-10-23 17:05:56 -05:00
Denis Kenzior 69c872f400 Refactor: Initialization code 2009-10-23 17:05:55 -05:00
Denis Kenzior 43256236a0 Add GPRS registration status implementation 2009-10-23 17:05:55 -05:00
Denis Kenzior 8cb2bb7608 Remove unused code 2009-10-23 17:05:55 -05:00
Denis Kenzior 88c0f77a58 Refactor: First round of renaming 2009-10-23 17:05:53 -05:00
Denis Kenzior b2fd75014a Refactor: rename data-connection to gprs
Keep the name specific to GSM, other implementations will probably
require their own interfaces
2009-10-23 17:05:53 -05:00
Andrzej Zaborowski f43efa8a5f Add GPRS support
This commit implements the GPRS context setup and teardown according to
doc/dataconnectionmanager-api.txt

One issue with the AT implementation of the api is that "Powered" (a
read-write property) can be set independently of "Attached" (read-only
property) and remain set when "Attached" is clear.  The semantics would
be that the network doesn't have resources to let the modem attach,
but the modem waits for the resources to become available and then
attaches.  On AT the modem is in this state only when executing +CGATT,
so currently the code will rerun +CGATT as soon as the previous one
returns with error, probably starving other commands.  A possible
workaround would be for "Powered" to flip back to False after the modem
fails to attach once, or give up on having separate properties.
Alternatively we could re-try to attach periodically but on one modem
I've tried +CGATT fails after about 1 minute (that's the Calypso) and
on another only about 0.5s (Nokia phones with AT emulation).

When "Powered"  is set and "RoamingAllowed" is clear and we manage to
attach and find that we're roaming, ofono resets "Powered".

We may want to catch the user trying to dial *99***1# which is the
backwards compatibility quirk for old modems (same way ofono parses
USSD strings).
2009-10-23 17:05:53 -05:00
Denis Kenzior 0faa8b3c42 Fix: Invalid call state transition
When an active and a waiting call exist, and the active is released the
waiting call becomes incoming.  This wasn't properly handled by the
generic at driver.
2009-10-23 13:56:26 -05:00
Zhang, Zhenhua fa10070bf9 Replace Glib type with standard C type 2009-10-23 13:40:49 -05:00
Denis Kenzior f726596860 Rename: drivers/hfpmodem/hfp.[ch] to hfpmodem.[ch]
Be more consistent with other drivers
2009-10-19 22:13:19 -05:00
Denis Kenzior c4594d2543 Fix: Make 'make distcheck' happy again 2009-10-19 17:07:23 -05:00
Denis Kenzior 5635703141 Refactor: Setup the HF features bitmap
Do not use magic numbers unless strictly necessary
2009-10-19 16:59:44 -05:00
Denis Kenzior 0ca88b36e7 Refactor: Don't store indicator names
We already know the indicators we're interested in from the
specification, malloc/free-ing the indicator names is thus pointless.
Instead save off the indicator index positions in an array.  Parse the
current values instead of storing the unparsed list.
2009-10-19 16:58:13 -05:00
Zhenhua Zhang fb0c157c11 Add initial glue code for hfp driver 2009-10-19 15:48:07 -05:00
Denis Kenzior 86cd4951b3 Fix: Use proper printf format for string precision 2009-10-16 17:46:29 -05:00
Denis Kenzior 210bb5cc0a Cleanup: Fixup USSD to use cbs_decode_dcs
Don't decode by hand, use existing function
2009-10-16 17:46:28 -05:00
Andrzej Zaborowski 15c07346df Parse +CUSD responses. 2009-10-16 17:46:28 -05:00
Andrzej Zaborowski 2974d69ddf Fix: Emit debug message instead of an error
SMS storage is frequently empty at startup, if this is the case, do not
use ofono_error, use ofono_debug instead.
2009-10-16 11:14:26 -05:00
Andrzej Zaborowski e6b8550328 Fix: Free converted string after use.
Also make sure we don't read beyond end of the string.
2009-10-16 11:09:42 -05:00
Aki Niemi 2a8159b21b Fix conditional statement 2009-10-16 14:02:27 +03:00
Aki Niemi 9ca602c283 Fix: restrict keyword use breaking distcheck 2009-10-16 11:26:15 +03:00
Pekka Pessi 86b6cd91c9 isimodem/voicecall.c: initial version
Implementing all the voicecall methods. Tested with Nokia 2008 modems.

 - problems in call creation are probably not reported properly
 - deflect not implemented in modem, not properly tested

TODO: Clean up style issues and align with other drivers.
2009-10-16 11:18:52 +03:00
Aki Niemi 74cc9cb4b7 Refactor sub-sub-block handling 2009-10-16 11:18:52 +03:00
Alexander Kanavin a781e3b1d9 Add isimodem drivers for call barring, forwarding and waiting 2009-10-14 22:05:13 +03:00
Pekka Pessi d1d870ba7a Refactor subblock iterators.
Always initialize iterators.

Try to avoid pointer arithmetics on NULL; in other words, move all pointer
arithmetics inside g_isi_sb_iter_init().

There are 4 different ways for representing sub blocks in ISI message:
- 8-bit sub_blocks count, 8-bit sub_block_id/sub_block_len
- 16-bit sub_blocks count, 8-bit sub_block_id/sub_block_len
- 8-bit sub_blocks count, 16-bit sub_block_id/sub_block_len
- 16-bit sub_blocks count, 16-bit sub_block_id/sub_block_len

The compact form g_isi_sb_iter_init() supports 8-bit sub_block count before
start of the sub blocks themselves and 8-bit sub_block_id and sub_block_len.
The full form g_isi_sb_iter_init_full() with explicit longhdr and sub_block
count supports all other cases.
2009-10-09 12:54:04 +03:00
Jukka Saunamaki 74c15989c9 Hack for reading EFSPN on isimodem sim driver
In the absence of low-level access to the SIM card, we're adding this
hack to expose the SPN using ISI's high-level access instead.
2009-10-07 14:45:46 +03:00
Denis Kenzior ca60851774 Fix: Quiet a warning 2009-10-02 19:25:58 -05:00
Denis Kenzior dcf4ac50b3 Make generic sim driver work with 3G SIMs
3G (UICC) based SIMs use a different response format than 2G sims.  In
theory this also allows us to determine whether SIM filesystem format is
3G or 2G
2009-10-02 18:25:56 -05:00
Denis Kenzior c8150fc120 Use small caps for 2G/3G functions 2009-10-02 18:25:56 -05:00
Denis Kenzior c9a2eedc08 Add utility to parse 2G GET_RESPONSE data
This format is described in 51.011 and the older 11.11.  It is not
supported by newer 3G UICC based devices & sim card combinations
2009-10-02 18:25:56 -05:00
Denis Kenzior 13c46b9781 Add at modem call volume driver 2009-09-29 14:56:22 -05:00
Denis Kenzior d0501c5694 Be more numerically stable 2009-09-29 14:56:22 -05:00
Denis Kenzior e5f02e427a Use none_prefix in cssn 2009-09-29 14:56:22 -05:00
Andrzej Zaborowski 2a02f45c79 Add plugin interface for getting PIN lock state.
It may be useful to have the information of whether card is currently
locked and emit events when this changes but if we want to have it as a
property, we would need properties for all types of locks and it wouldn't
be all that useful.
2009-09-23 14:27:52 -05:00
Denis Kenzior 5fd083f6f4 Refactor: Do not use int instead of enum
27.007 does not define an enumeration for SIM PIN/PUK values.  This
should be handled by ofono enum instead
2009-09-22 00:07:07 -05:00
Denis Kenzior 7d7732d637 Don't treat READY CPIN result differently 2009-09-22 00:07:07 -05:00
Denis Kenzior 3362de0010 Move SSN unsolicited notification activation 2009-09-22 00:07:06 -05:00
Denis Kenzior 63416e2851 Rearrange sim password enum 2009-09-22 00:07:06 -05:00
Andrzej Zaborowski ee02b14836 Do PIN authentication
This adds checking whether PIN is required during SIM initialisation and
delaying the sim ready notifications until after correct PIN is given.
2009-09-22 00:07:06 -05:00
Denis Kenzior 12e77a3c70 Convert all the modem drivers to the new API 2009-09-17 10:15:34 -05:00
Aki Niemi 36198827ab Miscellaneous clean-ups 2009-09-16 23:37:23 +03:00
Aki Niemi 866c394882 Add proper bootstrapping to phonebook driver 2009-09-16 23:37:23 +03:00
Aki Niemi e3e5090b6a Increase network scan/set timeout values 2009-09-16 23:37:23 +03:00
Andrzej Zaborowski 6d2cf926f3 Check received PDUs fit in the buffer, fix buffer size. 2009-09-16 04:53:44 -05:00
Aki Niemi 795e65ad53 Add proper bootstrap using g_isi_verify() 2009-09-15 15:37:01 +03:00
Aki Niemi b6e37fb792 Remove version query; use gisi/client.h instead 2009-09-15 15:36:11 +03:00