Commit Graph

2638 Commits

Author SHA1 Message Date
Tommi Kenakkala 2af3c733b7 sms: Fix alphanumeric TP-OA handling
TP-OA max length comparisons were incorrect because TP-OA's 7-bit
coded octets transport eleven 8-bit chars.  The current code assumed
only 10 chars were possible.

The patch
- increases the array size to 23, (maximum of 22 bytes for UTF8
  encoding + null terminator)
- Updates the sanity check to account for the correct maximum
- For encoding, checks the maximum length in UTF8 characters instead of
  bytes
2015-02-13 09:49:39 -06:00
Tommi Kenakkala 04218d3a86 handsfree-audio: Refactor manager init / cleanup 2015-02-02 09:28:34 -06:00
Tommi Kenakkala 41fadd3787 main: Remove handsfree_audio_manager init/cleanup
Init allocates a SCO audio socket always. oFono should do that
with bluez5 but not with bluez4.  This patch starts the refactoring of
the handsfree_audio_manager init/cleanup functionality.
2015-02-02 09:26:58 -06:00
Alfonso Sanchez-Beato 10f173981c radio-settings: Show all available technologies
Not all possible futures technologies were being showed on the DBus
interface.
2014-12-12 08:54:14 -06:00
Denis Kenzior 95482cb84a radio-settings: Always query available rats
If fast dormancy query is not implemented the available rats are not
queried.
2014-12-10 11:03:16 -06:00
Denis Kenzior fce95b767a radio-settings: Add additional sanity check 2014-12-10 11:03:16 -06:00
Denis Kenzior 44049f064a radio-settings: rework AvailableTechnologies logic
Take advantage of the new enum structure to future proof and simplify
the logic of generating the AvailableTechnologies property
2014-12-10 11:03:16 -06:00
Alfonso Sanchez-Beato 5210b85c22 src: Implement RAT list property 2014-12-10 11:03:16 -06:00
Denis Kenzior 7dca0a7315 sim: Fix pin retries bogus values on some arch-es
On some architectures the SimManager.Retries property was getting bogus
values.  This is because we were sending an array which pointed to int
values instead of the expected unsigned char values.

