Commit Graph

9401 Commits

Author SHA1 Message Date
Marcel Holtmann
720e3a5116 monitor: Add skeleton for new monitoring tool 2012-02-20 16:11:26 +01:00
Marcel Holtmann
3bb5375bf5 tracer: Remove wrong attempt in building a HCI mointor in userspace 2012-02-20 16:03:42 +01:00
Johan Hedberg
7849fbbcc8 mgmtops: Fix pairable setting when powering down adapter 2012-02-20 14:44:09 +02:00
Johan Hedberg
5876b5407c btmgmt: Add version command 2012-02-20 14:11:06 +02:00
Johan Hedberg
56a7c39040 mgmtops: Fail if read_version fails
If the mgmt_read_version command fails or indicates a too old version we
should just abort since mgmt will in this case be mostly non-functional.
2012-02-20 01:17:07 +02:00
Johan Hedberg
b6490e9ee5 btmgmt: Add block & unblock commands 2012-02-19 13:53:59 +02:00
Johan Hedberg
aba4963982 core: Fix block/unblock events for non-exitent devices 2012-02-19 13:53:36 +02:00
Johan Hedberg
71e8b70208 mgmt: Move status return paramters into the cmd_complete header 2012-02-18 14:44:08 +02:00
Johan Hedberg
b142a9eaed mgmt: Swap cmd_status parameters to match API 2012-02-18 14:11:22 +02:00
Luiz Augusto von Dentz
1a50bbb4ea audio: Fix signature of MediaTransport.Acquire method
Acquire returns the input and output MTUs in addition to the file
descriptor, but the signature doesn't indicate that.
2012-02-17 16:42:28 +02:00
Marcel Holtmann
be2f0f4024 mgmt-api: Add comments if command status or command complete is returned 2012-02-17 15:31:48 +01:00
Johan Hedberg
aea82119df mgmt-api: Reorder cmd_status parameters
It makes more sense for the opcode to come before the status (since it
is part of the context).
2012-02-17 16:02:40 +02:00
Johan Hedberg
a52fa7b47b mgmt-api: Fix symmetry of (Un)Block command/reply parameters 2012-02-17 16:02:40 +02:00
Johan Hedberg
c1a9aa4aa2 mgmt-api: Fix symmetry of OOB command/reply parameters 2012-02-17 16:02:40 +02:00
Johan Hedberg
e1a5e4c819 mgmt-api: Clarify unpair_device disconnect parameter 2012-02-17 16:02:40 +02:00
Johan Hedberg
7f8ca9ed96 mgmt-api: Fix PIN Code command & reponse parameters 2012-02-17 16:02:40 +02:00
Johan Hedberg
c3e200de65 mgmt-api: Add status parameter to command complete event
Since this is needed by almost all command responses it makes more sense
to just have it part of the command complete event.
2012-02-17 16:02:40 +02:00
Johan Hedberg
497a40796b mgmt-api: Add address_type to start_discovery response 2012-02-17 16:02:40 +02:00
Johan Hedberg
247e54820a mgmt-api: Remove bogus old_key_type parameter 2012-02-17 16:02:40 +02:00
Johan Hedberg
dd84242d27 mgmt: Update implementation to match latest API
This patch adds an address type parameter to all places where the latest
API expects there to be one.
2012-02-17 14:30:31 +02:00
Johan Hedberg
7461fb98e3 mgmt-api: Add Address_Type to all messages with an Address
Strictly speaking the address type isn't needed in all messages (e.g.
those specific to BR/EDR or pre-2.1) but for consistency it's cleaner to
have it everywhere. The only exception is the read_controller_info reply
where it really doesn't make sense to have it.
2012-02-17 13:42:46 +02:00
Johan Hedberg
d578383ada mgmt-api: Fix typo with wrong capitalization 2012-02-17 13:42:46 +02:00
Johan Hedberg
ae12116e86 btmgmt: Add support for Set SSP command 2012-02-17 01:02:39 +02:00
Johan Hedberg
fc8436bc59 btmgmt: Add support for Set Link Security command 2012-02-16 23:55:50 +02:00
Anderson Lizardo
2898d58bfc thermometer: Fix re-enabling notification/indication on reconnection
If a result callback is not specified for gatt_write_char() it is
assumed that Write Command will be used. This is not valid for
Characteristic Descriptors, which only support Write Request.
2012-02-16 15:11:56 +02:00
Anderson Lizardo
dfa888e54f thermometer: Fix handling of missing Temperature Type
According to HTS 1.0 (Table 3.1, and Sections 3.1.1.4 and 3.2), the
Temperature Type Characteristic is optional. The only restriction is
that it shall not be present if the Temperature Type is non-static, for
which case the "Temperature Type" field shall be present on the
Temperature Measurement Characteristic value.

Given there is no default value specified when the Temperature Type is
static and unknown, the "Type" entry for MeasurementReceived() on the
Thermometer API was made optional.
2012-02-16 15:11:50 +02:00
Bruna Moreira
63dcb5cdff thermometer: Fix device driver probe
The probe() function for GATT profiles should be transport agnostic.
There is a btd_device_get_primaries() method which can be used to return
a list of discovered GATT Primary Services, and it works for BR/EDR and
LE. It is already used for Proximity, for instance.

device_services_from_record() is BR/EDR specific and should not be used
by GATT profile code.

