OSDN Git Service

android-x86/external-bluetooth-bluez.git
12 years agoFix input pending connect handling
Chan-yeol Park [Mon, 17 Oct 2011 12:07:37 +0000 (21:07 +0900)]
Fix input pending connect handling

iconn->pending_connect needs to be freed after sending the error reply

12 years agohciops: fix adapter initialization when commands are missed
Luiz Augusto von Dentz [Mon, 17 Oct 2011 09:47:28 +0000 (12:47 +0300)]
hciops: fix adapter initialization when commands are missed

Sometimes after e.g, suspend we miss some initialization commands from
the kernel, even though we had a workaround for this it doesn't really
work as expected since the adapter must be up in order to resend.

To fix this problem the resend logic is moved after DEVUP.

12 years agoSimplify process_thermometer_char() logic
Johan Hedberg [Mon, 17 Oct 2011 08:25:25 +0000 (11:25 +0300)]
Simplify process_thermometer_char() logic

12 years agoFix thermometer Intermediate property changes
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:22 +0000 (17:29 +0200)]
Fix thermometer Intermediate property changes

Set Intermediate property if intermediate temperature characteristic is
supported

12 years agoRead measurement interval characteristic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:21 +0000 (17:29 +0200)]
Read measurement interval characteristic

12 years agoRead temperature type characteristic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:20 +0000 (17:29 +0200)]
Read temperature type characteristic

12 years agoGet all characteristics in thermometer service
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:19 +0000 (17:29 +0200)]
Get all characteristics in thermometer service

12 years agoAdd handler function to manage GATT indications
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:18 +0000 (17:29 +0200)]
Add handler function to manage GATT indications

12 years agoAdd functions to manage attio callbacks
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:17 +0000 (17:29 +0200)]
Add functions to manage attio callbacks

12 years agoUnregister Health Thermometer Interface
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:16 +0000 (17:29 +0200)]
Unregister Health Thermometer Interface

12 years agoRegister Health Thermometer Interface
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:15 +0000 (17:29 +0200)]
Register Health Thermometer Interface

12 years agoGet thermometer service range to load the driver.
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:14 +0000 (17:29 +0200)]
Get thermometer service range to load the driver.

12 years agohcitool: Fix EIR parsing
Johan Hedberg [Fri, 14 Oct 2011 11:23:05 +0000 (14:23 +0300)]
hcitool: Fix EIR parsing

There were missing buffer size checks and wrong assumptions about the
EIR data length (core spec 4.0 defines it to be max 31 bytes, so the
name can be max 29 bytes).

12 years agoFix leaks and buffer overflows in EIR parsing
Johan Hedberg [Fri, 14 Oct 2011 08:15:14 +0000 (11:15 +0300)]
Fix leaks and buffer overflows in EIR parsing

By calling g_utf8_validate and allocating eir->name inside the parsing
loop the code was exposing itself to buffer overflows and memory leaks.
This is because the check for incorrect length fields is only done after
exiting the loop (if (len > HCI_MAX_EIR_LENGTH)). By only setting a
pointer to the name and doing the processing after checking the length
validity both issues can be avoided.

12 years agoAdd support for parsing the remote name during LE Scan
Vinicius Costa Gomes [Thu, 13 Oct 2011 21:39:07 +0000 (18:39 -0300)]
Add support for parsing the remote name during LE Scan

12 years agoMake title always available in metadata
Lucas De Marchi [Thu, 13 Oct 2011 12:57:03 +0000 (09:57 -0300)]
Make title always available in metadata

12 years agoDon't overwrite metadata when changing track
Lucas De Marchi [Thu, 13 Oct 2011 12:57:02 +0000 (09:57 -0300)]
Don't overwrite metadata when changing track

If we use the same hash table to set the new metadata, we have 2
undesired behaviors:

1) New track may contain fields from previous track if it didn't set all
the fields
2) If we fail on parsing the signal, we will still change some of the
fields

