platform/upstream/ofono.git
14 years agoRefactor: Move & Rename functions to atutil.c
Zhenhua Zhang [Wed, 28 Oct 2009 17:22:06 +0000 (01:22 +0800)]
Refactor: Move & Rename functions to atutil.c

Move and rename call_compare and call_compare_by_status to atutil.c.
These will be utilized by other drivers, including hfpmodem.

14 years agoCleanup previous patch
Denis Kenzior [Wed, 28 Oct 2009 21:56:45 +0000 (16:56 -0500)]
Cleanup previous patch

14 years agoAdd serial settings parser to modemconf plugin
Ryan Raasch [Tue, 27 Oct 2009 12:55:16 +0000 (13:55 +0100)]
Add serial settings parser to modemconf plugin

14 years agoCleanup previous patch and update docs
Denis Kenzior [Wed, 28 Oct 2009 21:38:55 +0000 (16:38 -0500)]
Cleanup previous patch and update docs

14 years agoRefactor: Capitalize g_at_tty option names
Ryan Raasch [Tue, 27 Oct 2009 12:54:31 +0000 (13:54 +0100)]
Refactor: Capitalize g_at_tty option names

14 years agoFix: Take care of the logic for Dialing
Denis Kenzior [Wed, 28 Oct 2009 19:36:14 +0000 (14:36 -0500)]
Fix: Take care of the logic for Dialing

The logic for dialing a call while other calls are in the system is a
bit more complicated than what was implemented.

There are several cases to consider:

- Active Call and Held Call
In this situation we cannot dial, the user must drop one of the
calls.
- Active Call and Waiting Call -> We have to put the active call on
  hold, unfortunately there is no standard command to do so without
  affecting the waiting call.  If the modem has a vendor specific
  implementation, then try to use that.

- Active Call only -> Put the active call on hold.  We use the
  swap_without_accept implementation (if exists) to be safe, otherwise
  we fall back to hold active calls.

- No Active calls -> Simply dial

14 years agoRefactor: Avoid unnecessary forward declarations
Denis Kenzior [Wed, 28 Oct 2009 19:28:51 +0000 (14:28 -0500)]
Refactor: Avoid unnecessary forward declarations

14 years agoRefactor: Move more code around
Denis Kenzior [Wed, 28 Oct 2009 19:27:39 +0000 (14:27 -0500)]
Refactor: Move more code around

Avoid unnecessary forward declarations

14 years agoRefactor: Move code to avoid forward declaration
Denis Kenzior [Wed, 28 Oct 2009 19:23:51 +0000 (14:23 -0500)]
Refactor: Move code to avoid forward declaration

14 years agoRefactor: Get rid of PENDING_FLAG in voicecalls
Denis Kenzior [Wed, 28 Oct 2009 19:12:21 +0000 (14:12 -0500)]
Refactor: Get rid of PENDING_FLAG in voicecalls

the pending variable was enough already.  Also refactor to use
__ofono_dbus_pending_reply to make the code much more readable.

14 years agoAdd utility to parse CLIR option
Denis Kenzior [Wed, 28 Oct 2009 18:06:34 +0000 (13:06 -0500)]
Add utility to parse CLIR option

14 years agoRefactor: replace netreg get_operator with mcc/mnc
Denis Kenzior [Wed, 28 Oct 2009 00:47:52 +0000 (19:47 -0500)]
Refactor: replace netreg get_operator with mcc/mnc

The full operator information is useless as only mcc/mnc are really
required.  The internal structures will be changing soon

14 years agoFix: Don't emit spurious Base Station Name signal
Denis Kenzior [Tue, 27 Oct 2009 19:41:43 +0000 (14:41 -0500)]
Fix: Don't emit spurious Base Station Name signal

14 years agoFix: Skip empty emergency numbers
Denis Kenzior [Tue, 27 Oct 2009 17:47:42 +0000 (12:47 -0500)]
Fix: Skip empty emergency numbers

14 years agoFix: Obscure crash when GPRS is not supported
Denis Kenzior [Tue, 27 Oct 2009 17:39:20 +0000 (12:39 -0500)]
Fix: Obscure crash when GPRS is not supported

14 years agoFix: Properly unregister context on exit
Denis Kenzior [Tue, 27 Oct 2009 17:39:09 +0000 (12:39 -0500)]
Fix: Properly unregister context on exit