This fix allocates a temporary array of unsigned chars to hold the
actual D-Bus values being sent.  Additionally, the dictionary array is
changed to point to the temporary unsigned char based values instead of
the raw 'int' based retry values.
2014-12-04 08:57:48 -06:00
Denis Kenzior 6c4ac05fbc emulator: Refine +BIND support 2014-10-20 13:40:29 -05:00
Denis Kenzior f9d5ee5fa9 emulator: Implement new API 2014-10-20 13:40:28 -05:00
Denis Kenzior d3560b3784 handsfree: Be extra pedantic with booleans 2014-10-20 13:40:28 -05:00
Denis Kenzior de02f68a2e handsfree: Don't try to send a method return
When we are simply updating the AG of HF indicator changes, do not try
to send a method return message.
2014-10-20 13:40:28 -05:00
Denis Kenzior 6c0f90fc1b handsfree: Implement new HF indicators API 2014-10-20 13:40:28 -05:00
Denis Kenzior 7166aebd51 emulator: Refactor data types 2014-10-20 13:40:28 -05:00
Denis Kenzior ab5b6d1217 handsfree: Skeleton implementation of DDR
Distracted Driving Reduction or Enhanced Safety is implemented using HF
indicator 0x0001
2014-10-20 13:40:28 -05:00
Denis Kenzior 66cf2a30fa handsfree: Implement new Features property value 2014-10-20 13:40:28 -05:00
Denis Kenzior 43e83852dc emulator: Enable HF Indicator feature 2014-10-20 13:40:28 -05:00
Denis Kenzior 36a21da227 emulator: Extend BRSF bitmap
The current check of 8 bits is not enough with HFP 1.7
2014-10-20 13:40:28 -05:00
Denis Kenzior bef4d610a3 emulator: Add +BIEV implementation 2014-10-20 13:40:28 -05:00
Denis Kenzior 2d158167c2 emulator: Add +BIND implementation 2014-10-20 13:40:27 -05:00
Denis Kenzior 02c5b73f6e emulator: Fix CHLD=? not treated as part of SLC 2014-10-20 13:40:27 -05:00
Denis Kenzior 0727da1d5b emulator: Improve SLC establishment logic 2014-10-20 13:40:27 -05:00
Denis Kenzior d292e0e0ed hfp: Add enum for known HF Indicators 2014-10-20 13:40:27 -05:00
Denis Kenzior 881207ce18 hfp: Update for new HFP 1.7 values 2014-10-20 13:40:27 -05:00
Marcel Holtmann 8ebb17977b handsfree-audio: Fix broken coding style in switch statement 2014-09-20 16:13:45 +02:00
Philip Paeps c144fadca6 gprs: provision the authentication method 2014-06-24 12:46:18 -05:00
Denis Kenzior 3e13676766 gprs: Make the code a bit easier to read 2014-06-21 12:02:05 -05:00
Philip Paeps 73831c3d76 gprs: make PPP authentication method configurable
Add a new "AuthenticationMethod" property to select between "pap"
and "chap" PPP authentication, defaulting to "chap" (i.e.: previous
behaviour).
2014-06-21 11:58:03 -05:00
Andrew Earl 9bbc98651f handsfree: correct crash on connect of hfp 2014-04-22 13:10:32 -05:00
Denis Kenzior 8cfcfa4519 handsfree: Rename variable 2014-04-10 09:43:47 -05:00
Denis Kenzior ca3ae87d0a handsfree: Reflow logic 2014-04-10 09:43:44 -05:00
Denis Kenzior 02138901d3 handsfree: Remove function
No need for one line functions that are only used once
2014-04-10 09:43:41 -05:00
Denis Kenzior 24e87d2580 handsfree: Rename function
No need for the ofono_ prefix here
2014-04-10 09:31:58 -05:00
Denis Kenzior 057c4d788f handsfree: Remove unneeded variable 2014-04-10 09:29:32 -05:00
Denis Kenzior 805c3068be handsfree: Remove unneeded variable i 2014-04-10 09:29:11 -05:00
Denis Kenzior eb4fd9f5aa handsfree: style fixes for previous commit 2014-04-10 09:25:30 -05:00
Andrew Earl 8327d528a9 hfp: Add subscriber number to handsfree properties 2014-04-10 09:21:23 -05:00
Denis Kenzior 5705a0078e handsfree: Fixup variable names 2014-03-19 10:19:35 -05:00
Krzysztof Wilk b2b3943717 hfp: extend Features to three way calling and CHLD 2014-03-19 10:15:55 -05:00
Krzysztof Wilk 2e78ea1830 hfp: Define hfp_ag_chld_feature 2014-03-19 10:12:16 -05:00
Alfonso Sanchez-Beato 46de4df677 simutil: Fix EF_PNN access
EF_PNN was not being read properly (see TS 24.008, section 10.5.3.5a,
for network names format), which affected the displayed PLMN name for
some MVNOs. Some modems already read the file and return the right
string: these do not show the problem.
2014-03-14 12:24:26 -05:00
Tony Espy 201d34b0a1 idmap: use UL for bitshift literals
The current bitshift logic in idmap incorrectly uses
the literal 1 for the value to shift in idmap_alloc(),
idmap_take(), and idmap_alloc_next().  This causes the
resulting value to be an int instead of a long, which
results in the wrong bit being set once the number of
bits to shift operand exceeds sizeof(int).  Also
on some platforms, the behavior of the left bitshift
operator is undefined when this overflow occurs.
2014-03-05 08:49:50 -06:00
Slava Monich c2e58405ee include: Be more const-correct in ofono_dbus_* 2014-01-13 10:19:54 -06:00
Denis Kenzior d6af339c99 git: Fixup messed up permissions 2013-12-21 13:39:54 -06:00
Krzysztof Wilk 5c11e13019 siri: Add atom implementation 2013-12-18 00:07:47 -06:00
Vinicius Costa Gomes 51982e7b13 handsfree-audio: Don't listen() if no defer_setup
As we won't allow any card to be registered when the kernel doesn't
support defer_setup, we don't need to have the listening SCO socket
open in this case.
2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes 6d08a47ec3 handsfree-audio: Don't register if no defer_setup
If the kernel doesn't support defer_setup for SCO, we shouldn't allow
cards to be registered, because in that case we won't be able to
properly send the file descriptor to the Agent.
2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes e84bd27b99 handsfree-audio: Set socket parameters
In the AG case, the voice setting needs to be set before we can
use Transparent SCO mode, which is necessary for Wideband speech
support.
2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes ff16aed8bd handsfree-audio: Detect transparent SCO in kernel
Deferred SCO setup is not enough for HFP 1.6 wideband codec support.
Wideband speech also requires Transparent SCO to be enabled in the
kernel.
2013-09-12 13:17:40 -05:00
Denis Kenzior e574d44d00 handsfree-audio: Tweak logic a bit 2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes 0de0f496cb handsfree-audio: Add setting SCO air mode 2013-09-12 13:17:40 -05:00
Denis Kenzior 394069cb59 voicecall: Implement ofono_voicecall_mpty_hint 2013-09-12 13:17:39 -05:00
Denis Kenzior d7ba153737 smsutil: Make sure to return 1/0
So the value might be used directly for D-Bus property emission.
Otherwise D-Bus asserts and screws itself with:
ofonod[7427]: src/sms.c:handle_mwi()
process 7427: arguments to dbus_message_iter_append_basic() were
incorrect, assertion "*bool_p == 0 || *bool_p == 1" failed in file
../../dbus/dbus-message.c line 2549.
2013-09-03 22:58:59 -05:00
Vinicius Costa Gomes 8a11d38983 bluetooth: Add define for SCO voice settings
Add defines for SCO voice setting (Air Coding). Air mode "Transparent
Data" shall be supported if wide band speech is supported.
2013-08-19 12:14:39 -05:00
Denis Kenzior 9e112379b5 handsfree-audio: Make sure to reset has_wideband
When Agent is unregistered we do not know whether the wideband speech is
supported.  Default to false.
2013-08-07 16:37:23 -05:00
Lucas De Marchi 53a0fa8c7c common: Fix parsing SS control string
It's not possible to be both greater than '9' and less than '0'. This
would lead to accepting things like "#$33#" as activation and "*$33#" as
deactivation, even though the string makes no sense.
2013-05-22 21:40:19 -05:00
Lucas De Marchi 874a9ee285 stk: Fix sizeof on memcpy
src/stk.c: In function ‘__ofono_cbs_sim_download’:
src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
same expression as the source; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
  memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
                                               ^
2013-05-22 21:37:52 -05:00
Vinicius Costa Gomes 8caf91bf0f handsfree-audio: Fix replying to an empty D-Bus message
In the case that ofono_handsfree_card_connect_sco() is called outside the
context of a .Connect() call, there's no message we need to reply.  This
happens, for example, when the HFP AG plugin initiates a SCO connection when
it receives an AT+BCC command from the HF.
2013-05-03 11:31:44 -05:00
Vinicius Costa Gomes 4b067e6ffa handsfree-audio: Implement ofono_handsfree_audio_has_defer_setup() 2013-04-25 17:51:15 -05:00
Vinicius Costa Gomes c07a2fc24c hfp: Add defines for HFP SDP feature bits 2013-04-25 03:38:44 -05:00
Claudio Takahasi 9a3cfcd109 core: Add SetProperty for EchoCancelingNoiseReduction
This patch extends SetProperty method of the Handsfree interface
allowing to disable echo canceling and noise reduction feature in
the audio gateway through a D-Bus method call. Once disabled, it
is not allowed to enable it using this procedure.
2013-04-23 10:30:15 -05:00
Claudio Takahasi 275fe0df81 core: Set EchoCancelingNoiseReduction to TRUE by default
According to Bluetooth HFP spec: By default, if the AG supports its
own embedded echo canceling and/or noise reduction functions, it shall
have them activated until the AT+NREC command is received. The
configuration set by the HF shall by used by the AG while the Service
Level Connection is active.

