Commit Graph

8154 Commits

Author SHA1 Message Date
Claudio Takahasi
aaa550fe51 Update Device Appearance Characteristic based on device class
Appearance Characteristic value is still under discussion. Temporary
solution which maps directly the device class of device(major and minor)
into Device Characteristic value without shifting the two less significant
bits reserved to Format Type. The second byte of the device class
contains the major class in the 5 less significant bits.
2011-02-17 15:35:54 -03:00
Claudio Takahasi
98ea92d146 Add static Device Appearance Characteristic
Declaration and definition of the Device Appearance Characteristic
defined in the GAP Characteristics for Low Energy section: Bluetooth
Core Specification, Volume 3, Part C, section 12.2.
2011-02-17 15:35:52 -03:00
Dmitriy Paliy
4c07eae01d Fix no SEP if corresponding interface is disabled
A2DP sink endpoint shall not be created if A2DP sink interface is disabled.
Same holds for A2DP source endpoint and A2DP source interface.

Such fixes bluetoothd crash when SDP record is registered and remote
device tries to connect and stream to A2DP sink which is not initialized.
Dereferencing of NULL happens in source_new_stream since device->source
was not created.
2011-02-17 15:34:26 -03:00
Johan Hedberg
4d21e85715 Move SSP auto-accept handling completely inside hciops
There's no need to expose the auto-accept case to the core daemon so
move it to hciops. For the management interface this will all be handled
on the kernel side.
2011-02-17 11:31:35 -03:00
Brian Gix
dba40c880f Fix Min MTU to reflect values for both L2CAP & LE 2011-02-16 18:21:45 -03:00
Johan Hedberg
50102905d9 mgmt: Add User Confirmation request support 2011-02-16 22:47:25 +02:00
Claudio Takahasi
0439aea808 Fix wrong header include on interactive gatttool
This wrong include is triggering compiler warning: implicit declaration
of function 'strdup'.
2011-02-16 16:05:14 -03:00
Luiz Augusto von Dentz
9d3af794b7 telephony-maemo6: fix not cleaning up network status on exit
This may cause indicators to not be reported correctly when adapter is
reset.
2011-02-16 16:04:16 -03:00
Luiz Augusto von Dentz
76fe239483 Fix creating device object on disconnect complete event
There is no need to create a new object if disconnected and the device is
not permanent/paired.
2011-02-16 12:02:47 -03:00
Luiz Augusto von Dentz
ae7752c0b9 telephony-maemo6: fix not cleaning up active calls list on exit
This can cause problem if the adapter is reset in the middle of a call
the indicators won't be update properly.
2011-02-16 12:00:57 -03:00
Johan Hedberg
073c798c8f Remove unused scan_enable code
Several functions aren't needed anymore since we don't do a
HCI_Write_Scan_Enable(NO_SCAN) upon adapter power off.
2011-02-15 19:46:02 +02:00
Sheldon Demario
2c8df748ac Add connect/disconnect options on interactive mode of gatttool 2011-02-15 14:19:03 -03:00
Sheldon Demario
a523620a36 Add an initial interactive mode to gatttool
Mode required to allow better GATT procedures control. Some scenarios
require sequential commands without disconnection and delay between
operations. It is also desirable to change some connection parameters
of an active connection.
2011-02-15 14:17:37 -03:00
Sheldon Demario
dcfc9adb5e Include check to readline lib on acinlude.m4 2011-02-15 14:17:22 -03:00
Brian Gix
394a93e5a9 Fix definition of ATT_UUID per BT Assigned Numbers 2011-02-15 14:08:22 -03:00
Bruna Moreira
48f7473068 Add Write Request operation in gatttool
Add option and callbacks for Write Request operation in gatttool.
2011-02-15 11:48:05 -03:00
Bruna Moreira
ec141a423b Add encode/decode for write response
The encode/decode functions for Write Response operations were created
to keep consistency with the rest of GATT API.
2011-02-15 11:47:40 -03:00
Gustavo F. Padovan
32d7daf120 src: fix typo 2011-02-15 11:25:46 -03:00
Anderson Lizardo
2ddc60319f Fix parsing of "Flags" AD type
If an advertising report did not contain a "Flags" AD Type (e.g. a Scan
response), the previous flags value was mistakenly set to 0x00. This fix
makes sure dev->flags is only updated for valid values.
2011-02-15 11:24:22 -03:00
Luiz Augusto von Dentz
14fe244683 Fix not updating call indicator when parsing call info reply
This can happen if there is a call with a status different than idle when
adaptor is turned on the call indicators weren't updated.
2011-02-15 11:13:39 -03:00
Luiz Augusto von Dentz
30270492eb Fix not resetting indicators whenever the driver is initialized
This may cause invalid values to be reported since the status of call can
change during the time adaptor was off.
2011-02-15 11:13:09 -03:00
Luiz Augusto von Dentz
49d470534b Fix not stopping name resolving when discovery is suspended
During device creation if discovery is active we suspend it to avoid
interfering with pairing, but although it attempt to cancel name request
there could be one already completed which would cause next name on the
list to be requested.
2011-02-15 11:09:55 -03:00
Marcel Holtmann
39551a69e9 Release 4.88 2011-02-13 18:02:43 -08:00
Marcel Holtmann
1bbbb1331c Update library version 2011-02-13 18:02:30 -08:00
Marcel Holtmann
cc04c6a2f7 audio: Remove workaround for compiler warnings 2011-02-13 17:51:45 -08:00
Andrei Emeltchenko
61b3ce7194 hcitool: Add bdaddr type option to lecc 2011-02-11 14:07:22 -08:00
Claudio Takahasi
06651f3f51 Add const modifier to avoid wrong usage of byte order functions 2011-02-11 14:04:34 -08:00
Claudio Takahasi
b67bf675e3 Fix wrong parameter order for memcpy in btoh128 function 2011-02-11 14:03:57 -08:00
Andrei Emeltchenko
2cc99a5ea6 Bluetooth: hcitool: add option for LE_Scan_Type parameter
The LE_Scan_Type parameter controls the type of scan to perform.
2011-02-11 13:41:28 -08:00
Daniel Wagner
ef4ee19895 hfp: gateway_suspend_stream should trigger a state change
When gateway_suspend_stream is called it should change the
gateway state machine from PLAYING to CONNECTED.
2011-02-11 11:48:45 -08:00
Johan Hedberg
cfe9a54a09 Add basic debug prints to attribute server 2011-02-10 15:58:54 -08:00
Johan Hedberg
988d196313 Fix coding style issues in attribute server code 2011-02-10 15:56:48 -08:00
Gustavo F. Padovan
cd09d807d3 Use a valid PSM value in l2test 2011-02-09 14:03:57 -08:00
Dmitriy Paliy
f05cb9d298 Fix bluetoothd exit on badly formated AT+VTS
This fixes bluetoothd exit when AT+VTS command is badly formatted,
e.g. as AT+VTS\xfe\xfe[...]=1