14 years agoFix: Use driver_attached instead of attached
Denis Kenzior [Mon, 26 Oct 2009 23:30:41 +0000 (18:30 -0500)]
Fix: Use driver_attached instead of attached

14 years agoMake netreg_update based on CREG, not CGREG
Denis Kenzior [Mon, 26 Oct 2009 22:26:19 +0000 (17:26 -0500)]
Make netreg_update based on CREG, not CGREG

14 years agoSimplify logic in netreg_update
Denis Kenzior [Mon, 26 Oct 2009 22:25:52 +0000 (17:25 -0500)]
Simplify logic in netreg_update

14 years agoFix unused variable warning
Denis Kenzior [Mon, 26 Oct 2009 22:00:35 +0000 (17:00 -0500)]
Fix unused variable warning

14 years agoDon't cause an infinite loop
Denis Kenzior [Mon, 26 Oct 2009 21:59:22 +0000 (16:59 -0500)]
Don't cause an infinite loop

14 years agoGet rid of the AFTER_ROAMING stuff
Denis Kenzior [Mon, 26 Oct 2009 21:58:24 +0000 (16:58 -0500)]
Get rid of the AFTER_ROAMING stuff

14 years agoIgnore gprs status when not attached/attaching
Denis Kenzior [Mon, 26 Oct 2009 21:57:21 +0000 (16:57 -0500)]
Ignore gprs status when not attached/attaching

14 years agoUpdate attached status when gprs status changes
Denis Kenzior [Mon, 26 Oct 2009 21:56:52 +0000 (16:56 -0500)]
Update attached status when gprs status changes

14 years agoFix: notify_attached was only used when detached
Denis Kenzior [Mon, 26 Oct 2009 21:55:03 +0000 (16:55 -0500)]
Fix: notify_attached was only used when detached

The standard only specifies that the context might have been detached by
the network / mobile equipment.  Not attached.

14 years agoAdd a master function for updating attached state
Denis Kenzior [Mon, 26 Oct 2009 21:54:18 +0000 (16:54 -0500)]
Add a master function for updating attached state

14 years agoFixup initialization logic
Denis Kenzior [Mon, 26 Oct 2009 21:20:36 +0000 (16:20 -0500)]
Fixup initialization logic

14 years agoFix: Initialize registration statuses
Denis Kenzior [Mon, 26 Oct 2009 21:19:54 +0000 (16:19 -0500)]
Fix: Initialize registration statuses

14 years agoFix: Reset netreg to 0 when unregistered
Denis Kenzior [Mon, 26 Oct 2009 21:18:17 +0000 (16:18 -0500)]
Fix: Reset netreg to 0 when unregistered

14 years agoRefactor: Make GPRS use information from netreg
Andrzej Zaborowski [Sun, 25 Oct 2009 08:35:26 +0000 (09:35 +0100)]
Refactor: Make GPRS use information from netreg

14 years agoFix: Don't attach if searching
Andrzej Zaborowski [Sun, 25 Oct 2009 08:35:26 +0000 (09:35 +0100)]
Fix: Don't attach if searching

Don't ask driver to attach GPRS if modem is already searching for an
operator.

14 years agoFix interpretation of new GPRS registration status signal.
Andrzej Zaborowski [Sun, 25 Oct 2009 08:14:54 +0000 (09:14 +0100)]
Fix interpretation of new GPRS registration status signal.

14 years agoFix: Fix segfault from improperly initialized data
Denis Kenzior [Sat, 24 Oct 2009 17:19:58 +0000 (12:19 -0500)]
Fix: Fix segfault from improperly initialized data

14 years agoFix: Register for E2NAP notifications
Denis Kenzior [Sat, 24 Oct 2009 17:19:38 +0000 (12:19 -0500)]
Fix: Register for E2NAP notifications

14 years agoFix: ENAP=0 is the only way to use this
Denis Kenzior [Sat, 24 Oct 2009 17:19:12 +0000 (12:19 -0500)]
Fix: ENAP=0 is the only way to use this

14 years agoRemove support for call forwarding and barring from MBM plugin
Marcel Holtmann [Sat, 24 Oct 2009 16:14:26 +0000 (01:14 +0900)]
Remove support for call forwarding and barring from MBM plugin