12 years agoFix +CLCC in maemo6 during CSD_CALL_STATUS_COMING
Dmitriy Paliy [Thu, 13 Oct 2011 10:25:51 +0000 (13:25 +0300)]
Fix +CLCC in maemo6 during CSD_CALL_STATUS_COMING

This fixes the same issue as in 8a6119ea1c685fc61419ee444a5967596f524c1c
but for CSD_CALL_STATUS_COMING. Call status change sequence in csd is
IDLE to COMING, COMING to PROCEEDING, and PROCEEDING to WAITING.

Returned 'state of the call' value after CSD_CALL_STATUS_COMING, as well
as after CSD_CALL_STATUS_PROCEEDING, in +CLCC shall be 5 (waiting, MT
call) instead of 4 (incoming, MT call) in maemo6 telephony driver for the
second incoming call.

12 years agoFix crash on power off in maemo6 after sending DTMF
Dmitriy Paliy [Thu, 13 Oct 2011 10:02:38 +0000 (13:02 +0300)]
Fix crash on power off in maemo6 after sending DTMF

This fixes regression introduced in
b48e610314fb466035b198f594c5b6a68126fcf1. Crash happens when powering
off adapter after sending DTMF tone.

12 years agoImprove test/simple-player to allow user interaction
Lucas De Marchi [Wed, 12 Oct 2011 15:11:22 +0000 (12:11 -0300)]
Improve test/simple-player to allow user interaction

Allow user to trigger TrackChanged and PropertyChanged. Calls made by
remote side (coming from D-Bus) are printed to stderr while the ones to
interact with user go to stdout.

12 years agoRefactor to share code
Lucas De Marchi [Wed, 12 Oct 2011 15:11:21 +0000 (12:11 -0300)]
Refactor to share code

Refactor code when we are 'listing selected attributes' to share code
with 'listing all attributes'. This way we always keep the list of
attributes in a GList, and call player_get_media_attribute() in only one
place.

12 years agoAVRCP: Only return available metadata attributes
Lucas De Marchi [Wed, 12 Oct 2011 15:11:20 +0000 (12:11 -0300)]
AVRCP: Only return available metadata attributes

When remote side requests all available metadata (i.e. it gives number
attributes equals to 0) do not return zero-length strings for
unavailable items. The only exception is title, that must be always present.

12 years agoAVRCP: Check if len matches number of IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:19 +0000 (12:11 -0300)]
AVRCP: Check if len matches number of IDs

If number of attributes remote side provided is larger than the length
we read, we would read garbage from stack memory.

12 years agoAVRCP: Return error for invalid metadata IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:18 +0000 (12:11 -0300)]
AVRCP: Return error for invalid metadata IDs

12 years agoAdd callback to list available metadata IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:17 +0000 (12:11 -0300)]
Add callback to list available metadata IDs

12 years agoAVRCP: Do not list values for unsupported attributes
Lucas De Marchi [Wed, 12 Oct 2011 15:11:16 +0000 (12:11 -0300)]
AVRCP: Do not list values for unsupported attributes

12 years agoMove debug messages to their correspondent getters
Lucas De Marchi [Wed, 12 Oct 2011 15:11:15 +0000 (12:11 -0300)]
Move debug messages to their correspondent getters

12 years agoFix typo on doc
Lucas De Marchi [Wed, 12 Oct 2011 15:11:12 +0000 (12:11 -0300)]
Fix typo on doc

12 years agoAdd mpris-player to .gitignore
Lucas De Marchi [Wed, 12 Oct 2011 15:11:11 +0000 (12:11 -0300)]
Add mpris-player to .gitignore

12 years agoAdd Szymon Janc to AUTHORS
Johan Hedberg [Wed, 12 Oct 2011 13:53:58 +0000 (16:53 +0300)]
Add Szymon Janc to AUTHORS

12 years agoAdd Lucas De Marchi to AUTHORS
Johan Hedberg [Wed, 12 Oct 2011 13:52:29 +0000 (16:52 +0300)]
Add Lucas De Marchi to AUTHORS

12 years agoRemove leftover code of primary service storage
Claudio Takahasi [Tue, 11 Oct 2011 18:47:36 +0000 (15:47 -0300)]
Remove leftover code of primary service storage

