Commit Graph

10886 Commits

Author SHA1 Message Date
Mikel Astiz
4b51689226 sink: Add profile .connect and .disconnect
Add the connection and disconnection hooks to the a2dp_sink btd_profile.
2012-11-21 14:35:49 +02:00
Mikel Astiz
1f9efe3696 source: Add profile .connect and .disconnect
Add the connection and disconnection hooks to the a2dp_source
btd_profile.
2012-11-21 14:35:45 +02:00
Mikel Astiz
3a45f6e39f audio: Split A2DP into two btd_profile
Merging the three audio profiles (AVDTP, A2DP sink and A2DP source)
into one was convenient in the past was doesn't fit very well the new
btd_profile approach. The split is also more consistent with other
existing profiles.
2012-11-21 14:35:41 +02:00
Luiz Augusto von Dentz
4478da0cb3 core: Fix connection order of Device.Connect
We should with higher priority first.
2012-11-21 14:35:36 +02:00
Johan Hedberg
176aa9c4d5 neard: Be more consistent in error handling and variable naming 2012-11-21 14:34:11 +02:00
Frédéric Danis
24973ff51d neard: Set device class in device object
As soon as we have info related to a new device,
device object will be created if it does not exist yet.

Change check_device() to use this device object and
remove call to adapter_remove_device() in it.
2012-11-21 14:34:10 +02:00
Luiz Augusto von Dentz
7bbf66a300 audio: Remove another leftover of HFP code 2012-11-21 13:44:06 +02:00
Frédéric Danis
dc7be9cbbd doc: Add HFP design document 2012-11-21 13:05:17 +02:00
Szymon Janc
eaef3c7791 gdbus: Remove not needed NULL pointer checks
g_strdup returns NULL if argument passed is NULL and there is no need
to double check that.
2012-11-21 12:35:08 +02:00
Marcel Holtmann
f15478ec97 monitor: Handle attribute lists for SDP records 2012-11-21 07:14:06 +01:00
Marcel Holtmann
3beb0c5c08 monitor: Track SDP continuation for attribute lists 2012-11-21 05:35:27 +01:00
Marcel Holtmann
a9953817d3 monitor: Handle UUID-32 and UUID-128 values 2012-11-20 18:01:01 +01:00
Marcel Holtmann
6986e5aa1f monitor: Decode SDP element data structures 2012-11-20 16:12:51 +01:00
Marcel Holtmann
50e9f0dcbb monitor: Add basic attribute UUID decoding 2012-11-20 16:12:51 +01:00
Marcel Holtmann
ce06826bd7 build: Remove stupid -I directives 2012-11-20 16:12:51 +01:00
Bart Westgeest
f8b977a776 sdp: Upgrade datatype SEQ8 to SEQ16 when data size is greater than 256
Fixes a bug where the complete sequence data is written, but the size
is truncated to one byte.
2012-11-20 14:53:21 +02:00
Bart Westgeest
06c25421af sdp: Limit side effects of sdp_get_data_type and sdp_get_data_size
Remove modification of buf->buf_size in 'get' functions. Data is
still indirectly modified due to recursive nature of code.

Renamed sdp_get_data_type to sdp_get_data_type_size.
2012-11-20 14:52:34 +02:00
Bart Westgeest
74116be7b8 sdp: Inlined single use of function sdp_set_data_type
Inlining single use of sdp_set_data_type to improve code readability,
since the function was doing more than just setting the data type.
2012-11-20 14:51:16 +02:00
Alexander Holler
d557e0d956 hid2hci: change subsystem in udev rule from usb to usb*
With kernel 3.6 (commit 7e97243c2080ecae7129e83635227fdebd4feef6) the
class for some devices (e.g. dongles from Logitech) were changed from
usb to usbmisc. As consequence the udev rule for hid2hci didn't work
anymore with kernels >= 3.6.

