Commit Graph

14657 Commits

Author SHA1 Message Date
Jefferson Delfes
9b90cc2eed attrib: Simplify boolean tests
Remove unnecessary TRUE/FALSE in boolean tests.
2013-04-24 16:59:14 +03:00
Johan Hedberg
2c418e9898 tools/mgmt-tester: Fix expect_len assignment to use right variable 2013-04-24 12:58:21 +03:00
Johan Hedberg
e4056cf468 tools/mgmt-tester: Add valid test case for LE-only discovery 2013-04-24 12:57:34 +03:00
Johan Hedberg
59724c1ec1 tools/mgmt-tester: Update LE-only test case pre-conditions
Starting with Linux 3.10 single mode controllers will always have the LE
setting bit enabled in the current_settings mask.
2013-04-24 12:48:30 +03:00
Luiz Augusto von Dentz
95213d3e6c tools: Fix avrcp_media_element_item_dump to print elements properly 2013-04-24 11:20:05 +03:00
Johan Hedberg
df6680eee6 core: Delay Paired property until SDP completes
To make it easier for clients to know when SDP has completed, and to
make the property consistent with the timing of the Device1.Pair()
method return it makes sense to delay the "Paired" property change until
SDP has completed.
2013-04-23 20:26:21 +03:00
Alex Deymo
5cbdfbd83d input: Automatically attempt a reconnect when required.
The HID 1.1 spec requires a host to attempt a reconnection when a
HID device goes out of range and comes back. There is test (see
TP/HCE/BV-04-I [Host Initiated Re-connection]) to ensure that the
host initiates the connection when that happens.

This patch adds a reconnection timer for HID devices trying to
reconnect every 30s for a maximum of 3 minutes after the connection
to a HID device with a ReconnectMode of "host" or "any" is closed.
2013-04-23 10:39:29 +03:00
Alex Deymo
ae4186cea7 input: Fix memory leak for hidp_connadd_req.
If the struct input_device is destroyed while a hidp_connad_req
is pending, the input_device will be destroyed leaking the associated
memory.

==30790== 492 (168 direct, 324 indirect) bytes in 1 blocks are definitely lost in loss record 199 of 216
==30790==    at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30790==    by 0x4E7FAE0: g_malloc0 (gmem.c:189)
==30790==    by 0x4378E4: hidp_add_connection (device.c:365)
==30790==    by 0x438055: input_device_connected (device.c:525)
==30790==    by 0x4380DA: interrupt_connect_cb (device.c:548)
==30790==    by 0x443508: connect_cb (btio.c:230)
==30790==    by 0x4E79D52: g_main_context_dispatch (gmain.c:2539)
==30790==    by 0x4E7A09F: g_main_context_iterate.isra.23 (gmain.c:3146)
==30790==    by 0x4E7A499: g_main_loop_run (gmain.c:3340)
==30790==    by 0x448CCC: main (main.c:583)
2013-04-23 10:39:16 +03:00
Alex Deymo
65add82a0a input: Convert gboolean to bool
Remove some usage of gboolean in favor of bool.
2013-04-23 10:39:08 +03:00
Alex Deymo
fb97136ae1 input: Implement the new ReconnectMode Input1 property.
The "Connectability" of a HID device, as defined by the HID spec,
governs the way the host may and should connect to a HID device or
expect a connection from it. In the comon case of mice and keyboards
the HIDNormallyConnectable is FALSE and HIDReconnectInitiate is TRUE,
since those devices only attempt a connection to the host when they
have some data to transfer. A connection attempt initiated from the
host after the device drops the connection (while still paired) will
result in a Page timeout.