Since there isn't a command to query the current value, it is being
assumed that Echo Canceling and Noise Reduction is enabled when the
connection is established and the gateway supports this feature.
2013-04-23 10:20:02 -05:00
Claudio Takahasi 6ef7d4fa88 core: Add EchoCancelingNoiseReduction to GetProperties
This patch adds EchoCancelingNoiseReduction property to GetProperties
method of Handsfree interface.
2013-04-23 10:19:35 -05:00
Claudio Takahasi 1b355c4232 core: Add "echo-canceling-and-noise-reduction"
This patch adds "echo-canceling-and-noise-reduction" to "Features"
property of the Handsfree interface.
2013-04-23 10:19:07 -05:00
Paulo Borges 2e9cb14e26 hfp: Move HFP versions definitions to hfp.h
hfp.h should store all HFP related definitions.
2013-04-18 08:43:21 -05:00
João Paulo Rechi Vita a2d0f434fa handsfree-audio: Add debug logging
Print debug messages when Handsfree Audio Agent registers or unregisters
itself.
2013-04-16 14:20:40 -05:00
Paulo Borges 82909259c4 emulator: Change feature check to attend HFP 1.6
HFP 1.6 adds a new feature called Codec Negotitation. For the HF Role,
this feature is stored in bit 8 of the supported features
bitmap.

This patch changes the range of valid HF feature bitmaps to 2^8-1.
2013-04-15 07:23:28 -05:00
Vinicius Costa Gomes 600539ed2a handsfree-audio: Toggle wideband support when the agent registers
Each time an agent registers itself, we check if we support deferred
setup and if the agent has mSBC as a codec, if both checks are true,
we enable wideband speech support.
2013-04-15 07:08:26 -05:00
Vinicius Costa Gomes 12df4fca94 handsfree-audio: Keep track whether defer_setup is enabled
'defer_setup' will be one of the inputs when enabling or disabling
support for wideband speech codecs, we will only enable wideband
speech support if the kernel supports deferred setup.

So, we have to have this information available, in this case it means
a global variable.
2013-04-15 07:07:23 -05:00
Claudio Takahasi f65070b377 handsfree-audio: Send the selected codec
This patch removes the hard-coded CVSD codec, and adds the selected
codec in the NewConnection method call, notifying the agent the codec
previously selected for the audio connection.
2013-04-15 07:01:59 -05:00
Vinicius Costa Gomes 9ef5953a56 handsfree-audio: Implement ofono_handsfree_card_set_codec() 2013-04-15 06:58:03 -05:00
Denis Kenzior e130f22715 handsfree-audio: Move codec enums to hfp.h 2013-04-09 14:33:41 -05:00
Denis Kenzior ad43b3d248 core: Include hfp.h 2013-04-09 14:33:41 -05:00
Denis Kenzior 2cdccd4e42 core: Add hfp.h
This will serve as a collection point for all HFP related definitions.
2013-04-09 14:33:41 -05:00
Vinicius Costa Gomes b2273d313f handsfree-audio: Remove unused 'codecs' field from agent
Now that we only keep track whether we support wideband speech or not, we
don't have to keep track of the list of codecs supported by the Agent.
2013-04-09 14:33:41 -05:00
Vinicius Costa Gomes 1c51856434 handsfree-audio: Implement ofono_handsfree_audio_has_wideband 2013-04-09 14:33:41 -05:00
Forest Bond 0e0eb227f2 modem: Support modem property "AlwaysOnline"
This can be set by the modem driver to indicate that the device is
always in the online state when it is enabled.  This is useful for
modem drivers that handle both CDMA and GSM devices.
2013-04-01 21:41:58 -05:00
Forest Bond b0ad1ecb8f modem: Allow setting boolean properties 2013-03-28 09:47:32 -05:00
Vinicius Costa Gomes 9dd7bb365f handsfree-audio: Add .Connect using the card driver
Now each handsfree implementation may be notified that a card wants
its audio to be connected.
2013-03-28 09:34:39 -05:00
Vinicius Costa Gomes 4f02f03abb handsfree-audio: Add ofono_handsfree_card_connect_sco 2013-03-28 09:34:03 -05:00
Vinicius Costa Gomes 798ff5887b handsfree-audio: Reject .Connect() from other senders
Only the agent should be able to call .Connect() on the card.
2013-03-26 23:24:18 -05:00
Vinicius Costa Gomes cc5a86f1db handsfree-audio: Add support for sending the SCO socket
Send the SCO socket to the agent associated with the card that
just got connected.
2013-03-26 23:23:58 -05:00
Vinicius Costa Gomes c3cd427ee8 handsfree-audio: Add support for initiating SCO connections
When calling the card's .Connect() method, we should be able to
establish a SCO connection.

Right now, we only have support for establishing the SCO connection
directly, this is what is expected from HFP 1.5 HF/AG devices.
2013-03-26 23:23:39 -05:00
Vinicius Costa Gomes c735b26c06 ofono.conf: Punch hole for HandsfreeAudioAgent 2013-03-19 22:23:40 -05:00
Denis Kenzior 32ea0c683a handsfree_audio: Call driver remove() on removal 2013-03-18 14:06:56 -05:00
Claudio Takahasi 5d0ba72d04 core: Add bt_str2ba() to bluetooth.h
This patch adds a utility Bluetooth function to convert Bluetooth
address from string to bdaddr_t.
2013-03-18 14:00:15 -05:00
Denis Kenzior c86fcc3a70 handsfree-audio: Match new card API 2013-03-18 13:42:46 -05:00
Denis Kenzior f54ced9992 handsfree-audio: Implement get/set data 2013-03-18 13:42:46 -05:00
Denis Kenzior d081e3d5ea handsfree-audio: Add card driver registration 2013-03-18 13:42:46 -05:00
Claudio Takahasi 241e3ca74c handsfree-audio: Reject SCO if agent is unavailable
This patch rejects the incoming SCO connection if there isn't a
Handsfree Audio Agent registered.
2013-03-04 16:41:51 -06:00
Claudio Takahasi a6874a64b2 handsfree-audio: Reject SCO if Card is not ready
The Audio Card is being created when the NewConnection from BlueZ
Profile is received, and registered when the service level connection
negotiation finishes. This patch rejects SCO connection if the SCO
incoming connection arrives when the service level negotiation is
ongoing.
2013-03-04 16:41:51 -06:00
Claudio Takahasi 2c4015278d handsfree-audio: Check local SCO address
This patch verifies if the local Bluetooth address of the incoming
connection also matches with one of available audio cards.
2013-03-04 16:41:51 -06:00
Claudio Takahasi 4a6ecaf28b handsfree-audio: Add NewConnection
This patch adds Agent NewConnection call. The card object path, the SCO
file descriptor, and the codec are being passed to the agent. This
initial version supports CVSD codec only.
2013-03-04 16:41:51 -06:00
Claudio Takahasi 9504427173 handsfree-audio: Add SCO handling
Unlike the previous implementation in the plugin, the SCO/SLC matching
is done based on the Audio Card objects.