Primary services related to a given address is already being removed
in delete_device_service() function.

12 years agoRemove leftover code of device type storage
Claudio Takahasi [Tue, 11 Oct 2011 18:47:35 +0000 (15:47 -0300)]
Remove leftover code of device type storage

12 years agoUpdate control documentation to reflect the implementation
Luiz Augusto von Dentz [Mon, 10 Oct 2011 11:07:40 +0000 (14:07 +0300)]
Update control documentation to reflect the implementation

Many of the methods and signal don't make much sense since we now have
a dedicated interfaces that are Media and MediaPlayer.

12 years agoFix call status in +CLCC for maemo6 telephony
Dmitriy Paliy [Tue, 11 Oct 2011 11:34:58 +0000 (14:34 +0300)]
Fix call status in +CLCC for maemo6 telephony

If list current calls is requested when there is second incoming call
and csd call status is CSD_CALL_STATUS_PROCEEDING, then returned 'state
of the call' value in +CLCC is 4 (incoming, MT call), which is incorrect.
Indication than proceeds from incoming to waiting state.

This patch sets the corresponding value to 5 (waiting, MT call) in
maemo6 telephony driver for the second call.

12 years agoFix compilation error on 32-bit systems
Johan Hedberg [Tue, 11 Oct 2011 21:48:59 +0000 (00:48 +0300)]
Fix compilation error on 32-bit systems

This fixes the following compilation error with GLib on 32-bit sytems:

audio/media.c: In function 'get_setting':
audio/media.c:1109:44: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
audio/media.c: In function 'set_setting':
audio/media.c:1132:41: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

12 years agoAdd mpris-player to test
Luiz Augusto von Dentz [Thu, 6 Oct 2011 12:46:31 +0000 (15:46 +0300)]
Add mpris-player to test

It gather information from players implementing mpris spec and convert
to org.bluez.MediaPlayer spec.

12 years agoAdd support for cancelling a LE Scan with Control-C
Vinicius Costa Gomes [Thu, 6 Oct 2011 18:03:27 +0000 (15:03 -0300)]
Add support for cancelling a LE Scan with Control-C

12 years agoFix using the attribute struct for encoding ATT pdus
Vinicius Costa Gomes [Thu, 6 Oct 2011 18:01:48 +0000 (15:01 -0300)]
Fix using the attribute struct for encoding ATT pdus

The enconding and decoding of ATT pdus should be kept as much
free of dependences from other parts of the code as possible, so
it can be used in many contexts.

In this case, for encoding and decoding notifications and indications
we did have to pass an instance of an attribute instead of direct
values.

12 years agoFix crash while registering player
Luiz Augusto von Dentz [Thu, 6 Oct 2011 15:35:17 +0000 (18:35 +0300)]
Fix crash while registering player

Crash is caused by not removed freed player from the list:

Invalid read of size 8
   at 0x13E7B5: media_adapter_find_player (media.c:861)
   by 0x13FEBC: register_player (media.c:1561)
   by 0x120DFE: process_message (object.c:224)
   by 0x4F6E9A0: ??? (in /lib64/libdbus-1.so.3.5.6)
   by 0x4F6092F: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6)
   by 0x11F787: message_dispatch (mainloop.c:80)
   by 0x4C762CA: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C74ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C752D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C75824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11EE4B: main (main.c:485)
 Address 0x642ef30 is 16 bytes inside a block of size 80 free'd
   at 0x4A0662E: free (vg_replace_malloc.c:366)
   by 0x4C7B7F2: g_free (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x12D292: player_destroy (avrcp.c:1099)
   by 0x120C38: service_filter (watch.c:477)
   by 0x120950: message_filter (watch.c:527)
   by 0x4F608E5: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6)
   by 0x11F787: message_dispatch (mainloop.c:80)
   by 0x4C762CA: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C74ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C752D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C75824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11EE4B: main (main.c:485)

12 years agoFix not being able to unregister player via UnregisterPlayer
Luiz Augusto von Dentz [Thu, 6 Oct 2011 15:35:16 +0000 (18:35 +0300)]
Fix not being able to unregister player via UnregisterPlayer

