OSDN Git Service
Johan Hedberg [Wed, 20 Nov 2013 09:15:39 +0000 (11:15 +0200)]
tools/smp-tester: Add server support for multiple req-rsp pairs in tests
Johan Hedberg [Wed, 20 Nov 2013 08:59:45 +0000 (10:59 +0200)]
tools/smp-tester: Add client support for multiple req-rsp pairs in tests
Johan Hedberg [Thu, 21 Nov 2013 09:10:08 +0000 (11:10 +0200)]
tools/smp-tester: Fix setting pariable setting for server tests
Szymon Janc [Thu, 28 Nov 2013 11:33:29 +0000 (12:33 +0100)]
gitignore: Add unit/test-avdtp
Szymon Janc [Thu, 28 Nov 2013 11:10:55 +0000 (12:10 +0100)]
build: Fix build error if path contains spaces
janccszy@box:~/bluez test$ make
GEN lib/bluetooth/bluetooth.h
ln: target ‘lib/bluetooth/bluetooth.h’ is not a directory
make: *** [lib/bluetooth/bluetooth.h] Error 1
Jakub Tyszkowski [Thu, 28 Nov 2013 08:04:33 +0000 (09:04 +0100)]
android/pics: Add PTS PICS for OPP
PTS PICS for OPP, targeting Android 4.4.
Szymon Janc [Wed, 27 Nov 2013 15:44:56 +0000 (16:44 +0100)]
build: Force GLib version check while building in maintainer mode
This will allow to catch up build errors introduced by using GLib API
introduced in newer GLib than minimal required even if building with
newer version.
Ravi kumar Veeramally [Mon, 25 Nov 2013 13:49:26 +0000 (15:49 +0200)]
android: Add CAP_NET_RAW capability
CAP_NET_RAW capability is required to up the bnep interfaces
in android environment.
Luiz Augusto von Dentz [Wed, 27 Nov 2013 10:43:01 +0000 (12:43 +0200)]
unit/AVDTP: Fix using g_test_add_data_func_full
g_test_add_data_func_full requires glib 2.34 while the current dependency
is just 2.32.
Szymon Janc [Tue, 26 Nov 2013 12:00:26 +0000 (13:00 +0100)]
android/bluetooth: Change discoverable mode only if connectable
There is no need to sending set_discoverable command if new settings
are not connectable as clearing connectable also clear discoverable.
Sending set_discoverable when not connectable result in 'rejected'
mgmt response.
Johan Hedberg [Wed, 27 Nov 2013 10:56:41 +0000 (12:56 +0200)]
android/socket: Remove useless dst variable
Andrei Emeltchenko [Tue, 26 Nov 2013 14:05:48 +0000 (16:05 +0200)]
android/socket: Check create_rfsock returns valid structure
Andrei Emeltchenko [Tue, 26 Nov 2013 14:05:49 +0000 (16:05 +0200)]
android/hal-sock: Check uuid before dereference
uuid might be NULL and channel might be specified which makes it
valid case for Android. This adds check for uuid and service name.
Johan Hedberg [Wed, 27 Nov 2013 10:52:29 +0000 (12:52 +0200)]
android: Fix pointless eir debug log
Johan Hedberg [Wed, 27 Nov 2013 10:14:32 +0000 (12:14 +0200)]
input: Rename check_sixaxis to dev_is_sixaxis for clarity
Johan Hedberg [Wed, 27 Nov 2013 09:32:36 +0000 (11:32 +0200)]
plugins/sixaxis: Use explicit include paths
Szymon Janc [Mon, 25 Nov 2013 22:15:52 +0000 (22:15 +0000)]
input: Add support for handling sixaxis devices
This allows to handle incoming connection from unknown devices.
If device happens to be sixaxis input device is created after
SDP was queried and then connection is authorized.
Szymon Janc [Mon, 25 Nov 2013 22:15:51 +0000 (22:15 +0000)]
device: Add device_discover_services function
This will allow to query remote services from plugins for not yet
discovered devices.
Szymon Janc [Mon, 25 Nov 2013 22:15:50 +0000 (22:15 +0000)]
plugins/sixaxis: Add support for configuring new controllers
When new PS3 controller is detected provide it with default adapter
address. Also create new btd_device with proper PNP info if it wasn't
existing yet.
Szymon Janc [Mon, 25 Nov 2013 22:15:49 +0000 (22:15 +0000)]
plugins/sixaxis: Add initial code for udev handling
When new device is added plugin will be notified about it.
Szymon Janc [Mon, 25 Nov 2013 22:15:48 +0000 (22:15 +0000)]
plugins: Add initial code for sixaxis plugin
This plugin will be used to associate PS3 controllers.
Szymon Janc [Mon, 25 Nov 2013 22:15:47 +0000 (22:15 +0000)]
Rename adapter_find_device to btd_adapter_find_device
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:46 +0000 (22:15 +0000)]
Rename adapter_get_address to btd_adapter_get_address
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:45 +0000 (22:15 +0000)]
Rename device_get_uuids to btd_device_get_uuids
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:44 +0000 (22:15 +0000)]
Rename device_device_set_name to btd_device_device_set_name
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:43 +0000 (22:15 +0000)]
Rename device_set_trusted to btd_device_set_trusted
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:42 +0000 (22:15 +0000)]
Rename device_set_temporary to btd_device_set_temporary
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:41 +0000 (22:15 +0000)]
Rename adapter_get_device to btd_adapter_get_device
Allow this symbol to be exported and usable from external plugins.
Szymon Janc [Mon, 25 Nov 2013 22:15:40 +0000 (22:15 +0000)]
core: Export some symbols from libbluetooth
Those are commonly used and should be available for external plugins.
Johan Hedberg [Wed, 27 Nov 2013 08:59:53 +0000 (10:59 +0200)]
core: Fix protecting from agent callback freeing the agent
Johan Hedberg [Wed, 27 Nov 2013 08:59:19 +0000 (10:59 +0200)]
core: Fix checking for removed authorization in agent_auth_cb
Andrei Emeltchenko [Tue, 26 Nov 2013 14:05:46 +0000 (16:05 +0200)]
android/socket: Use security level for connect / listen
Use MEDIUM security level for connections without profile and default
sec_level for others. rfsock now has pointer to profile info.
Andrei Emeltchenko [Tue, 26 Nov 2013 14:05:45 +0000 (16:05 +0200)]
android/socket: Make profile struct const
We are not supposed to change profile structure, make it const.
Andrei Emeltchenko [Tue, 26 Nov 2013 13:47:05 +0000 (15:47 +0200)]
android/haltest: Add uuid autocompletions
Andrei Emeltchenko [Tue, 26 Nov 2013 13:47:04 +0000 (15:47 +0200)]
android/haltest: trivial: Fix typo channle -> channel
Luiz Augusto von Dentz [Mon, 25 Nov 2013 11:23:18 +0000 (13:23 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-24-C test
Verify that the IUT (ACP) is able to accept a command to abort a stream.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 11:15:55 +0000 (13:15 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-23-C test
Verify that the IUT (INT) is able to abort a stream by issuing the
AVDTP_ABORT and reporting the replied confirmation.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 10:20:16 +0000 (12:20 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-22-C test
Verify that the IUT (ACP) is able to accept an AVDTP_SUSPEND_CMD, after
the streaming procedure has been started, by reporting the suspension
and replying the returned confirmation.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 10:17:28 +0000 (12:17 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-21-C test
Verify that the IUT (INT) is able to initiate the suspension of a
streaming procedure, after the streaming procedure has been started, by
issuing the AVDTP_SUSPEND_CMD.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 09:58:08 +0000 (11:58 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-20-C test
Verify that the IUT (ACP) is able to accept an AVDTP_CLOSE_CMD after the
streaming procedure has been started, by releasing all the resources
associated to the SEP, reporting of the closing and replying the
returned confirmation.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 09:56:33 +0000 (11:56 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-19-C test
Verify that the IUT (INT) is able to initiate the release of a streaming
procedure after the streaming procedure has been started, by issuing the
AVDTP_CLOSE_CMD, releasing all the resources associated to the SEP after
reception of the replied confirmation and reporting the closing.
Luiz Augusto von Dentz [Sun, 24 Nov 2013 13:35:52 +0000 (15:35 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-18-C test
To verify that the IUT (ACP) reports the reception of valid
AVDTP_START_CMD and replies the returned confirmation.
Luiz Augusto von Dentz [Sun, 24 Nov 2013 12:33:03 +0000 (14:33 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-17-C test
Verify that the IUT (INT) is able to start a streaming procedure after
the stream establishment is complete, by issuing the AVDTP_START_CMD,
reporting the replied confirmation and streaming packets.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 15:44:45 +0000 (17:44 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-16-C test
Verify that the IUT (ACP) reports the reception of valid AVDTP_OPEN_CMD
for transport sessions associated to a SEP and replies the returned
confirmation.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 15:37:03 +0000 (17:37 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-15-C test
Verify that the IUT (INT) is able to establish a stream connection to a
previously configured remote SEP by establishing one L2CAP channel
(AVDTP_OPEN_CMD), and reports the related confirmation.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 13:38:41 +0000 (15:38 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-12-C test
Verify that the IUT (ACP) reports the reception of a valid get
configuration command for remote SEP and replies the returned
configuration.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 13:30:38 +0000 (15:30 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-11-C test
Verify that the IUT (INT) is able to issue a valid get configuration
command for remote SEP and report the replied configuration.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 13:07:38 +0000 (15:07 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-10-C test
Verify that the IUT (ACP) reports the reception of a valid set
configuration command for remote SEP, and configures the SEP as
requested and replies the returned confirmation.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 13:06:48 +0000 (15:06 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-09-C test
Verify that the IUT (INT) is able to issue a valid set configuration
command for remote SEP and reports the replied confirmation.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 09:18:32 +0000 (11:18 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-08-C test
Verify that the IUT (ACP) reports the reception of a valid query for
remote SEP capabilities and replies the returned capabilities.
Luiz Augusto von Dentz [Thu, 21 Nov 2013 09:15:01 +0000 (11:15 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-07-C test
Verify that the IUT (INT) is able to issue a valid query for remote SEP
capabilities and reports the replied ones.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 11:49:53 +0000 (13:49 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-06-C test
Verify that the IUT (ACP) reports the reception of a valid stream
discover command and replies the returned list of SEPs and media types.
Luiz Augusto von Dentz [Wed, 20 Nov 2013 15:42:48 +0000 (17:42 +0200)]
unit/AVDTP: Add /TP/SIG/SMG/BV-05-C test
Verify that the IUT (INT) is able to issue a valid stream discover command
and report the replied SEPs and media types.
Luiz Augusto von Dentz [Wed, 20 Nov 2013 12:30:19 +0000 (14:30 +0200)]
android/AVDTP: Strip dependencies
This strips AVDTP code of any dependency of core and btio to make it
transport agnostic.
Luiz Augusto von Dentz [Mon, 25 Nov 2013 13:59:28 +0000 (15:59 +0200)]
android: Add copy of current AVDTP implemention
These files are not added to any makefile on purpose because they still
have external dependencies.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:14:45 +0000 (15:14 +0200)]
sdptool: Make code consistent for SPP record add
Move freeing to the end of the function like it is done for other
records.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:14:44 +0000 (15:14 +0200)]
sdptool: Fix memory leaks creating PBAP record
Andrei Emeltchenko [Mon, 25 Nov 2013 13:14:43 +0000 (15:14 +0200)]
sdptool: Fix memory leaks creating OPP record
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:53 +0000 (15:08 +0200)]
android/socket: Add error printing possible close() failure
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:52 +0000 (15:08 +0200)]
android/socket: Use default sec_level for listen
Set default security level low for OPP and SPP and medium for PBAP and MAS.
Default security level would be low for listening without profile.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:51 +0000 (15:08 +0200)]
android/hal-utils: Fix possible NULL pointer dereference
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:50 +0000 (15:08 +0200)]
android/socket: Refactor socket send_fd function
Make code cleaner and initialize local cmsg buffer to zeroes.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:49 +0000 (15:08 +0200)]
android/hal-sock: Print bdaddr on connect
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:48 +0000 (15:08 +0200)]
android/socket: Support listen() with supplied chan number
No profile is assigned in this case. There is a possibility to use
Serial Port Profile.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:47 +0000 (15:08 +0200)]
android/socket: Add SPP SDP record
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:46 +0000 (15:08 +0200)]
android/socket: Add PBAP SDP record
This adds SDP service record like shown below:
Service Name: OBEX Phonebook Access Server
Service RecHandle: 0x10002
Service Class ID List:
"Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
"RFCOMM" (0x0003)
Channel: 15
"OBEX" (0x0008)
Profile Descriptor List:
"Phonebook Access" (0x1130)
Version: 0x0100
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:45 +0000 (15:08 +0200)]
android/socket: Add SPP uuid to profile table
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:44 +0000 (15:08 +0200)]
android/socket: Add MAS uuid to profile table
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:43 +0000 (15:08 +0200)]
android/socket: Add OPP SDP record
This adds SDP record for OPP shown below:
Service Name: OBEX Object Push
Service RecHandle: 0x10002
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"RFCOMM" (0x0003)
Channel: 9
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:42 +0000 (15:08 +0200)]
android/socket: Add general service create/remove function
create_record function from profile is used to create SDP service record.
The record is removed from rfsock cleanup function.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:41 +0000 (15:08 +0200)]
android/socket: Close file descriptor after sending
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:40 +0000 (15:08 +0200)]
android/socket: Send connect signal to Android framework
Android framework expects connect signal to be sent when
remote device is connected.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:39 +0000 (15:08 +0200)]
android/socket: Send RFCOMM channel to framework
Framework expects channel to be send.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:38 +0000 (15:08 +0200)]
android/socket: Implement HAL connect call
HAL connect uses similar event handlers like listen call.
Andrei Emeltchenko [Mon, 25 Nov 2013 13:08:37 +0000 (15:08 +0200)]
android/socket: Parse SDP response and connect
Parse SDP response, find RFCOMM channel and connect.
Sebastian Chlad [Wed, 20 Nov 2013 20:21:52 +0000 (21:21 +0100)]
client: Add paired-devices command to bluetoothctl
Paired-devices command lists only paired devices
Philip Withnall [Fri, 22 Nov 2013 12:47:42 +0000 (12:47 +0000)]
client: Fix handling of (G_IO_IN | G_IO_HUP) input case
If running bluetoothctl as a subprocess from another process, and piping
input to it, it’s possible for the stdin pipe to be closed by the parent
process while there’s still data pending in its buffer. This results in
input handler callbacks with condition (G_IO_IN | G_IO_HUP). All of the
pending input should be handled before closing bluetoothctl.
Andrei Emeltchenko [Fri, 22 Nov 2013 14:21:12 +0000 (16:21 +0200)]
android/bluetooth: Fix memory leak
Jakub Tyszkowski [Fri, 22 Nov 2013 10:47:40 +0000 (11:47 +0100)]
android/pics: Add PTS PICS for DID
PTS PICS for DID, targeting Android 4.4.
Jakub Tyszkowski [Fri, 22 Nov 2013 10:47:38 +0000 (11:47 +0100)]
android/pics: Add PTS PICS for PAN
PTS PICS for PAN, targeting Android 4.4.
Szymon Janc [Mon, 25 Nov 2013 11:32:00 +0000 (12:32 +0100)]
android/hal-bluetooth: Use static memory for enum convertion
There is no need to use dynamic allocation for enum properties
convertion. Each property type can be present only once in properties
callback so using static allocation is safe. This also remove need
for cleanup properties after HAL callback is called making code
simpler.
Andrei Emeltchenko [Thu, 21 Nov 2013 14:23:31 +0000 (16:23 +0200)]
android/haltest: Zero initialize cmsg buffer
Andrei Emeltchenko [Thu, 21 Nov 2013 14:23:30 +0000 (16:23 +0200)]
android/ipc: Zero initialize cmsg buffer
This fixes valgrind warnings:
...
Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
...
Luiz Augusto von Dentz [Wed, 20 Nov 2013 09:39:54 +0000 (11:39 +0200)]
android/a2dp: Cleanup devices on unregister
This cleanup any existing devices in bt_a2dp_unregister
Johan Hedberg [Thu, 21 Nov 2013 07:53:40 +0000 (09:53 +0200)]
core: Fix missing NULL check for msg
device_request_disconnect can be called with msg being NULL, however
g_dbus_send_reply cannot. Therefore, add a check for msg before calling
g_dbus_send_reply.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:27 +0000 (12:24 +0200)]
android/socket: Implement socket connect HAL method
First step is to query remote device for RFCOMM channel.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:26 +0000 (12:24 +0200)]
android/socket: Notify channel to Android framework
Android framework expects to receive channel number as int.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:25 +0000 (12:24 +0200)]
android/socket: Send accept signal to Android framework
Android expects to get accept signal over file descriptor which was
set during listen HAL call.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:24 +0000 (12:24 +0200)]
android/socket: Implement RFCOMM events
Copy data from RFCOMM socket to Android framework. Consider splice
in the future.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:23 +0000 (12:24 +0200)]
android/socket: Implement Android RFCOMM stack events
Handle events from Android framework. Write everything to real RFCOMM
socket. Consider splice() in the future.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:22 +0000 (12:24 +0200)]
android/socket: Implement socket accepted event
When we get accepted event we create rfcomm slot and start listening
for events from Android framework and from RFCOMM real socket.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:20 +0000 (12:24 +0200)]
android/socket: Implement listen on RFCOMM socket
Handle HAL socket listen call. Create RFCOMM socket and wait for events.
Andrei Emeltchenko [Wed, 20 Nov 2013 10:24:19 +0000 (12:24 +0200)]
android/socket: Add get RFCOMM default channel
RFCOMM default channel is the same like in other BlueZ code, it is
defined in src/profile.c
Ravi kumar Veeramally [Tue, 19 Nov 2013 21:24:18 +0000 (23:24 +0200)]
android/hal-pan: Fix order of event handler registration
IPC message handler determines handler offset with
opcode = msg->opcode - HAL_MINIMUM_EVENT. But here order is misplaced.
Ravi kumar Veeramally [Tue, 19 Nov 2013 20:59:23 +0000 (22:59 +0200)]
android/hal-a2dp: Fix expected size of A2DP events
Johan Hedberg [Tue, 19 Nov 2013 20:35:47 +0000 (22:35 +0200)]
android: Fix expected size of hal_ev_ssp_request
Johan Hedberg [Tue, 19 Nov 2013 16:34:19 +0000 (18:34 +0200)]
android/build: Add PICS files to EXTRA_DIST
Johan Hedberg [Tue, 19 Nov 2013 16:33:10 +0000 (18:33 +0200)]
android/pics: Fix line lengths
Jakub Tyszkowski [Tue, 19 Nov 2013 14:36:15 +0000 (15:36 +0100)]
android: Add PTS PICS for HID
PTS PICS for HID, targeting Android 4.4.
Jakub Tyszkowski [Tue, 19 Nov 2013 14:36:14 +0000 (15:36 +0100)]
android: Add PTS PICS for GAP
PTS PICS for GAP, targeting Android 4.4.