This patch exposes a new property called "ReconnectMode" combining the
those two SDP attributes as shown in the Connectability section of the
HID spec (see section 5.4.2). The property can have one of the following
four values: "None", "Device", "Host", "Any", and is derived from the
SDP cached value on device creation even if the device is off.
2013-04-23 10:37:26 +03:00
Alex Deymo
be37902b7d input: Documentation for new Input1 interface
Adds documentation for a new Input1 interface explaining a new
"ReconnectMode" property that exposes the Connectability mode of
a HID device.
2013-04-23 10:37:15 +03:00
Luiz Augusto von Dentz
6ebbf94bcc tools: Fix AVRCP parsing of GetFolderItems for folders and items
Length of name is 2 bytes not 1
2013-04-19 21:58:48 +03:00
Johan Hedberg
1e0aa26199 emulator: Remove extended features from LE-only controllers 2013-04-19 16:51:07 +03:00
Johan Hedberg
d311de1295 emulator: Move Event Mask Page 2 from BR/EDR to BR/EDR/LE 2013-04-19 16:50:21 +03:00
Johan Hedberg
449ab3a1ad emulator: Add proper supported commands response values 2013-04-19 16:13:48 +03:00
Johan Hedberg
d4405c37b5 emulator: Add missing command support checks 2013-04-19 16:02:55 +03:00
Johan Hedberg
711b7e3008 emulator: Add basic HCI_Set_Event_Mask_Page_2 support 2013-04-19 15:55:20 +03:00
Johan Hedberg
4c4726d1d5 emulator: Add sync train parameter reading support 2013-04-18 17:57:38 +03:00
Johan Hedberg
611d1d2ca6 emulator: Fix extended features invalid params response 2013-04-18 17:57:38 +03:00
Johan Hedberg
b6e28da5ff monitor: Fix missing byte order conversions 2013-04-18 17:21:41 +03:00
Johan Hedberg
c073bc5f8d monitor: Add support for decoding read sync train params response 2013-04-18 17:01:55 +03:00
Luiz Augusto von Dentz
8140306965 obexd: Fix make distcheck
../obexd/client/map.c:43:17: fatal error: sdp.h: No such file or directory
2013-04-17 17:46:55 +03:00
Luiz Augusto von Dentz
8b8141305f tools: Fix mpris-player not forwarding method calls properly
This fixes not sending methods calls to players, it now copies the
contents of the original message into the copy instead of relying on
dbus_message_copy and send the reply back.
2013-04-17 17:35:44 +03:00
Johan Hedberg
ddb4dbd0ea emulator: Add support for local features page 2 2013-04-17 14:56:35 +03:00
Luiz Augusto von Dentz
937a941fa2 sdptool: Use macro to calculate array size 2013-04-17 13:43:45 +03:00
Luiz Augusto von Dentz
5062b14467 tools: Add MAS profile attributes 2013-04-17 13:43:45 +03:00
Luiz Augusto von Dentz
943d6daf73 test: Fix opp-client not printing progress
This avoid KeyError expection and fixes print usage.
2013-04-17 13:43:45 +03:00
Christian Fetzer
4ee201a588 obexd: Read service attributes when instantiating MAP session
Parse the service attributes mas_instance_id and supported_message_types
from the transport's service attributes as soon as a connection is
established.
2013-04-17 13:43:45 +03:00
Christian Fetzer
41d61ddc98 lib: Add attributes MASInstanceID and SupportedMessageTypes 2013-04-17 13:43:45 +03:00
Christian Fetzer
f4bf087572 obexd: Add obc_session_get_attribute to session
This adds a obc_session_get_attribute function to the client session.
The function allows querying the session specific service attributes.
2013-04-17 13:43:45 +03:00
Christian Fetzer
cb59ec7853 obexd: Add bluetooth_getattribute to Bluetooth transport
This function makes the cached SDP attributes available for the profile
implementations.
2013-04-17 13:43:38 +03:00
Christian Fetzer
e0c744c9a8 obexd: Add getattribute to obc_transport
This adds a getattribute function pointer to obc_transport, which allows
transports to provide the session specific service attributes.
2013-04-17 13:31:05 +03:00
Christian Fetzer
e163a91514 obexd: Cache SDP record in bluetooth transport
This caches the SDP record of the active session in the Bluetooth
transport.
2013-04-17 13:31:05 +03:00
Alvaro Silva
1ed57cae60 gatttool: Use error message prefixes consistently
Replace rl_printf() calls with macros that add appropriate prefixes.
2013-04-17 11:23:58 +03:00
Eder Ruiz Maria
64868f234b gatttool: Show info message when no primary service is found 2013-04-17 11:23:50 +03:00
Eder Ruiz Maria
165803d4e0 gatttool: Use bluetoothctl strategy for unix signal handling
Now to exit from gatttool at interactive mode, user must use SIGTERM(15)
or press Ctrl+D. SIGINT(2) or Ctrl+C just flushes typed characters and
breaks line.
2013-04-17 11:23:39 +03:00
Eder Ruiz Maria
46b9b1345e gatttool: Use bluetoothctl strategy to handle standard input
Use GSource id returned by g_io_add_watch() instead of raw GIOChannel to
handle stdin and glib main loop.
2013-04-17 11:23:07 +03:00
Alvaro Silva
4fe7426176 gatttool: Remove connecting message from prompt
When trying to connect, the "connecting" message is not set as prompt
anymore. Instead, it is printed just like other status messages and the
prompt is kept, allowing the user to send commands while connection is
being established.
2013-04-17 11:22:55 +03:00
Alvaro Silva
e80e4bd1ec gatttool: Show connection state using color
When device is connected, the Bluetooth address is shown in blue color.
2013-04-17 11:22:44 +03:00
Eder Ruiz Maria
f952820eb6 gatttool: Use bluetoothctl behavior when pressing Enter on empty prompt 2013-04-17 11:22:34 +03:00
Eder Ruiz Maria
cf192c494f gatttool: Replace more usages of printf() with rl_printf()
rl_printf() works better with readline than plain printf(), specially on
asynchronous callbacks.
2013-04-17 11:22:25 +03:00
Eder Ruiz Maria
6a287262f0 gatttool: Fix issues with printf() and readline prompt
Use rl_printf() from bluetoothctl to consistently display messages. This
is specially important for asynchronous callbacks, where using printf()
may mess up the prompt created by readline.
2013-04-17 11:22:00 +03:00
Eder Ruiz Maria
3dacf2769d gatttool: Use GError to propage error messages to caller
Handle runtime errors outside gatt_connect(), using GError to propagate
error messages to caller.
2013-04-17 11:21:29 +03:00
Johan Hedberg
519fe630ef monitor: Remove bogus entries from event mask table
The event mask is 64 bits so any bit offsets greater than that do not
make sense.
2013-04-16 20:34:47 +03:00
João Paulo Rechi Vita
8f154c2e61 audio: Remove unused constants
Removes the never used constants AUDIO_SINK_INTERFACE and
AUDIO_SOURCE_INTERFACE which are defined to "org.bluez.AudioSink" and
"org.bluez.AudioSource", respectively.
2013-04-15 17:17:51 +03:00
João Paulo Rechi Vita
e0445712a3 audio: Remove unused function
Removes the never used function audio_device_is_active.
2013-04-15 17:17:51 +03:00
João Paulo Rechi Vita
7f200ffaca audio: Remove unused constant
Removes the never used constant AUDIO_INTERFACE which is defined to
"org.bluez.Audio".
2013-04-15 17:17:51 +03:00
Marcel Holtmann
4a9ce2ed68 Release 5.4 2013-04-10 22:50:12 -07:00
Marcel Holtmann
858283eafa build: Update library version 2013-04-10 22:24:32 -07:00
Marcel Holtmann
eb1f591c79 lib: Update list of company identifiers 2013-04-10 22:23:49 -07:00