12 years agoAVRCP: do not allow CT to set a property not supported
Lucas De Marchi [Thu, 6 Oct 2011 11:49:45 +0000 (08:49 -0300)]
AVRCP: do not allow CT to set a property not supported

If player never set a property, it means it doesn't support it. Doesn't
allow the remote side to set it and send a REJECTED response.

12 years agoAVRCP: fix loop over number of application settings
Lucas De Marchi [Thu, 6 Oct 2011 11:49:44 +0000 (08:49 -0300)]
AVRCP: fix loop over number of application settings

12 years agoRemove test-media-player
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:18 +0000 (23:02 +0300)]
Remove test-media-player

12 years agoRemove MediaPlayer interface from control-api.txt
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:17 +0000 (23:02 +0300)]
Remove MediaPlayer interface from control-api.txt

12 years agoAdd simple-player test script
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:16 +0000 (23:02 +0300)]
Add simple-player test script

12 years agoAVRCP: move MediaPlayer to adapter object
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:15 +0000 (23:02 +0300)]
AVRCP: move MediaPlayer to adapter object

This move the MediaPlayer registration to adapter object on Media
interface so we can track players properly.

12 years agoAdd automatic connect timeout config option
Claudio Takahasi [Tue, 4 Oct 2011 18:32:22 +0000 (15:32 -0300)]
Add automatic connect timeout config option

Add new option in main.conf allowing change the default automatic
connection timer. This value defines how many seconds re-connection
for bonded devices will be active when a platform/user event triggers
the automatic re-connections.

12 years agoEnable re-connection if reason is Timeout
Anderson Briglia [Tue, 4 Oct 2011 18:32:16 +0000 (15:32 -0300)]
Enable re-connection if reason is Timeout

The re-connection timer must be added just when the disconnection reason
was "Connection timeout" for GATT based profiles.

12 years agoAdd an interval between connection attempts
Claudio Takahasi [Tue, 4 Oct 2011 18:32:04 +0000 (15:32 -0300)]
Add an interval between connection attempts

For connection attempts to the same remote device, add 5 seconds
interval until the next connect attempt. At the moment, the behaviour
depends on if address is found in the advertising kernel cache only.

Passive scanning kernel patches are not upstream yet. LE scanning will
be executed in background during a short period of time until it finds
the address or EHOSTDOWN is returned to the connection attempt.

12 years agoSet auto connect from maemo6 plugin
Claudio Takahasi [Tue, 4 Oct 2011 18:31:54 +0000 (15:31 -0300)]
Set auto connect from maemo6 plugin

Inform the adapter that the system has been unlocked when the MCE
sends the tklock_mode_ind signal. This signal will trigger the
automatic re-connections for the devices selected by the profiles.
Profiles register ATTIO callbacks to indicate that ATT connection
is required.

12 years agoAdd display lock watcher on maemo6 plugin
Anderson Briglia [Tue, 4 Oct 2011 18:31:43 +0000 (15:31 -0300)]
Add display lock watcher on maemo6 plugin

Implements display status signal watcher in maemo6 plugin.

12 years agoDisable automatic connections after 60 seconds
Claudio Takahasi [Tue, 4 Oct 2011 18:31:32 +0000 (15:31 -0300)]
Disable automatic connections after 60 seconds

12 years agoFix repeated connection attempt to the same remote
Claudio Takahasi [Tue, 4 Oct 2011 18:31:21 +0000 (15:31 -0300)]
Fix repeated connection attempt to the same remote

Avoids queue dupplicated requests connects for the same device. Sources
can be triggered by auto connect or on demand connection request when a
given profile registers ATTIO connection callbacks.

12 years agoAdd checking if profiles are requesting connection
Claudio Takahasi [Tue, 4 Oct 2011 18:31:09 +0000 (15:31 -0300)]
Add checking if profiles are requesting connection

Before triggering automatic ATTIO connections driven by platform event,
the device needs to check if there is at least one entry in the ATTIO
connection callback, meaning that there is profile requesting connection
and the state is auto connection.