14 years agoAdd test script for activating the first context
Marcel Holtmann [Sat, 24 Oct 2009 16:06:45 +0000 (01:06 +0900)]
Add test script for activating the first context

14 years agoAdd simple test script for creating a context and setting APN
Marcel Holtmann [Sat, 24 Oct 2009 15:57:32 +0000 (00:57 +0900)]
Add simple test script for creating a context and setting APN

14 years agoFix tiny copy-and-past left-over
Marcel Holtmann [Sat, 24 Oct 2009 15:51:29 +0000 (00:51 +0900)]
Fix tiny copy-and-past left-over

14 years agoAdd test script for showing primary data contexts
Marcel Holtmann [Sat, 24 Oct 2009 15:49:08 +0000 (00:49 +0900)]
Add test script for showing primary data contexts

14 years agoAdd some extra special handling to list-modem test script
Marcel Holtmann [Sat, 24 Oct 2009 15:42:23 +0000 (00:42 +0900)]
Add some extra special handling to list-modem test script

14 years agoRegister gprs-context on calypso modem/phonesim.
Andrzej Zaborowski [Sat, 24 Oct 2009 09:28:07 +0000 (11:28 +0200)]
Register gprs-context on calypso modem/phonesim.

14 years agoJust return success when value already set in SetProperty.
Andrzej Zaborowski [Sat, 24 Oct 2009 09:27:23 +0000 (11:27 +0200)]
Just return success when value already set in SetProperty.

14 years agoFix: Some modems report PDP_type in a list
Denis Kenzior [Fri, 23 Oct 2009 20:17:55 +0000 (15:17 -0500)]
Fix: Some modems report PDP_type in a list

14 years agoAdd GPRS context setup to MBM plugin
Denis Kenzior [Fri, 23 Oct 2009 20:17:33 +0000 (15:17 -0500)]
Add GPRS context setup to MBM plugin

14 years agoFix: Connect up gprs and gprs_context
Denis Kenzior [Fri, 23 Oct 2009 20:16:56 +0000 (15:16 -0500)]
Fix: Connect up gprs and gprs_context

14 years agoFix: Typo in property name
Denis Kenzior [Fri, 23 Oct 2009 20:15:33 +0000 (15:15 -0500)]
Fix: Typo in property name

14 years agoAdd initial implementation of MBM gprs context
Denis Kenzior [Fri, 23 Oct 2009 18:49:14 +0000 (13:49 -0500)]
Add initial implementation of MBM gprs context

14 years agoFix: Update Init string & shutdown string for mbm
Denis Kenzior [Fri, 23 Oct 2009 17:55:03 +0000 (12:55 -0500)]
Fix: Update Init string & shutdown string for mbm

14 years agoRegister for CGEV indications in gprs context
Denis Kenzior [Fri, 23 Oct 2009 17:14:47 +0000 (12:14 -0500)]
Register for CGEV indications in gprs context

14 years agoRemove unused code and make compiler happy
Denis Kenzior [Fri, 23 Oct 2009 17:14:34 +0000 (12:14 -0500)]
Remove unused code and make compiler happy

14 years agoAdd basic atmodem gprs context implementation
Denis Kenzior [Fri, 23 Oct 2009 17:08:48 +0000 (12:08 -0500)]
Add basic atmodem gprs context implementation

14 years agoAdd implementation of GPRS context atom
Denis Kenzior [Fri, 23 Oct 2009 16:14:55 +0000 (11:14 -0500)]
Add implementation of GPRS context atom

14 years agoFix: Rename Flag
Denis Kenzior [Fri, 23 Oct 2009 01:59:07 +0000 (20:59 -0500)]
Fix: Rename Flag

14 years agoDeactivate the context for removal if active
Denis Kenzior [Fri, 23 Oct 2009 01:32:36 +0000 (20:32 -0500)]
Deactivate the context for removal if active

14 years agoRefactor/Implement basic activate logic
Denis Kenzior [Fri, 23 Oct 2009 00:00:38 +0000 (19:00 -0500)]
Refactor/Implement basic activate logic

Not yet tested

14 years agoAdd stub of gprs context deactivated
Denis Kenzior [Thu, 22 Oct 2009 23:35:44 +0000 (18:35 -0500)]
Add stub of gprs context deactivated

14 years agoFix: Typos
Denis Kenzior [Thu, 22 Oct 2009 23:35:32 +0000 (18:35 -0500)]
Fix: Typos

