platform/upstream/ofono.git
11 years agosim900: Enable serial receiver
Jesper Larsen [Wed, 17 Jul 2013 07:14:13 +0000 (09:14 +0200)]
sim900: Enable serial receiver

The read option must be set to 'on' in order for two-way
communication with SIM900 module to work.

11 years agodundee: return error if there is a connection procedure ongoing
Gustavo Padovan [Mon, 24 Jun 2013 16:14:02 +0000 (17:14 +0100)]
dundee: return error if there is a connection procedure ongoing

11 years agohfp_hf_bluez5: Fix SDP record with correct features
Frederic Danis [Thu, 27 Jun 2013 12:45:58 +0000 (14:45 +0200)]
hfp_hf_bluez5: Fix SDP record with correct features

11 years agohfpmodem: Fix ECNR HF feature
Frederic Danis [Thu, 27 Jun 2013 12:45:57 +0000 (14:45 +0200)]
hfpmodem: Fix ECNR HF feature

11 years agogdbus: Remove proxies when client disconnects
Henrique Dante de Almeida [Mon, 27 May 2013 17:15:34 +0000 (14:15 -0300)]
gdbus: Remove proxies when client disconnects

Remove proxies and generate proxy_removed callbacks even when there are
no corresponding InterfaceRemoved signals.

This patch fixes having zombie gdbus proxy object when a server
disconnects without sending InterfaceRemoved signals. These objects
may interact with new server instances, for example, making
InterfaceAdded signals of new objects with the same name be filtered
out as duplicated, or staying allocated, but unused, if the new server
doesn't reuse the object paths. Note that as a side-effect, the
lifetime of a gdbus proxy becomes stricter: it lives at most for the
duration of a single connection to a single instance of a server
process.

11 years agocommon: Fix parsing SS control string
Lucas De Marchi [Wed, 22 May 2013 21:28:38 +0000 (18:28 -0300)]
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.

11 years agogitignore: Ignore file generated by Automake 1.13
Lucas De Marchi [Wed, 22 May 2013 23:01:48 +0000 (20:01 -0300)]
gitignore: Ignore file generated by Automake 1.13

Automake >= 1.13 enables parallel-tests option by default which uses a
test-driver script (copied by automake). Ignore this file and the files
generated by this script.

11 years agostk: Fix sizeof on memcpy
Lucas De Marchi [Wed, 22 May 2013 23:01:47 +0000 (20:01 -0300)]
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));
                                               ^

11 years agogdbus: Fix using NULL DBusPendingCall when disconnected from D-Bus
Anderson Lizardo [Sat, 4 May 2013 19:39:43 +0000 (15:39 -0400)]
gdbus: Fix using NULL DBusPendingCall when disconnected from D-Bus

From D-Bus documentation for dbus_connection_send_with_reply():

"Warning: if the connection is disconnected or you try to send Unix file
descriptors on a connection that does not support them, the
DBusPendingCall will be set to NULL, so be careful with this."

Fix these errors when killing D-Bus daemon with the client still
running:

process 5712: arguments to dbus_pending_call_set_notify() were
incorrect, assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 596.
This is normally a bug in some application using the D-Bus library.
process 5712: arguments to dbus_pending_call_unref() were incorrect,
assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 572.
This is normally a bug in some application using the D-Bus library.

11 years agogdbus: Fix segfault when D-Bus daemon exits
Anderson Lizardo [Sat, 4 May 2013 19:39:42 +0000 (15:39 -0400)]
gdbus: Fix segfault when D-Bus daemon exits

Fix this crash if D-Bus exits while the client is still connected to it:

==5570== Invalid read of size 1
==5570==    at 0x402D28E: strcmp (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==5570==    by 0x4070E22: g_str_equal (ghash.c:1704)
==5570==    by 0x8055F61: message_filter (client.c:1123)
==5570==    by 0x4141500: dbus_connection_dispatch (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==5570==    by 0x80506F7: message_dispatch (mainloop.c:76)
==5570==    by 0x4081A7E: g_timeout_dispatch (gmain.c:3882)
==5570==    by 0x4080D85: g_main_context_dispatch (gmain.c:2539)
==5570==    by 0x4081124: g_main_context_iterate.isra.21 (gmain.c:3146)
==5570==    by 0x408156A: g_main_loop_run (gmain.c:3340)
==5570==    by 0x41BF4D2: (below main) (libc-start.c:226)
==5570==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5570==
==5570==

11 years agogdbus: Fix calling GetManagedObjects twice in a row
Luiz Augusto von Dentz [Thu, 18 Apr 2013 20:34:03 +0000 (23:34 +0300)]
gdbus: Fix calling GetManagedObjects twice in a row

Calling g_dbus_client_new followed by g_dbus_client_set_proxy_handlers
cause two calls to GetManagedObjects in a row as GetNameOwner reply is
asyncronously it triggers the second call because the handlers have
been set by g_dbus_client_set_proxy_handlers.

11 years agohandsfree-audio: Fix replying to an empty D-Bus message
Vinicius Costa Gomes [Fri, 3 May 2013 00:47:16 +0000 (21:47 -0300)]
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.

11 years agohfp_hf_bluez5: Enable WB only with defer_setup
Vinicius Costa Gomes [Thu, 25 Apr 2013 19:05:17 +0000 (16:05 -0300)]
hfp_hf_bluez5: Enable WB only with defer_setup

When setting the SDP features, only enable wideband speech support if
the kernel has defer setup for SCO.

It is possible that even if defer setup is supported the kernel is
not able to use Transparent Mode for SCO.

11 years agohandsfree-audio: Implement ofono_handsfree_audio_has_defer_setup()
Vinicius Costa Gomes [Thu, 25 Apr 2013 19:05:16 +0000 (16:05 -0300)]
handsfree-audio: Implement ofono_handsfree_audio_has_defer_setup()

11 years agoinclude: Add ofono_handsfree_audio_has_defer_setup()
Vinicius Costa Gomes [Thu, 25 Apr 2013 19:05:15 +0000 (16:05 -0300)]
include: Add ofono_handsfree_audio_has_defer_setup()

11 years agoRevert "hfp_hf_bluez5: UUIDs can change after Pairing"
Denis Kenzior [Thu, 25 Apr 2013 22:47:05 +0000 (17:47 -0500)]
Revert "hfp_hf_bluez5: UUIDs can change after Pairing"

This reverts commit 456b8c9723b9b73c3ea4cadc8c6f84ca90675f9a.

11 years agohfp_hf_bluez5: Register the SDP record with correct features
Vinicius Costa Gomes [Tue, 23 Apr 2013 21:21:52 +0000 (18:21 -0300)]
hfp_hf_bluez5: Register the SDP record with correct features

11 years agohfp: Add defines for HFP SDP feature bits
Vinicius Costa Gomes [Tue, 23 Apr 2013 21:21:51 +0000 (18:21 -0300)]
hfp: Add defines for HFP SDP feature bits

11 years agobluez5: Unify bt_register_profile_* into a single function
Vinicius Costa Gomes [Tue, 23 Apr 2013 21:21:50 +0000 (18:21 -0300)]
bluez5: Unify bt_register_profile_* into a single function

It was a cause of confusion for little gain to have separate
functions for registering profiles with extra information, for
example "role" and "features". We remove those helper functions
in favor of a single one with more parameters, "role" and
"feature" when NULL, will be ignored.

11 years agocore: Add SetProperty for EchoCancelingNoiseReduction
Claudio Takahasi [Tue, 23 Apr 2013 17:21:43 +0000 (14:21 -0300)]
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.

11 years agohfpmodem: Add EchoCancelingNoiseReduction
Claudio Takahasi [Tue, 23 Apr 2013 17:21:42 +0000 (14:21 -0300)]
hfpmodem: Add EchoCancelingNoiseReduction

This patch adds echo canceling and noise reduction implementation to
hfpmodem. It adds the implementation to send the command "AT+NREC=0"
to the AG.

11 years agoinclude: Add disable_nrec to handsfree driver
Claudio Takahasi [Tue, 23 Apr 2013 17:21:41 +0000 (14:21 -0300)]
include: Add disable_nrec to handsfree driver

This patch extends the handsfree driver adding echo canceling and noise
reduction callback to allow disabling this feature in the audio gateway.

11 years agocore: Set EchoCancelingNoiseReduction to TRUE by default
Claudio Takahasi [Tue, 23 Apr 2013 17:21:40 +0000 (14:21 -0300)]
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.

11 years agocore: Add EchoCancelingNoiseReduction to GetProperties
Claudio Takahasi [Tue, 23 Apr 2013 17:21:39 +0000 (14:21 -0300)]
core: Add EchoCancelingNoiseReduction to GetProperties

This patch adds EchoCancelingNoiseReduction property to GetProperties
method of Handsfree interface.

11 years agocore: Add "echo-canceling-and-noise-reduction"
Claudio Takahasi [Tue, 23 Apr 2013 17:21:38 +0000 (14:21 -0300)]
core: Add "echo-canceling-and-noise-reduction"

This patch adds "echo-canceling-and-noise-reduction" to "Features"
property of the Handsfree interface.

11 years agodoc: Add EchoCancelingNoiseReduction to Handsfree
Claudio Takahasi [Tue, 23 Apr 2013 17:21:37 +0000 (14:21 -0300)]
doc: Add EchoCancelingNoiseReduction to Handsfree

This patch adds echo canceling and noise reduction property to Handsfree
interface, allowing the handsfree unit to disable this feature in the
audio gateway. The HFP spec defines the procedure to turn off echo
canceling and noise reduction only, it is not allowed to enable this
feature from the HF unit.

According to Bluetooth HFP 1.6 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 from the HF
unit. From then on, and until the current Service Level Connection is
dropped for any reason, the AG shall disable these functions every time
an Audio Connection is established.

11 years agohfp_ag_bluez5: Implement RequestDisconnection()
Paulo Borges [Fri, 19 Apr 2013 22:19:05 +0000 (19:19 -0300)]
hfp_ag_bluez5: Implement RequestDisconnection()

When a RequestDisconnect() is received, the socket must be closed.
This way, the related emulator will be freed.

11 years agohfp_ag_bluez5: Add watch for G_IO_HUP when connect
Paulo Borges [Fri, 19 Apr 2013 22:19:04 +0000 (19:19 -0300)]
hfp_ag_bluez5: Add watch for G_IO_HUP when connect

A watch to G_IO_HUP is added to remove the file descriptor when the
emulator is automatically disconnected when its GAtServer closes.

We use a dupped file descriptor because the events aren't delivered to
the file descriptor who originated them.

11 years agohfp_ag_bluez5: Create a hash to store connections
Paulo Borges [Fri, 19 Apr 2013 22:19:03 +0000 (19:19 -0300)]
hfp_ag_bluez5: Create a hash to store connections

We need to store active connections so we can disconnect them at
RequestDisconnect().

When we remove a connection from the hash, we also close it.

11 years agohfp_ag_bluez5: Remove unused includes
Paulo Borges [Mon, 15 Apr 2013 21:41:50 +0000 (18:41 -0300)]
hfp_ag_bluez5: Remove unused includes

11 years agohfp: Move HFP versions definitions to hfp.h
Paulo Borges [Mon, 15 Apr 2013 21:41:49 +0000 (18:41 -0300)]
hfp: Move HFP versions definitions to hfp.h

hfp.h should store all HFP related definitions.

11 years agohfp_ag_bluez5: Include hfp.h
Paulo Borges [Mon, 15 Apr 2013 21:41:48 +0000 (18:41 -0300)]
hfp_ag_bluez5: Include hfp.h

11 years agophonesim: Include hfp.h
Paulo Borges [Mon, 15 Apr 2013 21:41:47 +0000 (18:41 -0300)]
phonesim: Include hfp.h

11 years agohfp_hf_bluez5: UUIDs can change after Pairing
Vinicius Costa Gomes [Thu, 18 Apr 2013 17:50:38 +0000 (14:50 -0300)]
hfp_hf_bluez5: UUIDs can change after Pairing

For example, in the case of a remote-initiated pairing, the device may
be created and Paired first, then the UUID array is emitted later.

11 years agohandsfree-audio: Add debug logging
João Paulo Rechi Vita [Tue, 16 Apr 2013 22:32:21 +0000 (19:32 -0300)]
handsfree-audio: Add debug logging

Print debug messages when Handsfree Audio Agent registers or unregisters
itself.

11 years agoemulator: Change feature check to attend HFP 1.6
Paulo Borges [Fri, 12 Apr 2013 20:41:02 +0000 (17:41 -0300)]
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.

11 years agohandsfree-audio: Toggle wideband support when the agent registers
Vinicius Costa Gomes [Mon, 15 Apr 2013 13:54:53 +0000 (10:54 -0300)]
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.

11 years agohandsfree-audio: Keep track whether defer_setup is enabled
Vinicius Costa Gomes [Mon, 15 Apr 2013 13:54:52 +0000 (10:54 -0300)]
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.

11 years agohandsfree-audio: Send the selected codec
Claudio Takahasi [Mon, 15 Apr 2013 13:54:51 +0000 (10:54 -0300)]
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.

11 years agohfp_hf_bluez5: Watch for changes in the selected codec
Vinicius Costa Gomes [Mon, 15 Apr 2013 13:54:50 +0000 (10:54 -0300)]
hfp_hf_bluez5: Watch for changes in the selected codec

This patch adds a function to monitor when the AG sends a new codec
before establishing the SCO connection.

11 years agohandsfree-audio: Implement ofono_handsfree_card_set_codec()
Vinicius Costa Gomes [Mon, 15 Apr 2013 13:54:49 +0000 (10:54 -0300)]
handsfree-audio: Implement ofono_handsfree_card_set_codec()

11 years agoinclude: Add ofono_handsfree_card_set_codec()
Vinicius Costa Gomes [Mon, 15 Apr 2013 13:54:48 +0000 (10:54 -0300)]
include: Add ofono_handsfree_card_set_codec()

This will be used by the drivers that a given codec was negotiated
for a card.

It will return FALSE if the codec can't be used. For example, if the selected
codec is mSBC and defer setup is not supported by the kernel.

11 years agohfpmodem: Send AT+BAC with the supported codecs
Vinicius Costa Gomes [Mon, 8 Apr 2013 22:41:02 +0000 (19:41 -0300)]
hfpmodem: Send AT+BAC with the supported codecs

Before, the AT+BAC command was being sent with fixed information,
now we send the command (that inform the AG of the codecs supported by
the HF) with the codecs supported by the registered Handsfree Audio
Agent.

11 years agohandsfree-audio: Move codec enums to hfp.h
Denis Kenzior [Tue, 9 Apr 2013 04:58:49 +0000 (23:58 -0500)]
handsfree-audio: Move codec enums to hfp.h

11 years agocore: Include hfp.h
Denis Kenzior [Tue, 9 Apr 2013 04:48:49 +0000 (23:48 -0500)]
core: Include hfp.h

11 years agohfp_hf_bluez5: Include hfp.h
Denis Kenzior [Tue, 9 Apr 2013 04:45:13 +0000 (23:45 -0500)]
hfp_hf_bluez5: Include hfp.h

11 years agodrivers: Include hfp.h
Denis Kenzior [Tue, 9 Apr 2013 04:44:59 +0000 (23:44 -0500)]
drivers: Include hfp.h

11 years agocore: Add hfp.h
Denis Kenzior [Tue, 9 Apr 2013 04:43:41 +0000 (23:43 -0500)]
core: Add hfp.h

This will serve as a collection point for all HFP related definitions.

11 years agoinclude: Remove hfp bits from types.h
Denis Kenzior [Tue, 9 Apr 2013 04:44:36 +0000 (23:44 -0500)]
include: Remove hfp bits from types.h

11 years agohandsfree-audio: Remove unused 'codecs' field from agent
Vinicius Costa Gomes [Mon, 8 Apr 2013 22:41:03 +0000 (19:41 -0300)]
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.

11 years agohandsfree-audio: Implement ofono_handsfree_audio_has_wideband
Vinicius Costa Gomes [Mon, 8 Apr 2013 22:41:00 +0000 (19:41 -0300)]
handsfree-audio: Implement ofono_handsfree_audio_has_wideband

11 years agoinclude: Add ofono_handsfree_audio_has_wideband()
Vinicius Costa Gomes [Mon, 8 Apr 2013 22:40:59 +0000 (19:40 -0300)]
include: Add ofono_handsfree_audio_has_wideband()

As we can assume that the CVSD codec will be always available, the only
information that we need to export is if we have support for wideband
codecs.  Right now only mSBC is defined as wideband.

11 years agohfp_hf_bluez5: Remove redundant parentheses
Denis Kenzior [Tue, 9 Apr 2013 03:14:49 +0000 (22:14 -0500)]
hfp_hf_bluez5: Remove redundant parentheses

11 years agohfp_hf_bluez5: Add audio card .connect() for HFP 1.6
Vinicius Costa Gomes [Mon, 8 Apr 2013 22:40:58 +0000 (19:40 -0300)]
hfp_hf_bluez5: Add audio card .connect() for HFP 1.6

11 years agogdbus: Fix not calling property_changed callback
Luiz Augusto von Dentz [Wed, 27 Feb 2013 12:00:23 +0000 (14:00 +0200)]
gdbus: Fix not calling property_changed callback

In case a property did not appear by the time proxy_added was called
property_changed has to be called if it appear latter otherwise the
application will be unaware of it.

11 years agogdbus: Use gcc builtin instead of g_atomic
Lucas De Marchi [Mon, 8 Apr 2013 20:56:18 +0000 (17:56 -0300)]
gdbus: Use gcc builtin instead of g_atomic

g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.

gdbus/client.c: In function ‘g_dbus_client_ref’:
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]

11 years agohfp_hf_bluez5: Use 1.6 card driver
Vinicius Costa Gomes [Wed, 3 Apr 2013 23:24:39 +0000 (20:24 -0300)]
hfp_hf_bluez5: Use 1.6 card driver

11 years agohfp_hf_bluez5: Add extracting version
Claudio Takahasi [Wed, 3 Apr 2013 23:24:37 +0000 (20:24 -0300)]
hfp_hf_bluez5: Add extracting version

This patch parses and reads the profile "Version" that comes in the fd
dictionary of the NewConnection method. "Version" is input for Audio Card
registration.

11 years agohuawei: Use AlwaysOnline for CDMA modems
Forest Bond [Thu, 28 Mar 2013 21:00:40 +0000 (17:00 -0400)]
huawei: Use AlwaysOnline for CDMA modems

11 years agomodem: Support modem property "AlwaysOnline"
Forest Bond [Thu, 28 Mar 2013 21:00:32 +0000 (17:00 -0400)]
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.

11 years agoAUTHORS: Mention Anthony's contributions
Denis Kenzior [Tue, 2 Apr 2013 02:39:11 +0000 (21:39 -0500)]
AUTHORS: Mention Anthony's contributions

11 years agosim: Add SIMCOM SIM card ready quirk
Anthony Viallard [Fri, 22 Mar 2013 10:36:17 +0000 (11:36 +0100)]
sim: Add SIMCOM SIM card ready quirk

SIM is busy right after pin is entered. Use the quirk which
add a CPIN? pooling check until having "CPIN: READY" answer.

11 years agomodem: Allow setting boolean properties
Forest Bond [Thu, 28 Mar 2013 14:22:20 +0000 (10:22 -0400)]
modem: Allow setting boolean properties

11 years agohandsfree-audio: Add .Connect using the card driver
Vinicius Costa Gomes [Thu, 28 Mar 2013 00:13:01 +0000 (21:13 -0300)]
handsfree-audio: Add .Connect using the card driver

Now each handsfree implementation may be notified that a card wants
its audio to be connected.

11 years agohandsfree-audio: Add ofono_handsfree_card_connect_sco
Vinicius Costa Gomes [Thu, 28 Mar 2013 00:13:00 +0000 (21:13 -0300)]
handsfree-audio: Add ofono_handsfree_card_connect_sco

11 years agoinclude: Add ofono_handsfree_card_connect_sco()
Vinicius Costa Gomes [Thu, 28 Mar 2013 00:12:59 +0000 (21:12 -0300)]
include: Add ofono_handsfree_card_connect_sco()

This will be used by HFP plugins to tell the core that a SCO connection
needs to be established.

11 years agohfp_hf_bluez5: Make sure to call the callback
Denis Kenzior [Thu, 28 Mar 2013 14:30:45 +0000 (09:30 -0500)]
hfp_hf_bluez5: Make sure to call the callback

11 years agohfp_hf_bluez5: Add a card driver for HFP 1.6
Vinicius Costa Gomes [Thu, 28 Mar 2013 00:12:58 +0000 (21:12 -0300)]
hfp_hf_bluez5: Add a card driver for HFP 1.6

This is just the skeleton of a Handsfree Audio Card for the HF side of
HFP 1.6.

11 years agoinclude: Fix hf audio connect method declaration
Denis Kenzior [Wed, 27 Mar 2013 04:28:06 +0000 (23:28 -0500)]
include: Fix hf audio connect method declaration

11 years agohandsfree-audio: Reject .Connect() from other senders
Vinicius Costa Gomes [Mon, 25 Mar 2013 22:05:20 +0000 (19:05 -0300)]
handsfree-audio: Reject .Connect() from other senders

Only the agent should be able to call .Connect() on the card.

11 years agohandsfree-audio: Add support for sending the SCO socket
Vinicius Costa Gomes [Mon, 25 Mar 2013 22:05:19 +0000 (19:05 -0300)]
handsfree-audio: Add support for sending the SCO socket

Send the SCO socket to the agent associated with the card that
just got connected.

11 years agohandsfree-audio: Add support for initiating SCO connections
Vinicius Costa Gomes [Mon, 25 Mar 2013 22:05:18 +0000 (19:05 -0300)]
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.

11 years agosim900: Fix disable cleanup procedure
Denis Kenzior [Tue, 26 Mar 2013 15:53:41 +0000 (10:53 -0500)]
sim900: Fix disable cleanup procedure

11 years agosim900: Fix compile error
Denis Kenzior [Tue, 26 Mar 2013 15:36:25 +0000 (10:36 -0500)]
sim900: Fix compile error

make --no-print-directory all-am
  CC     plugins/sim900.o
  cc1: warnings being treated as errors
  plugins/sim900.c: In function ‘shutdown_device’:
  plugins/sim900.c:180:9: error: unused variable ‘fd’
  make[1]: *** [plugins/sim900.o] Error 1
  make: *** [all] Error 2

11 years agosim900: Remove unneeded goto / label
Denis Kenzior [Tue, 26 Mar 2013 15:35:59 +0000 (10:35 -0500)]
sim900: Remove unneeded goto / label

11 years agosim900: Properly clean up device IOChannel on error
Denis Kenzior [Tue, 26 Mar 2013 15:34:09 +0000 (10:34 -0500)]
sim900: Properly clean up device IOChannel on error

11 years agosim900: Add multiplexer support
Renat Zaripov [Tue, 12 Mar 2013 14:37:58 +0000 (18:37 +0400)]
sim900: Add multiplexer support

Also add gprs and call-volume support.

11 years agosim900: Fix leak of options hash table
Denis Kenzior [Tue, 26 Mar 2013 15:18:57 +0000 (10:18 -0500)]
sim900: Fix leak of options hash table

11 years agoTODO: Mark BlueZ 5 support in dundee as done
Daniel Wagner [Sun, 24 Mar 2013 12:33:47 +0000 (13:33 +0100)]
TODO: Mark BlueZ 5 support in dundee as done

11 years agodundee: Handle Profile connect and disconnect
Paulo Borges [Wed, 20 Mar 2013 22:26:42 +0000 (19:26 -0300)]
dundee: Handle Profile connect and disconnect

11 years agodundee: Add dundee disconnect function
Paulo Borges [Wed, 20 Mar 2013 22:26:41 +0000 (19:26 -0300)]
dundee: Add dundee disconnect function

11 years agodundee: Add support for driver connect
Paulo Borges [Wed, 20 Mar 2013 22:26:40 +0000 (19:26 -0300)]
dundee: Add support for driver connect

This patch glues together the dundee driver interface with the
D-Bus Profile1 interface.

When the dundee driver requests a connection, it will call the
Device1's ConnectProfile.

11 years agodundee: Add BlueZ Profile handler
Paulo Borges [Wed, 20 Mar 2013 22:26:39 +0000 (19:26 -0300)]
dundee: Add BlueZ Profile handler

This patch declares the external dundee Profile handler. It
contains the initial implementation of the D-Bus Profile1
interface and methods responsible for handling Bluetooth
connections.

11 years agodundee: Register/unregister dundee device
Paulo Borges [Wed, 20 Mar 2013 22:26:38 +0000 (19:26 -0300)]
dundee: Register/unregister dundee device

This patch adds the dundee device struct to the our Bluetooth
device representation.

11 years agodundee: Add dundee device driver skeleton
Paulo Borges [Wed, 20 Mar 2013 22:26:37 +0000 (19:26 -0300)]
dundee: Add dundee device driver skeleton

This patch adds the functions to be called when the dundee will
connect or disconnect with a Bluetooth device.

11 years agodundee: Listen to devices property changes
Paulo Borges [Wed, 20 Mar 2013 22:26:36 +0000 (19:26 -0300)]
dundee: Listen to devices property changes

When a bluetooth device property change and this property is Alias,
we need to refresh our representation of this device.

11 years agodundee: Add tracking of bluetooth devices
Paulo Borges [Wed, 20 Mar 2013 22:26:35 +0000 (19:26 -0300)]
dundee: Add tracking of bluetooth devices

This patch tracks the GDBusProxy for Bluetooth devices in order to
be able to get their properties.

11 years agodundee: Add mechanism to store bluetooth devices
Paulo Borges [Wed, 20 Mar 2013 22:26:34 +0000 (19:26 -0300)]
dundee: Add mechanism to store bluetooth devices

This patch adds a hash that will store every known bluetooth
device that implements DUN service.

11 years agodundee: Initial GDBusClient for BlueZ 5
Paulo Borges [Wed, 20 Mar 2013 22:26:33 +0000 (19:26 -0300)]
dundee: Initial GDBusClient for BlueZ 5

This patch adds callbacks to track additions of BlueZ related
interfaces.

11 years agodundee: Start BlueZ 5 support
Paulo Borges [Wed, 20 Mar 2013 22:26:31 +0000 (19:26 -0300)]
dundee: Start BlueZ 5 support

This patch adds the BlueZ 5 support file for dundee.

11 years agodundee: Rename dundee BlueZ 4 support
Paulo Borges [Wed, 20 Mar 2013 22:26:30 +0000 (19:26 -0300)]
dundee: Rename dundee BlueZ 4 support

The BlueZ 4 support file for dundee has now been renamed to
bluez4.c to make it easier to add a BlueZ 5 support file.

11 years agohfp_ag_bluez5: Fix sanity check
Denis Kenzior [Thu, 21 Mar 2013 15:19:00 +0000 (10:19 -0500)]
hfp_ag_bluez5: Fix sanity check

We should be checking that modems != NULL, not modems->data.  This is
because the list can be empty and we would crash.

11 years agodun_gw_bluez5: Fix sanity check
Denis Kenzior [Thu, 21 Mar 2013 15:18:11 +0000 (10:18 -0500)]
dun_gw_bluez5: Fix sanity check

We should be checking that modems != NULL, not modems->data.  This is
because the list can be empty and we would crash.

11 years agodun_gw_bluez5: Fix copy-paste error
Denis Kenzior [Thu, 21 Mar 2013 15:15:16 +0000 (10:15 -0500)]
dun_gw_bluez5: Fix copy-paste error

11 years agodun_gw: Add BlueZ 5 version
Frédéric Danis [Tue, 12 Mar 2013 13:01:30 +0000 (14:01 +0100)]
dun_gw: Add BlueZ 5 version

This patch adds initial implementation of the D-Bus Profile1
interface and methods responsible for handling Bluetooth connections.

The DUN GW profile interface is registered as soon as a GPRS capable
modem is registered in oFono.

11 years agobluetooth: Rename DUN GW plugin
Frédéric Danis [Tue, 12 Mar 2013 13:01:29 +0000 (14:01 +0100)]
bluetooth: Rename DUN GW plugin

As BlueZ 5 introduced backwards incompatible API changes, and we want to
keep support for BlueZ 4 based DUN GW plugin for some time, we need to
separate DUN GW plugin which is based on BlueZ 4 from the one based on
BlueZ 5.

The dun_gw.c plugin is renamed to dun_gw_bluez4. This will make it easy
to add a DUN GW plugin for BlueZ 5.

11 years agodoc: Add Handsfree Audio Card "Connect" errors
Claudio Takahasi [Wed, 20 Mar 2013 23:03:04 +0000 (20:03 -0300)]
doc: Add Handsfree Audio Card "Connect" errors

11 years agoofono.conf: Punch hole for HandsfreeAudioAgent
Vinicius Costa Gomes [Wed, 20 Mar 2013 00:10:33 +0000 (21:10 -0300)]
ofono.conf: Punch hole for HandsfreeAudioAgent

11 years agohandsfree_audio: Call driver remove() on removal
Denis Kenzior [Mon, 18 Mar 2013 19:06:56 +0000 (14:06 -0500)]
handsfree_audio: Call driver remove() on removal

11 years agocore: Add bt_str2ba() to bluetooth.h
Claudio Takahasi [Tue, 12 Mar 2013 12:42:05 +0000 (09:42 -0300)]
core: Add bt_str2ba() to bluetooth.h

This patch adds a utility Bluetooth function to convert Bluetooth
address from string to bdaddr_t.