Audio Cards are created when the RFCOMM fd descriptor is received, and
registered when the service level connetion is established.
2013-03-04 16:39:53 -06:00
Claudio Takahasi 1095e4a126 core: Add new Bluetooth header
This patch adds the Bluetooth utility funtions and socket type
declarations to a new header src/bluetooth.h, allowing to share it
between core, and plugins.
2013-03-04 16:08:59 -06:00
Claudio Takahasi 4fcd084859 handsfree-audio: Check CVSD when registering agent
This patch makes CVSD codec mandatory when registering a Handsfree
Audio Agent.
2013-03-01 13:32:11 -06:00
Denis Kenzior c7a3f3990a handsfree-audio: properly increment next_card_id 2013-02-26 15:47:08 -06:00
Denis Kenzior ff2d68f2eb handsfree-audio: Impelement CardRemoved signal 2013-02-26 14:14:46 -06:00
Denis Kenzior dfacb14968 handsfree-audio: Implement CardAdded signal 2013-02-26 14:14:46 -06:00
Denis Kenzior b76bb56dae handsfree-audio: Implement the GetCards method 2013-02-26 14:14:46 -06:00
Denis Kenzior 1c75912380 handsfree-audio: Implement card GetProperties 2013-02-26 14:14:46 -06:00
Denis Kenzior 44281e53a9 handsfree-audio: Unregister from DBus on removal 2013-02-26 14:14:46 -06:00
Denis Kenzior f3a7069c47 handsfree-audio: Add skeleton D-Bus registration
For HandsfreeAudioCard objects
2013-02-26 14:14:46 -06:00
Denis Kenzior b179adf879 handsfree-audio: Don't hardcode '/' path
Use OFONO_MANAGER_PATH instead
2013-02-26 14:14:46 -06:00
Denis Kenzior dfeb91fc08 handsfree-audio: Implement card create / remove 2013-02-26 11:09:48 -06:00
Claudio Takahasi 82fae93ca1 audio-settings: Fix unneeded async for GetProperties
GetProperties method call for Audio settings returns the reply in the
same iteraction, it doesn't need to be asynchronous.
2013-02-25 12:21:35 -06:00
Denis Kenzior 951e03dfea handsfree-audio: Add ref / unref support 2013-02-21 08:27:55 -06:00
Denis Kenzior 5f787fed4e handsfree-audio: Don't go over 80 characters 2013-02-20 21:28:01 -06:00
Claudio Takahasi 555a883ecb handsfree-audio: Add Agent tracking
This patch tracks when the Handsfree Audio Agent leaves the system BUS,
and free agent allocated resources.
2013-02-20 21:27:01 -06:00
Claudio Takahasi 7a7bb7399a handsfree-audio: Call Agent "Release" when exiting
This patch notifies the Agent implementation that it is no longer
registered to the service daemon.
2013-02-20 21:26:57 -06:00
Claudio Takahasi 19f50c6a3b handsfree-audio: Add Agent "Unregister"
This patch implements the "Unregister" method of the Handsfree Audio
Manager. The agent is unregistered if sender and path match.
2013-02-20 21:25:38 -06:00
Claudio Takahasi a76e4d71f5 handsfree-audio: Free agent when exiting
Free agent allocated resources when oFono exits.
2013-02-20 21:23:01 -06:00
Vinicius Costa Gomes 9b77d65bf9 handsfree-audio: Add codec array validation
This patch checks if the codec array included in the "Register" method
contains valid codec ID's.
2013-02-20 21:22:45 -06:00
Claudio Takahasi 16246e120e handsfree-audio: Add Agent "Register" method
This patch adds the initial Handsfree Audio Manager "Register"
method implementation. It adds the parsing of the arguments included
in the message and checks if there is an agent registered already.
2013-02-20 21:22:17 -06:00
Claudio Takahasi 55a9b0411e main: Call handsfree audio manager init and cleanup 2013-02-20 21:20:26 -06:00
Claudio Takahasi 850c1811fc handsfree-audio: Add Manager registration
Adds the initial implementation of new experimental Handsfree Audio
Manager interface. This patch adds the interface registration and
the declaration of it's methods.
2013-02-20 21:19:27 -06:00
Denis Kenzior 69820a7136 modem: Implement ofono_modem_find 2013-02-14 08:47:10 -06:00
Lucas De Marchi e1d5dfe3ae storage: Include sys/types.h for ssize_t
src/storage.h:32:1: error: unknown type name 'ssize_t'
src/storage.h:36:1: error: unknown type name 'ssize_t'
2013-01-16 13:14:30 -08:00
Denis Kenzior 7fca6fca90 stk: Fix crash with Modem-Handled SIM Refresh 2013-01-01 21:40:14 -06:00
Denis Kenzior e744f9159d Revert "stk: Fix crash in SIM refresh handling"
This reverts commit dfd1fae50b.
2013-01-01 21:03:23 -06:00
Denis Kenzior 679e3d708b handsfree: Implement BatteryChargeLevel 2012-12-17 09:50:21 -06:00
Denis Kenzior 83c275745f sms: Don't try to start the queue if already active
If the queue is currently inside a submit operation and the network
registration state changes, do not try to schedule the next operation.
2012-11-29 03:09:32 -06:00
Denis Kenzior 1101465305 stk: Fix Set Up Call with pause characters
Set Up Call with extra DTMF characters after the phone number should be
set up with only the dialed number.  Otherwise we get a sequence like
this:
{VoiceCallManager} [CallAdded] /ifx_0/voicecall01 { LineIdentification =
+012340123456c1c2, Name = , Emergency = False, Multiparty = False,
RemoteHeld = False, State = alerting, RemoteMultiparty = False }
2012-11-28 10:31:15 -06:00
Denis Kenzior fb16241aba stk: Print what kind of info the SIM wants
In Provide Local Information implementation
2012-11-28 10:31:14 -06:00
Denis Kenzior d8a9e88705 voicecall: Add extra debug info 2012-11-28 10:31:14 -06:00
Denis Kenzior 7ee8d3a16a voicecall: Fix crash 2012-11-28 10:31:14 -06:00
Denis Kenzior 509630ea98 sim: Fix crash
ofonod[32055]: ++++++++ backtrace ++++++++
ofonod[32055]: #0  0x7f6af0ee3b30 in /lib64/libc.so.6
ofonod[32055]: #1  0x4c2466 in __ofono_watchlist_remove_item() at
src/watch.c:57
ofonod[32055]: #2  0x4b5b73 in ofono_sim_remove_spn_watch() at
src/sim.c:2715
ofonod[32055]: #3  0x497c30 in netreg_unregister() at src/network.c:1817
ofonod[32055]: #4  0x4912e1 in __ofono_atom_unregister() at
src/modem.c:277
ofonod[32055]: #5  0x491387 in flush_atoms() at src/modem.c:425
ofonod[32055]: #6  0x4b6cb8 in __ofono_sim_refresh() at src/sim.c:3154
ofonod[32055]: #7  0x4b8c41 in handle_command_refresh() at
src/stk.c:2302
ofonod[32055]: #8  0x4baf0d in
ofono_stk_proactive_command_handled_notify() at src/stk.c:3048
ofonod[32055]: #9  0x46c60f in satn_notify() at
drivers/ifxmodem/stk.c:229
ofonod[32055]: #10 0x7f6af1711455 in /usr/lib64/libglib-2.0.so.0
ofonod[32055]: #11 0x43e729 in at_chat_match_notify() at
gatchat/gatchat.c:421
ofonod[32055]: #12 0x440da8 in received_data() at gatchat/gatio.c:125
ofonod[32055]: #13 0x441834 in dispatch_sources() at
gatchat/gatmux.c:157
ofonod[32055]: #14 0x441bbd in received_data() at gatchat/gatmux.c:215
ofonod[32055]: #15 0x7f6af173dfc3 in /usr/lib64/libglib-2.0.so.0
ofonod[32055]: #16 0x7f6af16ef065 in /usr/lib64/libglib-2.0.so.0
ofonod[32055]: #17 0x7f6af16efd0f in /usr/lib64/libglib-2.0.so.0
ofonod[32055]: #18 0x7f6af16efef9 in /usr/lib64/libglib-2.0.so.0
ofonod[32055]: #19 0x7f6af16f032f in /usr/lib64/libglib-2.0.so.0
ofonod[32055]: #20 0x48f5f8 in main() at src/main.c:249
ofonod[32055]: #21 0x7f6af0ed04bd in /lib64/libc.so.6
ofonod[32055]: +++++++++++++++++++++++++++
2012-11-28 10:31:14 -06:00
Denis Kenzior b5d7fd8d38 stk: Handle self explanatory icons in idle mode text 2012-11-28 10:31:14 -06:00
Denis Kenzior 5afd6e1f5d stk: Handle icon self explanatory in play tone 2012-11-28 10:31:14 -06:00
Denis Kenzior 3e64381353 stk: Handle icon self explanatory in get input 2012-11-28 10:31:14 -06:00
Denis Kenzior ff6d81a67b stk: Handle icon self explanatory in get inkey 2012-11-28 10:31:14 -06:00
Denis Kenzior b2c287db75 stk: Handle icon self explanatory in display text 2012-11-28 10:31:14 -06:00
Denis Kenzior bc5645640c stk: Handle icon self explanatory in menus 2012-11-28 10:31:14 -06:00
Denis Kenzior 00b37a5e64 sim: Fix crash
When modem is brought online, then sim removed and re-inserted.  We
crash when going online again due to the spn related data-structures not
being initialized properly
2012-11-28 10:31:14 -06:00
Denis Kenzior 736f44e0d3 sim: Read icons with a full SIM/USIM path 2012-11-23 07:22:25 -06:00
Denis Kenzior 6eb9542907 simfs: Handle optional EF paths 2012-11-23 07:22:25 -06:00
Marcel Holtmann 0a496ab8c0 sim: Assume CPHS files are in ADFusim 2012-11-25 15:34:41 +01:00
Denis Kenzior a9296c18e9 simutil: Add 2G and 3G path lookup utilities 2012-11-22 10:26:34 -06:00
Denis Kenzior 5de557bc55 simfs: Update to the new SIM api 2012-11-22 10:26:34 -06:00
Denis Kenzior 19210edd3a sim: Update to the new sim reading API 2012-11-22 10:26:34 -06:00
Denis Kenzior 74deff6b1d simutil: Introduce 2G and 3G parent paths 2012-11-22 10:26:34 -06:00
Denis Kenzior 1f986ebdad voicecall: Handle RESETTING sim state 2012-11-22 06:57:04 -06:00
Denis Kenzior 732bab46b5 modem: Handle RESETTING sim state 2012-11-22 06:57:00 -06:00
Denis Kenzior bca0f5cde1 simutil: Add file type information to sim_db 2012-11-22 06:50:09 -06:00
Denis Kenzior b1f0a5e84f simutil: Rename structure variable 2012-11-22 06:50:09 -06:00
Denis Kenzior b97e79b3df sim: Fix SIM re-init case of SIM Refresh
When the SIM is being refreshed, we try to access the SIM too fast after
the SIM REFRESH proactive command is received.  Instead set the sim atom
into the 'RESETTING' state and wait until the modem driver signals the
sim insertion again.
2012-11-22 06:50:08 -06:00
Denis Kenzior dfd1fae50b stk: Fix crash in SIM refresh handling 2012-11-22 06:50:08 -06:00
Denis Kenzior 9d9ae3af28 stk: Always include IdleModeText in GetProperties 2012-11-22 06:50:08 -06:00
Denis Kenzior 454ca9f40e sim: destroy spn info as part of sim main state 2012-11-22 06:50:08 -06:00
Denis Kenzior e98dcc0616 stk: Use the shorter timeout for select item 2012-11-22 06:50:08 -06:00
Denis Kenzior f39d7efb53 stk: use longer timeout for ImmediateResponse 2012-11-22 06:50:08 -06:00
Denis Kenzior 85c0e53013 stk: Use short timeout for get_inkey 2012-11-22 06:50:08 -06:00
Denis Kenzior b581f409ec stk: Use a shorter timeout for DisplayText
For any commands that are tagged as wait-for-user to clear, we should
use the shorter timeout.  The test system expects 25 to 35 seconds.
2012-11-22 06:50:08 -06:00
Denis Kenzior e6df03b420 modem: Add support for modem type TEST 2012-11-02 14:03:16 -05:00
Denis Kenzior 9d223e7e39 stk: Tweak the concept of continuous tones
The spec explicitly mentions continuous or repeatable tones.  02.40 only
mentions the RP-ACK tone as a single tone, all other tones seem to be
repeatable
2012-10-31 16:14:27 -05:00
Marti Raudsepp d28d473459 systemd: prevent duplicate logging messages in journal
By default, both stderr and syslog messages go to the systemd journal,
which results in duplicate messages being logged.