14 years agoRefactor: Initialization code
Denis Kenzior [Thu, 22 Oct 2009 23:00:33 +0000 (18:00 -0500)]
Refactor: Initialization code

14 years agoAdd GPRS registration status implementation
Denis Kenzior [Thu, 22 Oct 2009 23:00:07 +0000 (18:00 -0500)]
Add GPRS registration status implementation

14 years agoRemove unused code
Denis Kenzior [Thu, 22 Oct 2009 22:56:42 +0000 (17:56 -0500)]
Remove unused code

14 years agoFix: Style
Denis Kenzior [Thu, 22 Oct 2009 22:50:30 +0000 (17:50 -0500)]
Fix: Style

14 years agoRemove unused functions
Denis Kenzior [Thu, 22 Oct 2009 22:50:20 +0000 (17:50 -0500)]
Remove unused functions

14 years agoRefactor: Deactivate all contexts function
Denis Kenzior [Thu, 22 Oct 2009 22:49:49 +0000 (17:49 -0500)]
Refactor: Deactivate all contexts function

14 years agoRemove unused function
Denis Kenzior [Thu, 22 Oct 2009 22:49:36 +0000 (17:49 -0500)]
Remove unused function

14 years agoRefactor: GPRS Remove Context function
Denis Kenzior [Thu, 22 Oct 2009 22:49:22 +0000 (17:49 -0500)]
Refactor: GPRS Remove Context function

14 years agoRefactor: GPRS CreateContext function
Denis Kenzior [Thu, 22 Oct 2009 22:48:39 +0000 (17:48 -0500)]
Refactor: GPRS CreateContext function

14 years agoRemove unused function
Denis Kenzior [Thu, 22 Oct 2009 22:46:50 +0000 (17:46 -0500)]
Remove unused function

14 years agoRefactor: context object path list
Denis Kenzior [Thu, 22 Oct 2009 22:46:10 +0000 (17:46 -0500)]
Refactor: context object path list

14 years agoRefactor: Context set_property function
Denis Kenzior [Thu, 22 Oct 2009 22:44:14 +0000 (17:44 -0500)]
Refactor: Context set_property function

14 years agoRefactor: Context get_properties
Denis Kenzior [Thu, 22 Oct 2009 22:42:40 +0000 (17:42 -0500)]
Refactor: Context get_properties

14 years agoRefactor: context finding by path
Denis Kenzior [Thu, 22 Oct 2009 22:42:01 +0000 (17:42 -0500)]
Refactor: context finding by path

14 years agoRemove unused function
Denis Kenzior [Thu, 22 Oct 2009 22:41:23 +0000 (17:41 -0500)]
Remove unused function

14 years agoAdd CID range function
Denis Kenzior [Thu, 22 Oct 2009 22:39:57 +0000 (17:39 -0500)]
Add CID range function

14 years agoRefactor: Primary Context dbus reg/unreg
Denis Kenzior [Thu, 22 Oct 2009 22:37:39 +0000 (17:37 -0500)]
Refactor: Primary Context dbus reg/unreg

14 years agoRefactor: Use ofono_bool_t instead of int
Denis Kenzior [Thu, 22 Oct 2009 22:23:44 +0000 (17:23 -0500)]
Refactor: Use ofono_bool_t instead of int

14 years agoRefactor: Rename GPRS type enums
Denis Kenzior [Thu, 22 Oct 2009 22:20:50 +0000 (17:20 -0500)]
Refactor: Rename GPRS type enums

14 years agoRefactor: Split up GPRS into two atoms
Denis Kenzior [Thu, 22 Oct 2009 22:14:50 +0000 (17:14 -0500)]
Refactor: Split up GPRS into two atoms

Split up GPRS into two atoms: GPRS and GPRS Context.  GPRS will handle
the areas of GPRS network registration, basic GPRS capability detection
and attach / detach.

GPRS Context will handle setting up / activating / deactivating the
indicidual contexts.

This will allow us to use the generic GPRS atom for most devices while
customizing the GPRS context accordingly.

14 years agoAdd InUse error type
Denis Kenzior [Thu, 22 Oct 2009 22:11:58 +0000 (17:11 -0500)]
Add InUse error type

14 years agoSecond round of renaming
Denis Kenzior [Tue, 20 Oct 2009 21:29:10 +0000 (16:29 -0500)]
Second round of renaming