12 years agoAdd continuous connection attempt
Claudio Takahasi [Tue, 4 Oct 2011 18:30:57 +0000 (15:30 -0300)]
Add continuous connection attempt

If auto connect is enabled, queue another connection attempt until
the adapter sets auto connect to FALSE. The behaviour depends on if the
address is found in the advertising cache or not.

12 years agoAdd set auto connect in device
Claudio Takahasi [Tue, 4 Oct 2011 18:30:46 +0000 (15:30 -0300)]
Add set auto connect in device

Skeleton of automatic connections driven by platform/user event.
Two layers will manage connections: Profiles can request on demand
connections registering ATTIO connection callbacks(one attempt) for
a given device and platform/user action can trigger automatic
connections for devices with ATTIO callbacks registered.

12 years agoRemove timer to trigger connection attempts
Claudio Takahasi [Tue, 4 Oct 2011 18:30:29 +0000 (15:30 -0300)]
Remove timer to trigger connection attempts

Removes continuous timer for ATTIO connection attempts. A new approach
is being implemented managing scanning and connection attempts driven
by platform/user actions. eg: screen unlocked.

12 years agoFix crash when remote connects to AVRCP without having a record
Luiz Augusto von Dentz [Wed, 5 Oct 2011 14:24:50 +0000 (17:24 +0300)]
Fix crash when remote connects to AVRCP without having a record

Device object may exist but control wont be initialized causing the
following crash:

Invalid read of size 8
   at 0x12B510: state_changed (control.c:90)
   by 0x12BA20: avctp_set_state (avctp.c:367)
   by 0x12C0DC: avctp_confirm_cb (avctp.c:733)
   by 0x166481: server_cb (btio.c:200)
   by 0x4E75ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4E762D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4E76824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11ED19: main (main.c:473)
 Address 0x8 is not stack'd, malloc'd or (recently) free'd

12 years agoFix not being able to register pdu handlers
Luiz Augusto von Dentz [Wed, 5 Oct 2011 14:24:30 +0000 (17:24 +0300)]
Fix not being able to register pdu handlers

This happens when removing and adding again an adapter

12 years agoFix missing initialization of A2DP error
Johan Hedberg [Wed, 5 Oct 2011 12:28:08 +0000 (15:28 +0300)]
Fix missing initialization of A2DP error

12 years agoMinor cleanup in attrib server channel disconnect
Claudio Takahasi [Tue, 4 Oct 2011 17:52:23 +0000 (14:52 -0300)]
Minor cleanup in attrib server channel disconnect

12 years agoAdd attrib server channel detach
Claudio Takahasi [Tue, 4 Oct 2011 17:50:28 +0000 (14:50 -0300)]
Add attrib server channel detach

BlueZ will act as GAP central role, so for outgoing connections the
central is responsible for disconnecting the link. This patch adds
a function allowing the central to detach from the local attribute
server(removing the last GAttrib reference).

12 years agoEmit LinkLossAlertLevel after writing the alert
Claudio Takahasi [Tue, 4 Oct 2011 17:22:43 +0000 (14:22 -0300)]
Emit LinkLossAlertLevel after writing the alert

12 years agoFix wrong write GATT-subprocedure for Link Loss
Claudio Takahasi [Tue, 4 Oct 2011 17:22:42 +0000 (14:22 -0300)]
Fix wrong write GATT-subprocedure for Link Loss

According to Link Loss Service specification, Write Characteristic
Value sub-procedure should be used to change the Alert Level.

12 years agoFix regression when disconnecting AVRCP
Luiz Augusto von Dentz [Mon, 3 Oct 2011 14:57:50 +0000 (17:57 +0300)]
Fix regression when disconnecting AVRCP

This prevent to disconnect AVRCP when doing e.g. Audio.Disconnect

12 years agoAVRCP: fix missing bytes on notification
Lucas De Marchi [Thu, 29 Sep 2011 17:07:29 +0000 (14:07 -0300)]
AVRCP: fix missing bytes on notification