Thanks to Vinicius Costa Gomes for pointing out this problem.
2012-10-25 16:28:38 -07:00
Denis Kenzior 5249303423 smsutil: Fix warning
src/smsutil.c: In function ‘cbs_decode_text’:
src/smsutil.c:4116:16: error: comparison between signed and unsigned
integer expressions [-Werror=sign-compare]
2012-10-01 09:52:32 -05:00
Philippe Nunes ce79121d27 stkagent: Sanitize any output from the agent 2012-09-17 12:06:35 -05:00
Denis Kenzior af9951d5d0 smsutil: Fix up style issues from previous commit 2012-09-17 11:56:09 -05:00
Philippe Nunes 27b63a96c3 smsutil: <CR> is not necessarily a CBS padding character 2012-09-17 11:51:11 -05:00
Denis Kenzior 941257bec6 smsutil: Fix CR padding logic for 7-bit case 2012-09-17 11:48:03 -05:00
Philippe Nunes d31eba88c7 smsutil: Fix style issues 2012-09-17 11:27:51 -05:00
Philippe Nunes 94e35ff915 stk: AID shall not be displayed in certain cases
When the icon is marked as self explanatory, the AID should not be
displayed.
2012-09-17 11:25:15 -05:00
Philippe Nunes 23cdb46419 stk: move number conversion to a utility function
The dialing number provided by the Setup Call proactive command
may contain pause and DTMF characters.
2012-09-17 11:24:58 -05:00
Denis Kenzior 2dac10e1cb sms: Optimize behavior of previous commit
The previous commit fixed the bug, however performing a linear-search
through the entire tx-queue is quite wasteful.  The current usage
pattern is to always modify the entry at the tail of the queue, so
optimize.
2012-09-11 22:33:43 -05:00
Philippe Nunes 80fb1c2fac sms: Fix to find SMS entry posted by STK
SMS initiated by proactive command are not exposed on D-BUS.
Therefore, there is no message associated with the entry created from
STK.
2012-09-11 22:33:43 -05:00
Philippe Nunes 25d51ba03b ussd: Recover idle state after a transaction error
The "USSD terminated by network" notification is handled to recover
the idle state in case of USSD transaction error.
2012-09-11 22:33:43 -05:00
Philippe Nunes cf211d17e3 dbus: Add Terminated error 2012-09-11 22:33:43 -05:00
Philippe Nunes 0ee9b5af78 call-barring: SS query is made with given cls
The default class is applied in the query form when no class is
specified in the SS code.
2012-09-05 15:03:38 -05:00
Philippe Nunes 1bb7222d83 call-forwarding: SS query is made with given cls
GCF test cases 31.2.1.6.1/2 are asking to make a query according a
specific class. The default class is applied in the query form when
no class is specified in the SS code.
2012-09-05 15:00:14 -05:00
Philippe Nunes 20138aed75 voicecall: Accept long phone number format for STK 2012-09-05 14:25:57 -05:00
Denis Kenzior 50d6f2c607 stk: Fix comment style 2012-08-30 17:01:36 -05:00
Philippe Nunes 0a9a566065 stk: Ask for immediate digit response as required
This is done by using the stk_agent_request_quick_digit function
introduced in the previous commit.
2012-08-30 16:55:36 -05:00
Philippe Nunes e5f2701e50 stkagent: Add stk_agent_get_quick_digit
This function calls the newly added RequestQuickDigit method on the
StkAgent interface.
2012-08-30 16:54:54 -05:00
Philippe Nunes 3ac780fee7 stk: Check if an agent is registered when UI is required
In case of unsolicited proactive command, we could have a crash
when no agent was registered.
2012-08-30 16:47:20 -05:00
Philippe Nunes ec6269e59b stk: Display action information while sending USSD 2012-08-30 16:36:49 -05:00
Philippe Nunes c7b359ae98 call-settings: Improve error reporting
Report error based on the error reported by the driver.
2012-08-22 18:18:05 -05:00
Philippe Nunes 2638408135 call-barring: Improve error reporting
Report error based on the error reported by the driver.
2012-08-22 18:17:35 -05:00
Philippe Nunes 666da0ea53 call-forwarding: improve error reporting
Report error based on the error reported by the driver.
2012-08-22 18:16:15 -05:00
August Mayer 22c0738981 sim: implement function to get password type 2012-08-16 00:59:18 -05:00
Denis Kenzior 54de04a828 util: Make sure to handle special empty strings
Some SIMs contain an EFspn with the contents all set to 'filler'
characters, e.g. 0xFF.  We mistakenly do not handle these strings
correctly.