Verification it done for the numeric value to be larger than 0x23,
that corresponds to the hash '#', and to be lower than 0x44, that
corresponds to 'D', such that the tone is in {0-9, *, #, A, B, C, D}.
2011-02-09 14:00:55 -08:00
Elvis Pfützenreuter
bdc943dd18 Fix small typo 2011-02-09 13:57:58 -08:00
Andre Dieb Martins
2fab731d89 Fix GATT listen mode updating
Update gatt's listen-mode flag whenever connect_cb() is called again.
2011-02-08 15:07:23 -08:00
Johan Hedberg
1c93c6fa88 mgmt: Add mgmt_pair_device command
This patch adds a new management command for triggering a dedicated
bonding procedure to a remote device.
2011-02-08 23:15:23 +02:00
Johan Hedberg
de96fcd899 Reuse same SEP when reconfiguring A2DP streams
It makes sense to try to reuse the same SEP whenever possible when
reconfiguring streams. In fact this is even necessary with a particular
BMW car kit which doesn't allow a new stream to be set up to any other
SEP.
2011-02-08 11:04:39 -08:00
Johan Hedberg
f9b170951f Fix HID channel reference count issues
This patch cleans up the reference counting of the HID control and
interrupt channels. Particularly the connection failure cases weren't
properly handled previously.

Based on the original report and patch from Jaikumar Ganesh.
2011-02-07 15:27:03 -08:00
Ankush Bansal
c7acda4dd5 Change required GLib version in acinclude.m4
The g_strcmp0 function requires at least 2.16.
2011-02-04 06:59:02 +02:00
Anderson Lizardo
5f7c387957 Fix refcount in btd_adapter_any_request_path()
adapter_any_refcount was not being incremented when a pointer to
allocated buffer was returned.
2011-02-04 06:58:02 +02:00
Gustavo F. Padovan
12eac6993b rename: tools/main.c to tools/rfcomm.c 2011-02-04 06:55:46 +02:00
Bruna Moreira
240fcdb006 Fix invalid read after list concatenation
g_slist_concat uses the items from second list directly so they should
not be freed.
2011-02-04 06:55:02 +02:00
Elvis Pfützenreuter
05133a40fd Fix parameter type in att_put_u32 2011-02-04 06:53:35 +02:00
Luiz Augusto von Dentz
1a004cf882 Fix crash while parsering of endpoint properties
When parsing endpoint properties application my not have set some of the
mandatory properties, also the size of capability is now initialized with
0 so if the codec doesn't have any capabilities (e.g. pcm) the variable
won't be used uninitialized.
2011-02-02 13:56:12 +02:00
Dmitriy Paliy
ed8bfe8b81 Code cleanup: unnesessary line removed in avdtp.c 2011-02-02 12:10:27 +02:00
Dmitriy Paliy
c9ae4cd416 Fix possible crash on AVDTP Suspend req timeout
This fixes possible bluetoothd crash on AVDTP Suspend request timeout
if A2DP client was destroyed after the request was sent but before its
timeout handled.

If Suspend request times out due to any reason, then references to A2DP
session and stream are cleared in unix_client. Therefore, callback cannot
be removed when unix_client is destroyed (e.g. on incomming call).

After that, consequent Abort request is sent. If the request times out
as well, than stream_state_changed callback is invoked to change AVDTP
state to Idle, which causes crash due to NULL dereferencing.

Therefore, it is important to keep references to AVDTP session and stream
in unix_client until it is destroyed.
2011-02-02 12:10:09 +02:00
Johan Hedberg
71ba00415b Clean up hciops dev_info init code a little bit 2011-02-02 01:21:52 +02:00
Luiz Augusto von Dentz
dc2860e16a Fix stopping inquiry before adapter object is initialized
This can cause errors on command complete since the adapter object could
not be found to set its mode.
2011-02-02 01:07:50 +02:00
Luiz Augusto von Dentz
149f5d0b49 Fix sending HCIDEVUP when adapter is already up
There is no need for HCIDEVUP/fork in such cases it will just consume
more resources for no reason.

To fix this HCI_DEV_REG is no longer generate for adapter already up
instead init_device is called directly which simplify the code path.
2011-02-02 01:06:44 +02:00