12 years agoFilter duplicates by default with hcitool lescan
Johan Hedberg [Mon, 3 Oct 2011 12:16:24 +0000 (15:16 +0300)]
Filter duplicates by default with hcitool lescan

12 years agoUpdate company identifiers
Marcel Holtmann [Mon, 3 Oct 2011 02:40:25 +0000 (19:40 -0700)]
Update company identifiers

12 years agoFix Unref message after it was sent
Frédéric Danis [Fri, 30 Sep 2011 14:17:31 +0000 (16:17 +0200)]
Fix Unref message after it was sent

12 years agoAVRCP: fix changed notification
Lucas De Marchi [Thu, 29 Sep 2011 17:07:28 +0000 (14:07 -0300)]
AVRCP: fix changed notification

We sure want to send notifications only when section is not NULL.
Otherwise we either crash or do not send the expected notification.

12 years agoAVRCP: fix case when only one setting is provided
Lucas De Marchi [Wed, 28 Sep 2011 22:35:57 +0000 (19:35 -0300)]
AVRCP: fix case when only one setting is provided

If CT tries to change an Application Setting providing only one
setting, the size of the PDU will be 3 bytes. Therefore we should check
if the PDU is shorter than or equal 3, not only shorter.

12 years agoAVRCP: return empty string instead of rejecting
Lucas De Marchi [Wed, 28 Sep 2011 22:35:56 +0000 (19:35 -0300)]
AVRCP: return empty string instead of rejecting

If media attribute is not available for a certain media file, return an
empty string instead of rejecting the request. The spec is not so clear
if only the title should be handled as an empty string when not present,
but this is the only alternative to rejecting the request.

IOP tests showed that some CT devices don't like reject messages: they
never ask for an attribute again if they previously received a REJECTED
message for that attribute. They consider REJECTED as "TG doesn't
implement it these optional attributes" as opposed to what we had
before, "this attribute is currently not available".

12 years agoFix memory corruption when decoding Read Response PDU
Anderson Lizardo [Wed, 28 Sep 2011 19:01:32 +0000 (15:01 -0400)]
Fix memory corruption when decoding Read Response PDU

A bogus (or hostile) Proximity Reporter device may send a TX Power value
bigger than the buffer used. Therefore, create a temporary buffer with
the maximum size, and check for the length before using the value.

Note that all other current users of the dec_read_resp() already do
this. Another option would be to change dec_read_resp() to accept a
buffer length, but this would break external code, so it is avoided for
now.

12 years agoMention Andre's and Sheldon's contributions
Claudio Takahasi [Thu, 22 Sep 2011 17:02:05 +0000 (14:02 -0300)]
Mention Andre's and Sheldon's contributions

12 years agoRemove use of read_device_id in wiimote plugin
Luiz Augusto von Dentz [Thu, 22 Sep 2011 15:51:52 +0000 (18:51 +0300)]
Remove use of read_device_id in wiimote plugin

Make use of btd_device_get_vendor and btd_device_get_product intead.

12 years agoRemove use of read_device_id in input plugin
Luiz Augusto von Dentz [Thu, 22 Sep 2011 15:51:51 +0000 (18:51 +0300)]
Remove use of read_device_id in input plugin

Make use of btd_device_get_vendor, btd_device_get_product and
btd_device_get_version intead.

12 years agoPrint Vendor/Product/Version in hexadecimal
Luiz Augusto von Dentz [Thu, 22 Sep 2011 15:51:50 +0000 (18:51 +0300)]
Print Vendor/Product/Version in hexadecimal

This is how their are more commonly known.

12 years agoAdd Vendor, Product and Version properties to org.bluez.Device
Luiz Augusto von Dentz [Thu, 22 Sep 2011 15:51:49 +0000 (18:51 +0300)]
Add Vendor, Product and Version properties to org.bluez.Device

This identifiers can be used by applications to implements quirks which
seems to be very common in some profiles such as syncml and since this
information is already stored permanently we can quickly retrieve it
without having to connect or parse the records again.