14 years agoRefactor: First round of renaming
Denis Kenzior [Tue, 20 Oct 2009 18:09:54 +0000 (13:09 -0500)]
Refactor: First round of renaming

14 years agoRefactor: rename data-connection to gprs
Denis Kenzior [Tue, 20 Oct 2009 17:09:46 +0000 (12:09 -0500)]
Refactor: rename data-connection to gprs

Keep the name specific to GSM, other implementations will probably
require their own interfaces

14 years agoAdd GPRS support
Andrzej Zaborowski [Mon, 12 Oct 2009 21:35:59 +0000 (23:35 +0200)]
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).

14 years agoFix: Invalid call state transition
Denis Kenzior [Fri, 23 Oct 2009 18:56:26 +0000 (13:56 -0500)]
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.

14 years agoReplace Glib type with standard C type
Zhang, Zhenhua [Fri, 23 Oct 2009 10:20:13 +0000 (18:20 +0800)]
Replace Glib type with standard C type

14 years agoHandle right bracket in next_unquoted_string
Zhenhua Zhang [Thu, 22 Oct 2009 16:47:08 +0000 (00:47 +0800)]
Handle right bracket in next_unquoted_string

14 years agoMention Ryan's contributions
Denis Kenzior [Thu, 22 Oct 2009 00:07:37 +0000 (19:07 -0500)]
Mention Ryan's contributions

14 years agoEnable / Disable CREAD functionality in gattty
Ryan Raasch [Wed, 21 Oct 2009 08:43:36 +0000 (10:43 +0200)]
Enable / Disable CREAD functionality in gattty

14 years agoMention Olivier's contributions
Denis Kenzior [Tue, 20 Oct 2009 15:32:28 +0000 (10:32 -0500)]
Mention Olivier's contributions

14 years agoMigrate from RFC2822 to ISO8601
Olivier Le Thanh Duong [Mon, 5 Oct 2009 17:10:25 +0000 (19:10 +0200)]
Migrate from RFC2822 to ISO8601

14 years agoDoc: Update modem api
Marko Saukko [Tue, 20 Oct 2009 06:25:38 +0000 (09:25 +0300)]
Doc: Update modem api

Add SetProperty and Powered property to modem-api.txt document.

14 years agoRename: drivers/hfpmodem/hfp.[ch] to hfpmodem.[ch]
Denis Kenzior [Tue, 20 Oct 2009 03:13:19 +0000 (22:13 -0500)]
Rename: drivers/hfpmodem/hfp.[ch] to hfpmodem.[ch]

Be more consistent with other drivers

14 years agoFix: Make 'make distcheck' happy again
Denis Kenzior [Mon, 19 Oct 2009 22:07:23 +0000 (17:07 -0500)]
Fix: Make 'make distcheck' happy again

14 years agoFix: Use debug instead of info
Denis Kenzior [Mon, 19 Oct 2009 22:00:32 +0000 (17:00 -0500)]
Fix: Use debug instead of info

14 years agoRefactor: Setup the HF features bitmap
Denis Kenzior [Mon, 19 Oct 2009 21:59:44 +0000 (16:59 -0500)]
Refactor: Setup the HF features bitmap

Do not use magic numbers unless strictly necessary

14 years agoRefactor: Don't store indicator names
Denis Kenzior [Mon, 19 Oct 2009 21:58:13 +0000 (16:58 -0500)]
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.

14 years agoAdd initial glue code for hfp driver
Zhenhua Zhang [Sun, 18 Oct 2009 22:20:25 +0000 (06:20 +0800)]
Add initial glue code for hfp driver

14 years agoAdd test script for USSD
Denis Kenzior [Fri, 16 Oct 2009 22:44:11 +0000 (17:44 -0500)]
Add test script for USSD

14 years agoFix: Use proper printf format for string precision
Denis Kenzior [Fri, 16 Oct 2009 22:43:29 +0000 (17:43 -0500)]
Fix: Use proper printf format for string precision

14 years agoCleanup: Fixup USSD to use cbs_decode_dcs
Denis Kenzior [Fri, 16 Oct 2009 21:46:05 +0000 (16:46 -0500)]
Cleanup: Fixup USSD to use cbs_decode_dcs

Don't decode by hand, use existing function