Aug  8 11:40:00 mx31tt01 daemon.info ofonod[622]: Aux: >
AT+CRSM=176,28486,0,0,17\r
Aug  8 11:40:00 mx31tt01 daemon.info ofonod[622]: Aux: < \r\n+CRSM:
144,0,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\r\n\r\nOK\r\n
Aug  8 11:40:00 mx31tt01 daemon.debug ofonod[622]:
drivers/atmodem/sim.c:at_crsm_read_cb() crsm_read_cb: 90, 00, 17
Aug  8 11:40:00 mx31tt01 daemon.debug ofonod[622]:
src/simfs.c:sim_fs_op_read_block_cb() bufoff: 0, dataoff: 0, tocopy: 17
Aug  8 11:40:00 mx31tt01 daemon.err ofonod[622]: EFspn read
successfully, but couldn't parse
2012-08-16 00:47:59 -05:00
Christopher Vogl df05259e90 gprs: fix bearer dbus signal interface
According to the documentation the data bearer property should be
located on interface org.ofono.ConnectionManager.
2012-08-13 09:48:50 -05:00
Denis Kenzior 3d57bf37d0 voicecall: Implement ReleaseAndSwap 2012-08-05 23:34:16 -05:00
Denis Kenzior 416c1937c9 util: Style issues 2012-07-16 22:51:43 -05:00
Denis Kenzior bce1879c1b util: update comment from previous commit
Cite the specification verbatim
2012-07-16 22:51:20 -05:00
Guillaume Zajac 1710be9c89 util: Fix GSM to UTF8 conversion mechanism 2012-07-16 22:41:34 -05:00
Guillaume Zajac 05b8fe4794 gprs: Call detach_shutdown when network is lost 2012-07-15 20:05:23 -05:00
Marcel Holtmann c1490c6751 voicecall: Avoid shadowing of number variable 2012-07-15 20:35:42 -03:00
Marcel Holtmann 8cdc453b2b voicecall: Remove shadowing modem variable 2012-07-15 20:32:17 -03:00
Marcel Holtmann b2f628687a ctm: Remove shadowing reply variable 2012-07-15 20:29:29 -03:00
Marcel Holtmann d9d420e77e ofono: Avoid shadowing other atom variables 2012-07-15 20:28:30 -03:00
Marcel Holtmann 0d4e80c002 gprs: Avoid shadowing error variable 2012-07-15 20:26:12 -03:00
Marcel Holtmann f20e7e9b3d network: Avoid shadowing of strength variable 2012-07-15 20:21:19 -03:00
Marcel Holtmann 82a1f62994 network: Avoid shadowing of mode parameter 2012-07-15 20:20:39 -03:00
Denis Kenzior 86b6991091 manager: Fix up introspection data 2012-07-04 08:14:38 -05:00
Guillaume Zajac 57fe0bcfb1 emulator: Test already done in g_at_server_resume() 2012-06-24 17:40:59 -05:00
Marcel Holtmann 674cb0d167 sim: Add extra errors for EFmsisdn and EFad length mismatches 2012-06-25 00:00:45 -07:00
Denis Kenzior 72ce19bf3e sim: Fix use of uninitialized values
In the case of an error, sim_pin_query_cb should not assume the
pin_type value is valid.
2012-06-19 12:59:42 -05:00
Denis Kenzior d69269b77f sim: Don't re-init the SIM needlessly
When calling ChangePin with the wrong original PIN, we're still left in
the READY state.  Do not re-initialize the SIM needlessly in this case.
2012-06-19 12:54:37 -05:00
Denis Kenzior 4d49f5cd34 ussd: send NotRecognized error for invalid USSD 2012-06-18 09:23:20 -05:00
Denis Kenzior d18414b918 dbus: Add NotRecognized error 2012-06-18 09:21:32 -05:00
Denis Kenzior 333bb8b1d3 common: Match logic to comment: valid_ussd_string 2012-06-18 08:59:04 -05:00
Denis Kenzior cb571f807f simutil: Add entry for EFimsi 2012-06-17 08:11:15 -05:00
Denis Kenzior bc38ef91cd sim: Allow IMSI to be obtained via EF reads 2012-06-17 08:01:04 -05:00
Denis Kenzior 2b606f548c stk: Fix crash when envelope returns sync
ofonod[13066]: src/stk.c:stk_select_item()
ofonod[13066]: src/stk.c:stk_select_item()
ofonod[13066]: src/stk.c:stk_send_envelope()
ofonod[13066]: drivers/qmimodem/stk.c:qmi_envelope()
ofonod[13066]: src/stk.c:envelope_cb() length 0
ofonod[13066]: src/stk.c:menu_selection_envelope_cb()
ofonod[13066]: Sending Menu Selection to UICC failed
process 13066: arguments to dbus_message_new_error() were incorrect,
assertion "reply_to != NULL" failed in file dbus-message.c line 1333.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
  ofonod[13066]: Aborting (signal 6) [./src/ofonod]
  ofonod[13066]: ++++++++ backtrace ++++++++