12 years agoFix remove feedback DTMF tones timer on call release
Dmitriy Paliy [Tue, 27 Sep 2011 10:22:47 +0000 (13:22 +0300)]
Fix remove feedback DTMF tones timer on call release

User feedback DTMF tones queue is freed and timer removed when call
is released.

12 years agoFix play DTMF feeback tones only for active call
Dmitriy Paliy [Tue, 27 Sep 2011 10:22:46 +0000 (13:22 +0300)]
Fix play DTMF feeback tones only for active call

Check on active call is added for playing of DTMF feedback tones to
notify user. Network DTMF tones are handled by modem, and therefore
there is no need in special check for those.

12 years agoAdd playback of tones to handsfree
Dmitriy Paliy [Tue, 27 Sep 2011 10:22:45 +0000 (13:22 +0300)]
Add playback of tones to handsfree

StartEventTone and StopTone method calls to tone generator are added
to maemo6 telephony driver. Such implements playback of DTMF tones
in handsfree to notify user.

12 years agoFix error handling in start_dtmf_reply
Dmitriy Paliy [Tue, 27 Sep 2011 10:22:44 +0000 (13:22 +0300)]
Fix error handling in start_dtmf_reply

If csd replyed with error to StartDTMF, then StopDTMF method call
is not sent.

12 years agoReplace SendDTMF by StartDTMF/StopDTMF in maemo6
Dmitriy Paliy [Tue, 27 Sep 2011 10:22:43 +0000 (13:22 +0300)]
Replace SendDTMF by StartDTMF/StopDTMF in maemo6

SendDTMF method call is replaced by StartDTMF/StopDTMF in maemo6 telephony
driver. StartDTMF/StopDTMF places DTMF tone in queue on modem side playing
it minimum required time. When using SendDTMF, modem ignores new tone
until currently playing one is not finished.

Downside of StartDTMF/StopDTMF combination is absence of audio feedback to
hands-free.

12 years agoAVRCP: limit AVRCP packet size to the MTU of AV/C
Lucas De Marchi [Tue, 20 Sep 2011 18:31:34 +0000 (15:31 -0300)]
AVRCP: limit AVRCP packet size to the MTU of AV/C

AVRCP is an extension of AV/C spec which has a limit of 512 bytes. The
only place where it can exceed this value is in the response to
GetElementAttributes command.

Now we simply don't add the attributes that would overflow the available
buffer space.

12 years agoRename fast_connectable function in hciops
Antti Julku [Fri, 17 Jun 2011 09:44:14 +0000 (12:44 +0300)]
Rename fast_connectable function in hciops

Rename fast_connectable function in hciops to set_fast_connectable
to make it consistent with rest of the file and with mgmt interface
counterpart.

12 years agoImplement fast connectable mode for mgmt interface
Antti Julku [Fri, 17 Jun 2011 09:44:13 +0000 (12:44 +0300)]
Implement fast connectable mode for mgmt interface

Management interface implementation for fast connectable mode.

12 years agoFix test-proximity usage info
Claudio Takahasi [Fri, 23 Sep 2011 14:05:15 +0000 (11:05 -0300)]
Fix test-proximity usage info

12 years agoMinor style fix
Frédéric Dalleau [Fri, 23 Sep 2011 12:59:25 +0000 (14:59 +0200)]
Minor style fix

12 years agoRemove unneeded checks in gateway_is_connected
Frédéric Dalleau [Fri, 23 Sep 2011 12:59:24 +0000 (14:59 +0200)]
Remove unneeded checks in gateway_is_connected

12 years agoCheck all states before allowing gw connection
Frédéric Dalleau [Fri, 23 Sep 2011 12:59:23 +0000 (14:59 +0200)]
Check all states before allowing gw connection

12 years agoFix possible crash while removing a device
Luiz Augusto von Dentz [Fri, 23 Sep 2011 12:36:39 +0000 (15:36 +0300)]
Fix possible crash while removing a device

If adapter has more than one sdp session active find_by_bdaddr always
return the first one regardless if the device address match or not
which leads to the following crash:

Invalid read of size 4
   at 0x16CB31: search_cb (in /usr/sbin/bluetoothd)
   by 0x15C0CA: connect_watch (in /usr/sbin/bluetoothd)
   by 0x48CFD37: g_io_unix_dispatch (in /usr/lib/libglib-2.0.so.0.2800.6)
   by 0x488B4A0: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2800.6)
   by 0x488BCD0: g_main_context_iterate.clone.5 (in /usr/lib/libglib-2.0.so.0.2800.6)
   by 0x488C3B8: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.2800.6)
   by 0x152D09: main (in /usr/sbin/bluetoothd)
  Address 0x4c8c600 is 16 bytes inside a block of size 48 free'd
   at 0x48234A9: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
   by 0x48920F0: g_free (in /usr/lib/libglib-2.0.so.0.2800.6)
   by 0x16BDD3: browse_request_free (in /usr/sbin/bluetoothd)
   by 0x16C7A2: browse_request_cancel (in /usr/sbin/bluetoothd)

Reported by Alberto José Rodríguez Rodríguez <ajrodriguez@blulabs.es>

12 years agoAdd device blocking events to mgmt API documentation
Antti Julku [Fri, 23 Sep 2011 08:57:02 +0000 (11:57 +0300)]
Add device blocking events to mgmt API documentation

12 years agoFix Device UUIDs property list being sent empty
Claudio Takahasi [Mon, 19 Sep 2011 13:22:50 +0000 (10:22 -0300)]
Fix Device UUIDs property list being sent empty

When creating a new device, the UUIDs list is updated in the device
probing function. This patch moves the function call which emit the
signal after the device driver probing.

12 years agoFix the attrib server trying to handle responses
Vinicius Costa Gomes [Mon, 19 Sep 2011 13:20:00 +0000 (10:20 -0300)]
Fix the attrib server trying to handle responses

The attribute server should only try to handle ATT requests, responses
and events should be handled by the client.

12 years agoAttrib server integration for outgoing connections
Vinicius Costa Gomes [Mon, 19 Sep 2011 13:19:59 +0000 (10:19 -0300)]
Attrib server integration for outgoing connections

We need support for attaching a client connection to the attribute
server because the server that we are connected may want to do
something similar to a reverse service discovery, and we need to be
able to receive indications and notifications.

12 years agohciattach: fix serial speed setting for wl1271
Yegor Yefremov [Mon, 5 Sep 2011 13:42:12 +0000 (15:42 +0200)]
hciattach: fix serial speed setting for wl1271

override speed setting if firmware script issues serial settings command,
otherwise the value given in the firmware script will be overridden.

Example:

hciattach /dev/ttyO1 texas 115200

will fail, because /dev/ttyO1 will be opened with 115200 b/s, then
the firmware script will set the buadrate to 3000000 b/s, after UART init
hciattach.c will set the baudrate to 115200, so communication is broken.

The only correct way is to set both speeds:

hciattach -s 115200 /dev/ttyO1 texas 3000000

With this patch only initial speed must be specified. The former semantic
will be preserved in case the firmware script doesn't provide serial
settings action.

Tested with wl1271 and firmware TIInit_7.2.31.bts

12 years agoFix reference count issue in incoming connections
Frédéric Dalleau [Tue, 6 Sep 2011 13:55:52 +0000 (15:55 +0200)]
Fix reference count issue in incoming connections

In case of incoming RFCOMM connection, manager calls
gateway_connect_rfcomm which already take reference to GIOChannel, hence
no need to take another one.

12 years agoSet state to "connecting" on connection requested
Frédéric Dalleau [Tue, 6 Sep 2011 13:55:51 +0000 (15:55 +0200)]
Set state to "connecting" on connection requested

Make sure that state changes to disconnected on errors (authorization
refused, disconnect, sdp) This change will become necessary when
integrating the Audio interface which rely on state change to confirm
that connection has started successfully.

12 years agoFix state to "playing" on SCO establishment
Frédéric Dalleau [Tue, 6 Sep 2011 13:55:50 +0000 (15:55 +0200)]
Fix state to "playing" on SCO establishment