Changing the subsystem from "usb" to "usb*" matches both "usb" and
"usbmisc" and works with all kernels.
2012-11-20 14:22:16 +02:00
Johan Hedberg
34492abc80 core: Fix freeing pending profile messages in device_free 2012-11-20 14:16:13 +02:00
Johan Hedberg
205901529c core: Implement Device.DisconnectProfile method 2012-11-20 14:16:13 +02:00
Johan Hedberg
baf7e843a2 core: Add external profile disconnection support 2012-11-20 14:16:13 +02:00
Johan Hedberg
80efa0ed85 test: Add RequestDisconnection support to test-profile 2012-11-20 14:16:13 +02:00
Luiz Augusto von Dentz
c42078d292 audio: Remove leftover of HFP profile 2012-11-20 13:58:13 +02:00
Mikel Astiz
6086d9c742 sink: Expose internal connection API
Separate the D-Bus code from the internal connection handling code,
exposing an internal API in case some internal codepath/plugin is
interested in using it.
2012-11-20 13:44:27 +02:00
Mikel Astiz
6b2faaa185 source: Expose internal connection API
Separate the D-Bus code from the internal connection handling code,
exposing an internal API in case some internal codepath/plugin is
interested in using it.
2012-11-20 13:44:27 +02:00
Mikel Astiz
0b242d9873 source: Add missing code in source_disconnect()
Use the implementation in sink_disconnect() as a template to implement
the missing code in source_disconnect(). Both functions should be
equivalent.
2012-11-20 13:44:27 +02:00
Mikel Astiz
42ab843da5 sink: Generalize disconnection function
Extend the function for a more general usage other than full device
disconnection. Besides, return error code instead of a boolean.
2012-11-20 13:44:27 +02:00
Mikel Astiz
ec34a253d2 audio: Trivial function renames
Rename functions to be consistent with the rest of the code.
2012-11-20 13:44:26 +02:00
Johan Hedberg
89949e2e58 gaptest: Update to use D-Bus properties 2012-11-20 13:10:52 +02:00
Johan Hedberg
5be288d546 network: Add missing local_uuid values 2012-11-20 13:04:52 +02:00
Johan Hedberg
87bb49d995 input: Add missing local_uuid entry 2012-11-20 13:02:05 +02:00
Szymon Janc
0b681200d3 neard: Append hash/randomizer in EIR only if remote provided it
Read local OOB data for RequestOOB reply only if remote also provided
hash and randomizer in EIR. This will allow for faster reply when only
discovery is done OOB. It is also required to pass NFC handover test
related to Bluetooth just-works pairing.
2012-11-20 12:24:37 +02:00
Szymon Janc
da68aef922 neard: Add support for nokia.com:bt type
This adds support for parsing nokia.com:bt type supported by some Nokia
NFC enabled devices. This is not fully documented Nokia extension so
to keep implementation sane and simple only PushOOB method suports
this type so only static handover is possible.
2012-11-20 12:23:56 +02:00
Szymon Janc
d823bba949 neard: Move device object checking into separate helper
This will also be used by 'nokia.com:bt' handler.
2012-11-20 12:22:25 +02:00
Szymon Janc
8d7bf14da2 neard: Use ENONET error when adapter is not enabled
This results in returning error 'Disabled' instead of 'No such Device'.
Will allow neard to properly set power state of Bluetooth carrier.
2012-11-20 12:22:17 +02:00
Frédéric Dalleau
3fd3d5fbcc btiotest: Enable deferred setup for sco sockets 2012-11-20 12:21:24 +02:00
Frédéric Dalleau
0658a51f51 scotest: Add deferred setup option 2012-11-20 12:19:41 +02:00
Luiz Augusto von Dentz
0429e416f1 audio: Auto connect AVRCP in case of A2DP source is connected
This enables the same logic used for A2DP sink, so it attempt to
connect AVRCP if remote device support it.

Note this is necessary for some devices e.g. WP7 that don't connect
even when being the initiator because it is not mandatory for target
to do so even though it is recommended to avoid collisions while trying
to estabilish the connection.
2012-11-20 11:20:58 +02:00
Johan Hedberg
2e82b4bc2f test: Add simple HFP test script 2012-11-19 20:53:58 +02:00
Szymon Janc
7eb0eeab68 device: Fix minor whitespace issues 2012-11-19 20:32:14 +02:00
Szymon Janc
c189fddf7c device: Remove not really used auto_id member from btd_device
auto_id is not used anymore as LE device connect is now done by
adapter autoconnect list.
2012-11-19 20:32:10 +02:00
Szymon Janc
ea201ef57a adapter: Minor whitespace fix in btd_adapter_set_class
Indent with tab not spaces.
2012-11-19 20:32:04 +02:00
Szymon Janc
f474f48d8b adapter: Remove not needed variable from btd_adapter_start
address is no longer used and can be removed.
2012-11-19 20:32:00 +02:00
Szymon Janc
8e779994c7 adapter: Remove not needed variable from btd_adapter_get_mode
address is no longer used and can be removed.
2012-11-19 20:31:51 +02:00
Johan Hedberg
6adb76f05e core: Fix checking profiles with no local_uuid 2012-11-18 23:16:28 +02:00
Marcel Holtmann
fcab4dff5e monitor: Decode a few Attribute PDUs 2012-11-17 18:43:28 +09:00
Johan Hedberg
4e885595ae core: Fix SDP registration when staring server sockets fails 2012-11-17 11:41:06 +02:00
Johan Hedberg
8b06b2eaa3 core: Add support for generic L2CAP & RFCOMM profiles 2012-11-17 06:54:37 +02:00
Johan Hedberg
d4194db7af core: Fix external profile remote UUID setting 2012-11-17 06:54:37 +02:00