2012-06-16 23:22:04 -05:00
Denis Kenzior e0e6e2c439 sim: Revert adding special callback for EFiccid
This reverts commit 1960dbbc79.
2012-06-16 09:50:05 -05:00
Denis Kenzior a8247d17af sim: Revert adding special callback for EFmsisdn
This reverts commit c3124b66d9.
2012-06-16 09:50:05 -05:00
Denis Kenzior bee063dd76 sim: Revert adding special callback for EFad
This reverts commit 5522df64fa.
2012-06-16 09:50:05 -05:00
Denis Kenzior 7362e6a802 cdma-sms: Update to the new API declaration 2012-06-16 09:50:05 -05:00
Marcel Holtmann 543db63f19 gprs: Use ofono_bool_t instead of gboolean 2012-06-17 22:23:23 -07:00
Marcel Holtmann 2ead77e133 sms: Make PDU data arrays const 2012-06-17 00:58:35 -07:00
Marcel Holtmann 67c6a01d46 modem: Add function for setting new driver type 2012-06-17 00:58:08 -07:00
Marcel Holtmann 5522df64fa sim: Add special callback for reading MCC and MNC value 2012-06-16 21:30:28 -07:00
Marcel Holtmann c3124b66d9 sim: Add special callback for reading MSISDN value 2012-06-16 20:52:18 -07:00
Marcel Holtmann 1960dbbc79 sim: Add special callback for reading ICCID value 2012-06-16 20:22:30 -07:00
Marcel Holtmann 10297b153a sim: Use ofono_bool_t instead of gboolean 2012-06-16 20:08:10 -07:00
Philippe Nunes a571d2887b call-settings: Return specific errors for SS 2012-05-30 09:06:13 -05:00
Philippe Nunes 308e99dc19 call-forwarding: Return specific errors for SS 2012-05-30 09:05:57 -05:00
Philippe Nunes c935817653 call-barring: Return specific errors for SS 2012-05-30 09:05:39 -05:00
Philippe Nunes 07a2e70283 dbus: Add __ofono_error_from_error utility function 2012-05-30 09:03:23 -05:00
Denis Kenzior 21369944ad sms: Fix GetMessages argument / return signature 2012-05-30 09:00:32 -05:00
Philippe Nunes 1f4e339a13 dbus: Add new error types 2012-05-30 00:22:50 -05:00
Philippe Nunes 761f16394d common: Fix typos in error strings 2012-05-30 00:21:58 -05:00
Marcel Holtmann c98de2a4bf build: Remove dependency on libcap-ng 2012-05-29 08:17:01 +02:00
Lucas De Marchi e0d6f9f0ce Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-05-20 02:47:57 -07:00
Lucas De Marchi b3489f2ee8 Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-05-20 02:47:57 -07:00
Henrique Dante de Almeida 924ee02ff7 Constify GDBus signal tables
Constify signal tables with the following command:

    find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Henrique Dante de Almeida 63bbdebdf2 Constify GDBus method tables