It also fixes a memory leak, given device_services_from_record() returns
a heap allocated GSList.
2012-02-16 15:11:29 +02:00
Anderson Lizardo
1f38c67bec device: Fix memory leak during GATT service update
GATT service updates are not supported yet. This patch avoids a memory
leak and GATT service storage corruption due to trying to register GATT
services twice.

After adding support for Services Changed characteristic notification
(which is mandatory for GATT clients), this check can be removed.
2012-02-16 15:09:12 +02:00
Anderson Lizardo
7992d0ac0b device: Fix invalid D-Bus calls during Reverse GATT Discovery
There is no D-Bus client active during Reverse GATT Discovery, therefore
BlueZ should not send any D-Bus replies. This fixes errors reported by
D-Bus internal checks:

process 453: arguments to dbus_message_new_method_return() were
incorrect, assertion "method_call != NULL" failed in file dbus-message.c
line 1111.
2012-02-16 15:08:59 +02:00
Anderson Lizardo
27c076bbc9 device: Fix invalid memory read during GATT discovery
device->browse should be set to NULL before calling
browse_request_free(), otherwise it points to freed memory.
2012-02-16 15:08:39 +02:00
Anderson Lizardo
d2c09255ef device: Fix NULL pointer dereference during GATT service discovery
If reverse service discovery for GATT is triggered,
device_browse_primary() is called with a NULL "conn" parameter. This fix
is based on similar code found in device_browse_sdp().

This fixes errors like:

process 871: arguments to dbus_connection_ref() were incorrect,
assertion "connection != NULL" failed in file dbus-connection.c line
2549.
This is normally a bug in some application using the D-Bus library.
process 871: arguments to dbus_connection_get_object_path_data() were
incorrect, assertion "connection != NULL" failed in file
dbus-connection.c line 5639.
This is normally a bug in some application using the D-Bus library.
process 871: arguments to dbus_connection_register_object_path() were
incorrect, assertion "connection != NULL" failed in file
dbus-connection.c line 5461.
This is normally a bug in some application using the D-Bus library.
2012-02-16 15:08:30 +02:00
Johan Hedberg
793b009033 btmgmt: Update opcode and event tables 2012-02-15 14:01:41 +02:00
Johan Hedberg
15558cba9d btmgmt: Add read_commands support 2012-02-15 13:52:53 +02:00
Johan Hedberg
9291fc60cb test-discovery: Make output a bit more readable
Add an empty line between device found entries to make the output more
readable.
2012-02-15 13:17:01 +02:00
Anderson Lizardo
92f9870934 mgmtops: Improve event size mismatch messages
This makes them consistent, and updates the function names.
2012-02-14 14:51:36 +02:00
Vinicius Costa Gomes
80e106f409 adapter: Fix possible invalid memory access 2012-02-14 14:45:15 +02:00
Vinicius Costa Gomes
a7be2034ca hciconfig: Fix compiler warnings related to unaligned memory access 2012-02-14 14:39:15 +02:00
Vinicius Costa Gomes
4725ddffe2 hciconfig: Fix using old-style initializers 2012-02-14 14:39:05 +02:00
Vinicius Costa Gomes
36ca1992d4 mgmtops: Fix doing a useless memset()
The buffers were already allocated using g_try_malloc0().
2012-02-14 14:32:34 +02:00
Vinicius Costa Gomes
8eb00c20f0 network: Fix clang compiler warnings related to unaligned memory access 2012-02-14 14:32:06 +02:00
Vinicius Costa Gomes
eb7a1dc3f7 audio: Fix clang compiler warnings regarding implicit enum conversion
It was expected that source_get_state() returned a source_state_t, and
that sink_get_state() returned a sink_state_t.
2012-02-14 14:30:20 +02:00
Vinicius Costa Gomes
24650bad2d dun: Fix using old-style initializers 2012-02-14 14:29:37 +02:00
Vinicius Costa Gomes
42dc0063e4 tools: Fix using old-style initializers 2012-02-14 14:28:58 +02:00
Vinicius Costa Gomes
f7a79ac1fc lib: Fix using old-style initializers 2012-02-14 14:27:46 +02:00
Claudio Takahasi
656ca98492 attrib-server: Fix invalid IO channel unref
This patch fixes an invalid read for incoming connections when
the remote initiates the link disconnection.
2012-02-14 14:12:51 +02:00
Claudio Takahasi
9e6a11719f GAttrib: Remove unused function
GAttrib disconnection tracking is being moved to device.c
2012-02-14 14:11:54 +02:00
Claudio Takahasi
0ed2a8c7fa device: Add common ATT connection cleanup function 2012-02-14 14:11:34 +02:00
Claudio Takahasi
370fe201fd device: Remove GAttrib disconnect callback
This patch replaces the usage of GAttrib disconnection callback by
GIOChannel watch to track ATT channel disconnection. Connection
management is being centralized in device to allow multi-profile
implementations.
2012-02-14 14:11:30 +02:00
Claudio Takahasi
4e751d06bc attrib-server: Remove GAttrib disconnect callback
This patch replaces the usage of GAttrib disconnection callback by
GIOChannel watch to track ATTIO channel disconnection aiming to achieve
less dependencies between attrib server, device and GAttrib.
2012-02-14 14:11:20 +02:00
Vinicius Costa Gomes
9dde2d5703 device: Fix trying to connect if already connected 2012-02-14 14:08:57 +02:00