Constify method tables with the following command:

find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Oleg Zhurakivskyy aa8e11bed6 call-forwarding: Remove unneeded variable 2012-04-23 15:39:35 -05:00
Oleg Zhurakivskyy 6356612822 call-forwarding: Streamline set_query_cf_callback() 2012-04-23 15:39:27 -05:00
Oleg Zhurakivskyy 9d8aa928b8 call-forwarding: Refactor cf_find_unconditional() 2012-04-23 15:35:22 -05:00
Oleg Zhurakivskyy d797a868c0 call-forwarding: Streamline cf_find_timeout() logic 2012-04-23 15:33:44 -05:00
Oleg Zhurakivskyy e67a7fb913 call-forwarding: Get rid of extra variable 2012-04-23 15:32:12 -05:00
Denis Kenzior bed9f4e09b call-forwarding: Make cf_cond_find more readable 2012-04-23 15:31:29 -05:00
Oleg Zhurakivskyy e53723e3c6 call-forwarding: Refactor cf_condition_find_with_cls() 2012-04-23 15:27:47 -05:00
Oleg Zhurakivskyy 9b37eefdb7 call-forwarding: Refactor cf_condition_compare() 2012-04-23 15:21:17 -05:00
Marcel Holtmann 4ce0034803 modem: Add missing empty line 2012-04-12 12:09:32 +02:00
Frédéric Danis 004c8200aa voicecall: Force callheld update after calls swap
In HFP spec, a callheld indicator update should be sent after swapping
calls, even if it stays to 1 (AG has both active and held calls).
2012-03-20 19:26:24 -05:00
Frédéric Danis 1f3935429d emulator: Force indicator event implementation 2012-03-20 19:20:22 -05:00
Oleg Zhurakivskyy 65898b34b8 call-forwarding: Inline get_query_next_cf_cond() 2012-03-19 13:33:41 -05:00
Oleg Zhurakivskyy 021b2145d4 call-forwarding: Remove cf_list_clear()
Use g_slist_free_full() instead.
2012-03-19 13:33:10 -05:00
Frédéric Danis 0efaa9975a voicecall: Improve transitions check
Indicators should not be updated if:
- multiple separate calls are active at same time
- a conf call and a call are active at same time
- multiple separate calls are held at same time
- a conf call and a call are held at same time
- a conf call has call in active and held state
2012-03-13 21:44:15 -05:00
Denis Kenzior f8812ceb23 voicecall: Don't set indicators during transitions 2012-03-07 06:17:06 -06:00
Frédéric Danis 033e518cd4 emulator: fix notify_ring
notify_ring should not use information from waiting call
2012-03-07 06:16:51 -06:00
Denis Kenzior 8b3c9e38a5 call-forwarding: Fix various style issues 2012-02-22 07:17:27 -06:00
Oleg Zhurakivskyy a5372acb1a call-forwarding: Minor code refactoring 2012-02-22 07:05:14 -06:00
Oleg Zhurakivskyy 69453afe9e call-forwarding: Emit signals when cfu is toggled
Emit signals to mask/unmask conditional cfs on cfu
activation/deactivation.
2012-02-22 06:56:58 -06:00
Oleg Zhurakivskyy 0dc3515af4 call-forwarding: Update conditional reporting logic
Don't report conditional cfs when cfu is active
2012-02-22 04:52:14 -06:00
Oleg Zhurakivskyy e4488eef1a call-forwarding: Update conditional setting logic
Due to how the quiescent behavior of conditional call forwarding rules
when CFU is active, do not allow the user to try and set conditional
rules.  This will fail at the network level anyway.
2012-02-22 04:29:16 -06:00