* [PATCHv5 05/11] android/ipc-tester: Add sending test data with ipc
From: Jakub Tyszkowski @ 2014-01-20 9:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390210570-28260-1-git-send-email-jakub.tyszkowski@tieto.com>
This patch adds some data structures used to send data with ipc during
test setup and run stage. Test execution macro is extended for easy
data preparation.
---
android/ipc-tester.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 58 insertions(+), 4 deletions(-)
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
index b6f8131..7cd50f5 100644
--- a/android/ipc-tester.c
+++ b/android/ipc-tester.c
@@ -55,6 +55,23 @@ struct test_data {
bool setup_done;
};
+struct ipc_data {
+ void *buffer;
+ size_t len;
+};
+
+struct generic_data {
+ struct ipc_data ipc_data;
+
+ unsigned int num_services;
+ int init_services[];
+};
+
+struct regmod_msg {
+ struct hal_hdr header;
+ struct hal_cmd_register_module cmd;
+} __attribute__((packed));
+
#define CONNECT_TIMEOUT (5 * 1000)
#define SERVICE_NAME "bluetoothd"
@@ -460,27 +477,64 @@ static void teardown(const void *data)
static void ipc_send_tc(const void *data)
{
+ const struct generic_data *generic_data = data;
+ const struct ipc_data *ipc_data = &generic_data->ipc_data;
+
+ if (ipc_data->len) {
+ if (write(cmd_sk, ipc_data->buffer, ipc_data->len) < 0)
+ tester_test_failed();
+ }
}
-#define test_generic(name, data, test_setup, test, test_teardown) \
+#define service_data(args...) { args }
+
+#define gen_data(writelen, writebuf, servicelist...) \
+ { \
+ .ipc_data = { \
+ .buffer = writebuf, \
+ .len = writelen, \
+ }, \
+ .init_services = service_data(servicelist), \
+ .num_services = sizeof((const int[]) \
+ service_data(servicelist)) / \
+ sizeof(int), \
+ }
+
+#define test_generic(name, test, setup, teardown, buffer, writelen, \
+ services...) \
do { \
struct test_data *user; \
+ static const struct generic_data data = \
+ gen_data(writelen, buffer, services); \
user = g_malloc0(sizeof(struct test_data)); \
if (!user) \
break; \
user->hciemu_type = HCIEMU_TYPE_BREDRLE; \
- tester_add_full(name, data, test_pre_setup, test_setup, \
- test, test_teardown, test_post_teardown,\
+ tester_add_full(name, &data, test_pre_setup, setup, \
+ test, teardown, test_post_teardown, \
3, user, g_free); \
} while (0)
+struct regmod_msg register_bt_msg = {
+ .header = {
+ .service_id = HAL_SERVICE_ID_CORE,
+ .opcode = HAL_OP_REGISTER_MODULE,
+ .len = sizeof(struct hal_cmd_register_module),
+ },
+ .cmd = {
+ .service_id = HAL_SERVICE_ID_BLUETOOTH,
+ },
+};
+
int main(int argc, char *argv[])
{
snprintf(exec_dir, sizeof(exec_dir), "%s", dirname(argv[0]));
tester_init(&argc, &argv);
- test_generic("Test Dummy", NULL, setup, ipc_send_tc, teardown);
+ test_generic("Too small data",
+ ipc_send_tc, setup, teardown,
+ ®ister_bt_msg, 1);
return tester_run();
}
--
1.8.5.2
^ permalink raw reply related
* [PATCHv5 04/11] android/ipc-tester: Add daemon shutdown handler
From: Jakub Tyszkowski @ 2014-01-20 9:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390210570-28260-1-git-send-email-jakub.tyszkowski@tieto.com>
Handle daemon shutdown asynchronously.
---
android/ipc-tester.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
index ff17ced..b6f8131 100644
--- a/android/ipc-tester.c
+++ b/android/ipc-tester.c
@@ -52,6 +52,7 @@ struct test_data {
struct hciemu *hciemu;
enum hciemu_type hciemu_type;
pid_t bluetoothd_pid;
+ bool setup_done;
};
#define CONNECT_TIMEOUT (5 * 1000)
@@ -364,6 +365,31 @@ static void cleanup_ipc(void)
cmd_sk = -1;
}
+static gboolean check_for_daemon(gpointer user_data)
+{
+ int status;
+ struct test_data *data = user_data;
+
+ if ((waitpid(data->bluetoothd_pid, &status, WNOHANG))
+ != data->bluetoothd_pid)
+ return true;
+
+ if (data->setup_done) {
+ if (WIFEXITED(status) &&
+ (WEXITSTATUS(status) == EXIT_SUCCESS)) {
+ tester_test_passed();
+ return false;
+ }
+ tester_test_failed();
+ } else {
+ tester_setup_failed();
+ test_post_teardown(data);
+ }
+
+ tester_warn("Unexpected Daemon shutdown with status %d", status);
+ return false;
+}
+
static void setup(const void *data)
{
struct test_data *test_data = tester_get_data();
@@ -401,24 +427,29 @@ static void setup(const void *data)
goto failed;
}
+ g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, check_for_daemon, test_data,
+ NULL);
+
if (!init_ipc()) {
tester_warn("Cannot initialize IPC mechanism!");
goto failed;
}
/* TODO: register modules */
+ test_data->setup_done = true;
return;
failed:
+ g_idle_remove_by_data(test_data);
tester_setup_failed();
test_post_teardown(data);
}
-
static void teardown(const void *data)
{
struct test_data *test_data = tester_get_data();
+ g_idle_remove_by_data(test_data);
cleanup_ipc();
if (test_data->bluetoothd_pid)
--
1.8.5.2
^ permalink raw reply related
* [PATCHv5 03/11] android/ipc-tester: Add IPC initialization
From: Jakub Tyszkowski @ 2014-01-20 9:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390210570-28260-1-git-send-email-jakub.tyszkowski@tieto.com>
This patch adds IPC mechanism initialization.
The deamon is being started and IPC socket connection is established.
---
android/ipc-tester.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 125 insertions(+)
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
index c8d1f0b..ff17ced 100644
--- a/android/ipc-tester.c
+++ b/android/ipc-tester.c
@@ -23,6 +23,8 @@
#include <stdlib.h>
#include <unistd.h>
+#include <errno.h>
+#include <poll.h>
#include <sys/socket.h>
#include <sys/types.h>
@@ -38,6 +40,8 @@
#include "src/shared/mgmt.h"
#include "src/shared/hciemu.h"
+#include "hal-msg.h"
+#include <cutils/properties.h>
#define WAIT_FOR_SIGNAL_TIME 2 /* in seconds */
#define EMULATOR_SIGNAL "emulator_started"
@@ -50,8 +54,14 @@ struct test_data {
pid_t bluetoothd_pid;
};
+#define CONNECT_TIMEOUT (5 * 1000)
+#define SERVICE_NAME "bluetoothd"
+
static char exec_dir[PATH_MAX + 1];
+static int cmd_sk = -1;
+static int notif_sk = -1;
+
static void read_info_callback(uint8_t status, uint16_t length,
const void *param, void *user_data)
{
@@ -248,6 +258,112 @@ failed:
close(fd);
}
+static int accept_connection(int sk)
+{
+ int err;
+ struct pollfd pfd;
+ int new_sk;
+
+ memset(&pfd, 0 , sizeof(pfd));
+ pfd.fd = sk;
+ pfd.events = POLLIN;
+
+ err = poll(&pfd, 1, CONNECT_TIMEOUT);
+ if (err < 0) {
+ err = errno;
+ tester_warn("Failed to poll: %d (%s)", err, strerror(err));
+ return -errno;
+ }
+
+ if (err == 0) {
+ tester_warn("bluetoothd connect timeout");
+ return -errno;
+ }
+
+ new_sk = accept(sk, NULL, NULL);
+ if (new_sk < 0) {
+ err = errno;
+ tester_warn("Failed to accept socket: %d (%s)",
+ err, strerror(err));
+ return -errno;
+ }
+
+ return new_sk;
+}
+
+static bool init_ipc(void)
+{
+ struct sockaddr_un addr;
+
+ int sk;
+ int err;
+
+ sk = socket(AF_LOCAL, SOCK_SEQPACKET, 0);
+ if (sk < 0) {
+ err = errno;
+ tester_warn("Failed to create socket: %d (%s)", err,
+ strerror(err));
+ return false;
+ }
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+
+ memcpy(addr.sun_path, BLUEZ_HAL_SK_PATH, sizeof(BLUEZ_HAL_SK_PATH));
+
+ if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+ err = errno;
+ tester_warn("Failed to bind socket: %d (%s)", err,
+ strerror(err));
+ close(sk);
+ return false;
+ }
+
+ if (listen(sk, 2) < 0) {
+ err = errno;
+ tester_warn("Failed to listen on socket: %d (%s)", err,
+ strerror(err));
+ close(sk);
+ return false;
+ }
+
+ /* Start Android Bluetooth daemon service */
+ if (property_set("ctl.start", SERVICE_NAME) < 0) {
+ tester_warn("Failed to start service %s", SERVICE_NAME);
+ close(sk);
+ return false;
+ }
+
+ cmd_sk = accept_connection(sk);
+ if (cmd_sk < 0) {
+ close(sk);
+ return false;
+ }
+
+ notif_sk = accept_connection(sk);
+ if (notif_sk < 0) {
+ close(sk);
+ close(cmd_sk);
+ cmd_sk = -1;
+ return false;
+ }
+
+ tester_print("bluetoothd connected");
+
+ close(sk);
+
+ return true;
+}
+
+static void cleanup_ipc(void)
+{
+ if (cmd_sk < 0)
+ return;
+
+ close(cmd_sk);
+ cmd_sk = -1;
+}
+
static void setup(const void *data)
{
struct test_data *test_data = tester_get_data();
@@ -285,6 +401,12 @@ static void setup(const void *data)
goto failed;
}
+ if (!init_ipc()) {
+ tester_warn("Cannot initialize IPC mechanism!");
+ goto failed;
+ }
+ /* TODO: register modules */
+
return;
failed:
@@ -292,10 +414,13 @@ failed:
test_post_teardown(data);
}
+
static void teardown(const void *data)
{
struct test_data *test_data = tester_get_data();
+ cleanup_ipc();
+
if (test_data->bluetoothd_pid)
waitpid(test_data->bluetoothd_pid, NULL, 0);
--
1.8.5.2
^ permalink raw reply related
* [PATCHv5 02/11] android/ipc-tester: Run daemon in separate process
From: Jakub Tyszkowski @ 2014-01-20 9:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390210570-28260-1-git-send-email-jakub.tyszkowski@tieto.com>
This patch adds new process waiting to run daemon when needed.
---
android/ipc-tester.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 123 insertions(+)
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
index 021919e..c8d1f0b 100644
--- a/android/ipc-tester.c
+++ b/android/ipc-tester.c
@@ -21,8 +21,14 @@
*
*/
+#include <stdlib.h>
#include <unistd.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/un.h>
+#include <libgen.h>
#include <glib.h>
#include "lib/bluetooth.h"
@@ -33,13 +39,19 @@
#include "src/shared/hciemu.h"
+#define WAIT_FOR_SIGNAL_TIME 2 /* in seconds */
+#define EMULATOR_SIGNAL "emulator_started"
+
struct test_data {
struct mgmt *mgmt;
uint16_t mgmt_index;
struct hciemu *hciemu;
enum hciemu_type hciemu_type;
+ pid_t bluetoothd_pid;
};
+static char exec_dir[PATH_MAX + 1];
+
static void read_info_callback(uint8_t status, uint16_t length,
const void *param, void *user_data)
{
@@ -170,14 +182,123 @@ static void test_post_teardown(const void *data)
}
}
+static void bluetoothd_start(int hci_index)
+{
+ char prg_name[PATH_MAX + 1];
+ char index[8];
+ char *prg_argv[4];
+
+ snprintf(prg_name, sizeof(prg_name), "%s/%s", exec_dir, "bluetoothd");
+ snprintf(index, sizeof(index), "%d", hci_index);
+
+ prg_argv[0] = prg_name;
+ prg_argv[1] = "-i";
+ prg_argv[2] = index;
+ prg_argv[3] = NULL;
+
+ if (!tester_use_debug())
+ fclose(stderr);
+
+ execve(prg_argv[0], prg_argv, NULL);
+}
+
+static void emulator(int pipe, int hci_index)
+{
+ static const char SYSTEM_SOCKET_PATH[] = "\0android_system";
+ char buf[1024];
+ struct sockaddr_un addr;
+ struct timeval tv;
+ int fd;
+ ssize_t len;
+
+ fd = socket(PF_LOCAL, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+ if (fd < 0)
+ goto failed;
+
+ tv.tv_sec = WAIT_FOR_SIGNAL_TIME;
+ tv.tv_usec = 0;
+ setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(tv));
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+ memcpy(addr.sun_path, SYSTEM_SOCKET_PATH, sizeof(SYSTEM_SOCKET_PATH));
+
+ if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+ perror("Failed to bind system socket");
+ goto failed;
+ }
+
+ len = write(pipe, EMULATOR_SIGNAL, sizeof(EMULATOR_SIGNAL));
+
+ if (len != sizeof(EMULATOR_SIGNAL))
+ goto failed;
+
+ memset(buf, 0, sizeof(buf));
+
+ len = read(fd, buf, sizeof(buf));
+ if (len <= 0 || (strcmp(buf, "ctl.start=bluetoothd")))
+ goto failed;
+
+ close(pipe);
+ close(fd);
+ bluetoothd_start(hci_index);
+
+failed:
+ close(pipe);
+ close(fd);
+}
+
static void setup(const void *data)
{
+ struct test_data *test_data = tester_get_data();
+ int signal_fd[2];
+ char buf[1024];
+ pid_t pid;
+ int len;
+
+ if (pipe(signal_fd))
+ goto failed;
+
+ pid = fork();
+
+ if (pid < 0) {
+ close(signal_fd[0]);
+ close(signal_fd[1]);
+ goto failed;
+ }
+
+ if (pid == 0) {
+ if (!tester_use_debug())
+ fclose(stderr);
+
+ close(signal_fd[0]);
+ emulator(signal_fd[1], test_data->mgmt_index);
+ exit(0);
+ }
+
+ close(signal_fd[1]);
+ test_data->bluetoothd_pid = pid;
+
+ len = read(signal_fd[0], buf, sizeof(buf));
+ if (len <= 0 || (strcmp(buf, EMULATOR_SIGNAL))) {
+ close(signal_fd[0]);
+ goto failed;
+ }
+
+ return;
+
+failed:
tester_setup_failed();
test_post_teardown(data);
}
static void teardown(const void *data)
{
+ struct test_data *test_data = tester_get_data();
+
+ if (test_data->bluetoothd_pid)
+ waitpid(test_data->bluetoothd_pid, NULL, 0);
+
tester_teardown_complete();
}
@@ -199,6 +320,8 @@ static void ipc_send_tc(const void *data)
int main(int argc, char *argv[])
{
+ snprintf(exec_dir, sizeof(exec_dir), "%s", dirname(argv[0]));
+
tester_init(&argc, &argv);
test_generic("Test Dummy", NULL, setup, ipc_send_tc, teardown);
--
1.8.5.2
^ permalink raw reply related
* [PATCHv5 01/11] android/ipc-tester: Skeleton for ipc negative tester
From: Jakub Tyszkowski @ 2014-01-20 9:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390210570-28260-1-git-send-email-jakub.tyszkowski@tieto.com>
Add skeleton for ipc negative testing.
---
.gitignore | 1 +
android/Makefile.am | 17 +++++
android/ipc-tester.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 225 insertions(+)
create mode 100644 android/ipc-tester.c
diff --git a/.gitignore b/.gitignore
index 2c8e033..67e9850 100644
--- a/.gitignore
+++ b/.gitignore
@@ -114,4 +114,5 @@ android/system-emulator
android/bluetoothd
android/haltest
android/android-tester
+android/ipc-tester
android/bluetoothd-snoop
diff --git a/android/Makefile.am b/android/Makefile.am
index f24b754..e027cff 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -120,6 +120,23 @@ android_android_tester_LDFLAGS = -pthread -ldl
plugin_LTLIBRARIES += android/audio.a2dp.default.la
+noinst_PROGRAMS += android/ipc-tester
+
+android_ipc_tester_SOURCES = emulator/btdev.h emulator/btdev.c \
+ emulator/bthost.h emulator/bthost.c \
+ src/shared/io.h src/shared/io-glib.c \
+ src/shared/queue.h src/shared/queue.c \
+ src/shared/util.h src/shared/util.c \
+ src/shared/mgmt.h src/shared/mgmt.c \
+ src/shared/hciemu.h src/shared/hciemu.c \
+ src/shared/tester.h src/shared/tester.c \
+ android/hal-utils.h android/hal-utils.c \
+ android/ipc-tester.c
+
+android_ipc_tester_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/android
+
+android_ipc_tester_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
+
android_audio_a2dp_default_la_SOURCES = android/audio-msg.h \
android/hal-msg.h \
android/hal-audio.c \
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
new file mode 100644
index 0000000..021919e
--- /dev/null
+++ b/android/ipc-tester.c
@@ -0,0 +1,207 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <unistd.h>
+
+#include <glib.h>
+
+#include "lib/bluetooth.h"
+#include "lib/mgmt.h"
+
+#include "src/shared/tester.h"
+#include "src/shared/mgmt.h"
+#include "src/shared/hciemu.h"
+
+
+struct test_data {
+ struct mgmt *mgmt;
+ uint16_t mgmt_index;
+ struct hciemu *hciemu;
+ enum hciemu_type hciemu_type;
+};
+
+static void read_info_callback(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ struct test_data *data = tester_get_data();
+ const struct mgmt_rp_read_info *rp = param;
+ char addr[18];
+ uint16_t manufacturer;
+ uint32_t supported_settings, current_settings;
+
+ tester_print("Read Info callback");
+ tester_print(" Status: 0x%02x", status);
+
+ if (status || !param) {
+ tester_pre_setup_failed();
+ return;
+ }
+
+ ba2str(&rp->bdaddr, addr);
+ manufacturer = btohs(rp->manufacturer);
+ supported_settings = btohl(rp->supported_settings);
+ current_settings = btohl(rp->current_settings);
+
+ tester_print(" Address: %s", addr);
+ tester_print(" Version: 0x%02x", rp->version);
+ tester_print(" Manufacturer: 0x%04x", manufacturer);
+ tester_print(" Supported settings: 0x%08x", supported_settings);
+ tester_print(" Current settings: 0x%08x", current_settings);
+ tester_print(" Class: 0x%02x%02x%02x",
+ rp->dev_class[2], rp->dev_class[1], rp->dev_class[0]);
+ tester_print(" Name: %s", rp->name);
+ tester_print(" Short name: %s", rp->short_name);
+
+ if (strcmp(hciemu_get_address(data->hciemu), addr)) {
+ tester_pre_setup_failed();
+ return;
+ }
+
+ tester_pre_setup_complete();
+}
+
+static void index_added_callback(uint16_t index, uint16_t length,
+ const void *param, void *user_data)
+{
+ struct test_data *data = tester_get_data();
+
+ tester_print("Index Added callback");
+ tester_print(" Index: 0x%04x", index);
+
+ data->mgmt_index = index;
+
+ mgmt_send(data->mgmt, MGMT_OP_READ_INFO, data->mgmt_index, 0, NULL,
+ read_info_callback, NULL, NULL);
+}
+
+static void index_removed_callback(uint16_t index, uint16_t length,
+ const void *param, void *user_data)
+{
+ struct test_data *data = tester_get_data();
+
+ tester_print("Index Removed callback");
+ tester_print(" Index: 0x%04x", index);
+
+ if (index != data->mgmt_index)
+ return;
+
+ mgmt_unregister_index(data->mgmt, data->mgmt_index);
+
+ mgmt_unref(data->mgmt);
+ data->mgmt = NULL;
+
+ tester_post_teardown_complete();
+}
+
+static void read_index_list_callback(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ struct test_data *data = tester_get_data();
+
+ tester_print("Read Index List callback");
+ tester_print(" Status: 0x%02x", status);
+
+ if (status || !param) {
+ tester_pre_setup_failed();
+ return;
+ }
+
+ mgmt_register(data->mgmt, MGMT_EV_INDEX_ADDED, MGMT_INDEX_NONE,
+ index_added_callback, NULL, NULL);
+
+ mgmt_register(data->mgmt, MGMT_EV_INDEX_REMOVED, MGMT_INDEX_NONE,
+ index_removed_callback, NULL, NULL);
+
+ data->hciemu = hciemu_new(data->hciemu_type);
+ if (!data->hciemu) {
+ tester_warn("Failed to setup HCI emulation");
+ tester_pre_setup_failed();
+ return;
+ }
+
+ tester_print("New hciemu instance created");
+}
+
+static void test_pre_setup(const void *data)
+{
+ struct test_data *test_data = tester_get_data();
+
+ if (!tester_use_debug())
+ fclose(stderr);
+
+ test_data->mgmt = mgmt_new_default();
+ if (!test_data->mgmt) {
+ tester_warn("Failed to setup management interface");
+ tester_pre_setup_failed();
+ return;
+ }
+
+ mgmt_send(test_data->mgmt, MGMT_OP_READ_INDEX_LIST, MGMT_INDEX_NONE, 0,
+ NULL, read_index_list_callback, NULL, NULL);
+}
+
+static void test_post_teardown(const void *data)
+{
+ struct test_data *test_data = tester_get_data();
+
+ if (test_data->hciemu) {
+ hciemu_unref(test_data->hciemu);
+ test_data->hciemu = NULL;
+ }
+}
+
+static void setup(const void *data)
+{
+ tester_setup_failed();
+ test_post_teardown(data);
+}
+
+static void teardown(const void *data)
+{
+ tester_teardown_complete();
+}
+
+static void ipc_send_tc(const void *data)
+{
+}
+
+#define test_generic(name, data, test_setup, test, test_teardown) \
+ do { \
+ struct test_data *user; \
+ user = g_malloc0(sizeof(struct test_data)); \
+ if (!user) \
+ break; \
+ user->hciemu_type = HCIEMU_TYPE_BREDRLE; \
+ tester_add_full(name, data, test_pre_setup, test_setup, \
+ test, test_teardown, test_post_teardown,\
+ 3, user, g_free); \
+ } while (0)
+
+int main(int argc, char *argv[])
+{
+ tester_init(&argc, &argv);
+
+ test_generic("Test Dummy", NULL, setup, ipc_send_tc, teardown);
+
+ return tester_run();
+}
--
1.8.5.2
^ permalink raw reply related
* [PATCHv5 00/11] IPC negative tester
From: Jakub Tyszkowski @ 2014-01-20 9:35 UTC (permalink / raw)
To: linux-bluetooth
Following patchset adds IPC negative tester framework along with test cases
checking IPC's behaviour on daemon side. Expected daemon's behaviour is to
shut down gracefully in case of receiving invalid IPC data.
v2 changes:
* fixed few indentation issues
* fixed missing __attribute__((packed))
* fixed amount of data written for 'malformed data' test case
* fixed opcode for 'invalid service' test case
* added patch(8) with more 'malformed data' cases
v3 changes:
* changed license to GPL
* changed 'ipc-negative-tester' name to 'ipc-tester'
v4 changes:
* fixed typo in first test case and last commit's message
* fixed daemon shutdown handler function
v5 changes:
* added clean up in case of setup failure
* added test execution macro enhancement for easy data creation
* added test cases for core BT interfaces (Patches: 9, 10, 11)
Jakub Tyszkowski (11):
android/ipc-tester: Skeleton for ipc negative tester
android/ipc-tester: Run daemon in separate process
android/ipc-tester: Add IPC initialization
android/ipc-tester: Add daemon shutdown handler
android/ipc-tester: Add sending test data with ipc
android/ipc-tester: Register services
android/ipc-tester: Add basic test cases for IPC's daemon site
android/ipc-tester: Add more cases for malformed data
android/ipc-tester: Add cases for service opcode boundaries
android/ipc-tester: Add cases for Core message data size
android/ipc-tester: Add cases for BT message data size
.gitignore | 1 +
android/Makefile.am | 17 +
android/ipc-tester.c | 868 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 886 insertions(+)
create mode 100644 android/ipc-tester.c
--
1.8.5.2
^ permalink raw reply
* [PATCH SBC 2/2] sbc: Add sbc_init_a2dp to sbc.sym
From: Luiz Augusto von Dentz @ 2014-01-20 9:31 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390210303-22692-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
sbc/sbc.sym | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sbc/sbc.sym b/sbc/sbc.sym
index 3a0c6bf..0c23a05 100644
--- a/sbc/sbc.sym
+++ b/sbc/sbc.sym
@@ -19,3 +19,7 @@ SBC_1.1 {
global:
sbc_init_msbc;
} SBC_1.0;
+SBC_1.2 {
+global:
+ sbc_init_a2dp;
+} SBC_1.1;
--
1.8.4.2
^ permalink raw reply related
* [PATCH SBC 1/2] sbc: Add sbc_init_a2dp
From: Luiz Augusto von Dentz @ 2014-01-20 9:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds sbc_init_a2dp that can be used to convert A2DP configuration to
the internal representation since they are not binary compatible.
---
sbc/sbc.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sbc/sbc.h | 1 +
2 files changed, 139 insertions(+)
diff --git a/sbc/sbc.c b/sbc/sbc.c
index c589217..4483074 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -57,6 +57,55 @@
#define MSBC_SYNCWORD 0xAD
#define MSBC_BLOCKS 15
+#define A2DP_SAMPLING_FREQ_16000 (1 << 3)
+#define A2DP_SAMPLING_FREQ_32000 (1 << 2)
+#define A2DP_SAMPLING_FREQ_44100 (1 << 1)
+#define A2DP_SAMPLING_FREQ_48000 1
+
+#define A2DP_CHANNEL_MODE_MONO (1 << 3)
+#define A2DP_CHANNEL_MODE_DUAL_CHANNEL (1 << 2)
+#define A2DP_CHANNEL_MODE_STEREO (1 << 1)
+#define A2DP_CHANNEL_MODE_JOINT_STEREO 1
+
+#define A2DP_BLOCK_LENGTH_4 (1 << 3)
+#define A2DP_BLOCK_LENGTH_8 (1 << 2)
+#define A2DP_BLOCK_LENGTH_12 (1 << 1)
+#define A2DP_BLOCK_LENGTH_16 1
+
+#define A2DP_SUBBANDS_4 (1 << 1)
+#define A2DP_SUBBANDS_8 1
+
+#define A2DP_ALLOCATION_SNR (1 << 1)
+#define A2DP_ALLOCATION_LOUDNESS 1
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+typedef struct {
+ uint8_t channel_mode:4;
+ uint8_t frequency:4;
+ uint8_t allocation_method:2;
+ uint8_t subbands:2;
+ uint8_t block_length:4;
+ uint8_t min_bitpool;
+ uint8_t max_bitpool;
+} __attribute__ ((packed)) a2dp_sbc_t;
+
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+typedef struct {
+ uint8_t frequency:4;
+ uint8_t channel_mode:4;
+ uint8_t block_length:4;
+ uint8_t subbands:2;
+ uint8_t allocation_method:2;
+ uint8_t min_bitpool;
+ uint8_t max_bitpool;
+} __attribute__ ((packed)) a2dp_sbc_t;
+
+#else
+#error "Unknown byte order"
+#endif
+
/* This structure contains an unpacked SBC frame.
Yes, there is probably quite some unused space herein */
struct sbc_frame {
@@ -1046,6 +1095,95 @@ SBC_EXPORT int sbc_init_msbc(sbc_t *sbc, unsigned long flags)
return 0;
}
+SBC_EXPORT int sbc_init_a2dp(sbc_t *sbc, unsigned long flags, void *data)
+{
+ a2dp_sbc_t *a2dp = data;
+ int err;
+
+ err = sbc_init(sbc, flags);
+ if (err < 0)
+ return err;
+
+ switch (a2dp->frequency) {
+ case A2DP_SAMPLING_FREQ_16000:
+ sbc->frequency = SBC_FREQ_16000;
+ break;
+ case A2DP_SAMPLING_FREQ_32000:
+ sbc->frequency = SBC_FREQ_32000;
+ break;
+ case A2DP_SAMPLING_FREQ_44100:
+ sbc->frequency = SBC_FREQ_44100;
+ break;
+ case A2DP_SAMPLING_FREQ_48000:
+ sbc->frequency = SBC_FREQ_48000;
+ break;
+ default:
+ goto failed;
+ }
+
+ switch (a2dp->channel_mode) {
+ case A2DP_CHANNEL_MODE_MONO:
+ sbc->mode = SBC_MODE_MONO;
+ break;
+ case A2DP_CHANNEL_MODE_DUAL_CHANNEL:
+ sbc->mode = SBC_MODE_DUAL_CHANNEL;
+ break;
+ case A2DP_CHANNEL_MODE_STEREO:
+ sbc->mode = SBC_MODE_STEREO;
+ break;
+ case A2DP_CHANNEL_MODE_JOINT_STEREO:
+ sbc->mode = SBC_MODE_JOINT_STEREO;
+ break;
+ default:
+ goto failed;
+ }
+
+ switch (a2dp->allocation_method) {
+ case A2DP_ALLOCATION_SNR:
+ sbc->allocation = SBC_AM_SNR;
+ break;
+ case A2DP_ALLOCATION_LOUDNESS:
+ sbc->allocation = SBC_AM_LOUDNESS;
+ break;
+ default:
+ goto failed;
+ }
+
+ switch (a2dp->subbands) {
+ case A2DP_SUBBANDS_4:
+ sbc->subbands = SBC_SB_4;
+ break;
+ case A2DP_SUBBANDS_8:
+ sbc->subbands = SBC_SB_8;
+ break;
+ default:
+ goto failed;
+ }
+
+ switch (a2dp->block_length) {
+ case A2DP_BLOCK_LENGTH_4:
+ sbc->blocks = SBC_BLK_4;
+ break;
+ case A2DP_BLOCK_LENGTH_8:
+ sbc->blocks = SBC_BLK_8;
+ break;
+ case A2DP_BLOCK_LENGTH_12:
+ sbc->blocks = SBC_BLK_12;
+ break;
+ case A2DP_BLOCK_LENGTH_16:
+ sbc->blocks = SBC_BLK_16;
+ break;
+ default:
+ goto failed;
+ }
+
+ return 0;
+
+failed:
+ sbc_finish(sbc);
+ return -EINVAL;
+}
+
SBC_EXPORT ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len)
{
return sbc_decode(sbc, input, input_len, NULL, 0, NULL);
diff --git a/sbc/sbc.h b/sbc/sbc.h
index 5f8a1fc..1d1c5a1 100644
--- a/sbc/sbc.h
+++ b/sbc/sbc.h
@@ -84,6 +84,7 @@ typedef struct sbc_struct sbc_t;
int sbc_init(sbc_t *sbc, unsigned long flags);
int sbc_reinit(sbc_t *sbc, unsigned long flags);
int sbc_init_msbc(sbc_t *sbc, unsigned long flags);
+int sbc_init_a2dp(sbc_t *sbc, unsigned long flags, void *data);
ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len);
--
1.8.4.2
^ permalink raw reply related
* [PATCH 3/3] android/pts: Add PTS test results document for AVCTP
From: Jakub Tyszkowski @ 2014-01-20 8:54 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390208087-22838-1-git-send-email-jakub.tyszkowski@tieto.com>
This will allow for better tracking of current state of implementation.
---
android/Makefile.am | 1 +
android/pts-avctp.txt | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100644 android/pts-avctp.txt
diff --git a/android/Makefile.am b/android/Makefile.am
index 9020a46..924917a 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -169,4 +169,5 @@ EXTRA_DIST += android/Android.mk android/README \
android/pts-map.txt \
android/pts-a2dp.txt \
android/pts-avrcp.txt \
+ android/pts-avctp.txt \
android/pts-pbap.txt
diff --git a/android/pts-avctp.txt b/android/pts-avctp.txt
new file mode 100644
index 0000000..c057a10
--- /dev/null
+++ b/android/pts-avctp.txt
@@ -0,0 +1,41 @@
+PTS test results for AVCTP
+
+PTS version: 5.0
+Tested: --not yet tested--
+
+Results:
+PASS test passed
+FAIL test failed
+INC test is inconclusive
+N/A test is disabled due to PICS setup
+
+ Controller (CT)
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_CT_CCM_BV_01_C N/A
+TC_CT_CCM_BV_02_C N/A
+TC_CT_CCM_BV_03_C N/A
+TC_CT_CCM_BV_04_C N/A
+TC_CT_CCM_BI_01_C N/A
+TC_CT_NFR_BV_01_C N/A
+TC_CT_NFR_BV_04_C N/A
+TC_CT_FRA_BV_01_C N/A
+TC_CT_FRA_BV_04_C N/A
+-------------------------------------------------------------------------------
+
+
+ Target (TG)
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_TG_CCM_BV_01_C INC
+TC_TG_CCM_BV_02_C INC
+TC_TG_CCM_BV_03_C INC
+TC_TG_CCM_BV_04_C INC
+TC_TG_NFR_BV_02_C INC
+TC_TG_NFR_BV_03_C INC
+TC_TG_NFR_BI_01_C INC
+TC_TG_FRA_BV_02_C INC
+TC_TG_FRA_BV_03_C INC
+-------------------------------------------------------------------------------
--
1.8.5.2
^ permalink raw reply related
* [PATCH 2/3] android/pts: Add PTS test results document for AVRCP
From: Jakub Tyszkowski @ 2014-01-20 8:54 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390208087-22838-1-git-send-email-jakub.tyszkowski@tieto.com>
This will allow for better tracking of current state of implementation.
---
android/Makefile.am | 1 +
android/pts-avrcp.txt | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 195 insertions(+)
create mode 100644 android/pts-avrcp.txt
diff --git a/android/Makefile.am b/android/Makefile.am
index d4508a4..9020a46 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -168,4 +168,5 @@ EXTRA_DIST += android/Android.mk android/README \
android/pts-opp.txt \
android/pts-map.txt \
android/pts-a2dp.txt \
+ android/pts-avrcp.txt \
android/pts-pbap.txt
diff --git a/android/pts-avrcp.txt b/android/pts-avrcp.txt
new file mode 100644
index 0000000..f2533b4
--- /dev/null
+++ b/android/pts-avrcp.txt
@@ -0,0 +1,194 @@
+PTS test results for AVRCP
+
+PTS version: 5.0
+Tested: --not yet tested--
+
+Results:
+PASS test passed
+FAIL test failed
+INC test is inconclusive
+N/A test is disabled due to PICS setup
+
+ Controller (CT)
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_CT_BGN_BV_01_I N/A
+TC_CT_BGN_BV_02_I N/A
+TC_CT_CEC_BV_01_I N/A
+TC_CT_CEC_BV_02_I N/A
+TC_CT_CFG_BV_01_C N/A
+TC_CT_CON_BV_01_C N/A
+TC_CT_CON_BV_03_C N/A
+TC_CT_CRC_BV_01_I N/A
+TC_CT_CRC_BV_02_I N/A
+TC_CT_ICC_BV_01_I N/A
+TC_CT_ICC_BV_02_I N/A
+TC_CT_MCN_CB_BV_01_C N/A
+TC_CT_MCN_CB_BV_01_I N/A
+TC_CT_MCN_CB_BV_02_I N/A
+TC_CT_MCN_CB_BV_03_I N/A
+TC_CT_MCN_CB_BV_04_C N/A
+TC_CT_MCN_CB_BV_04_I N/A
+TC_CT_MCN_CB_BV_05_I N/A
+TC_CT_MCN_CB_BV_06_I N/A
+TC_CT_MCN_CB_BV_07_C N/A
+TC_CT_MCN_CB_BV_07_I N/A
+TC_CT_MCN_NP_BV_01_C N/A
+TC_CT_MCN_NP_BV_01_I N/A
+TC_CT_MCN_NP_BV_02_I N/A
+TC_CT_MCN_NP_BV_03_C N/A
+TC_CT_MCN_NP_BV_03_I N/A
+TC_CT_MCN_NP_BV_04_I N/A
+TC_CT_MCN_NP_BV_05_C N/A
+TC_CT_MCN_NP_BV_05_I N/A
+TC_CT_MCN_NP_BV_06_I N/A
+TC_CT_MCN_NP_BV_07_I N/A
+TC_CT_MCN_NP_BV_08_C N/A
+TC_CT_MCN_SRC_BV_01_C N/A
+TC_CT_MCN_SRC_BV_01_I N/A
+TC_CT_MCN_SRC_BV_02_I N/A
+TC_CT_MCN_SRC_BV_03_C N/A
+TC_CT_MCN_SRC_BV_03_I N/A
+TC_CT_MCN_SRC_BV_04_I N/A
+TC_CT_MCN_SRC_BV_05_C N/A
+TC_CT_MDI_BV_01_C N/A
+TC_CT_MDI_BV_03_C N/A
+TC_CT_MPS_BV_01_C N/A
+TC_CT_MPS_BV_01_I N/A
+TC_CT_MPS_BV_02_I N/A
+TC_CT_MPS_BV_03_C N/A
+TC_CT_MPS_BV_03_I N/A
+TC_CT_MPS_BV_08_C N/A
+TC_CT_NFY_BV_01_C N/A
+TC_CT_PAS_BV_01_C N/A
+TC_CT_PAS_BV_03_C N/A
+TC_CT_PAS_BV_05_C N/A
+TC_CT_PAS_BV_07_C N/A
+TC_CT_PAS_BV_09_C N/A
+TC_CT_PAS_BV_11_C N/A
+TC_CT_PTH_BV_01_C N/A
+TC_CT_PTH_BV_02_C N/A
+TC_CT_PTT_BV_01_I N/A
+TC_CT_PTT_BV_02_I N/A
+TC_CT_PTT_BV_03_I N/A
+TC_CT_PTT_BV_04_I N/A
+TC_CT_PTT_BV_05_I N/A
+TC_CT_RCR_BV_01_C N/A
+TC_CT_RCR_BV_03_C N/A
+TC_CT_VLH_BI_03_C N/A
+TC_CT_VLH_BI_04_C N/A
+TC_CT_VLH_BV_01_C N/A
+TC_CT_VLH_BV_01_I N/A
+TC_CT_VLH_BV_02_I N/A
+TC_CT_VLH_BV_03_C N/A
+-------------------------------------------------------------------------------
+
+
+ Target (TG)
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_TG_BGN_BV_01_I N/A
+TC_TG_BGN_BV_02_I N/A
+TC_TG_CEC_BV_01_I INC
+TC_TG_CEC_BV_02_I INC
+TC_TG_CFG_BI_01_C INC
+TC_TG_CFG_BV_02_C INC
+TC_TG_CON_BV_02_C N/A
+TC_TG_CON_BV_04_C N/A
+TC_TG_CON_BV_05_C N/A
+TC_TG_CRC_BV_01_I INC
+TC_TG_CRC_BV_02_I INC
+TC_TG_ICC_BV_01_I INC
+TC_TG_ICC_BV_02_I INC
+TC_TG_INV_BI_01_C INC
+TC_TG_INV_BI_02_C N/A
+TC_TG_MCN_CB_BI_01_C N/A
+TC_TG_MCN_CB_BI_02_C N/A
+TC_TG_MCN_CB_BI_03_C N/A
+TC_TG_MCN_CB_BI_04_C N/A
+TC_TG_MCN_CB_BI_05_C N/A
+TC_TG_MCN_CB_BV_01_I N/A
+TC_TG_MCN_CB_BV_02_C N/A
+TC_TG_MCN_CB_BV_02_I N/A
+TC_TG_MCN_CB_BV_03_C N/A
+TC_TG_MCN_CB_BV_03_I N/A
+TC_TG_MCN_CB_BV_04_I N/A
+TC_TG_MCN_CB_BV_05_C N/A
+TC_TG_MCN_CB_BV_05_I N/A
+TC_TG_MCN_CB_BV_06_C N/A
+TC_TG_MCN_CB_BV_06_I N/A
+TC_TG_MCN_CB_BV_07_I N/A
+TC_TG_MCN_CB_BV_08_C N/A
+TC_TG_MCN_CB_BV_09_C N/A
+TC_TG_MCN_CB_BV_10_C N/A
+TC_TG_MCN_CB_BV_11_C N/A
+TC_TG_MCN_NP_BI_01_C N/A
+TC_TG_MCN_NP_BI_02_C N/A
+TC_TG_MCN_NP_BV_01_I N/A
+TC_TG_MCN_NP_BV_02_C N/A
+TC_TG_MCN_NP_BV_02_I N/A
+TC_TG_MCN_NP_BV_03_I N/A
+TC_TG_MCN_NP_BV_04_C N/A
+TC_TG_MCN_NP_BV_04_I N/A
+TC_TG_MCN_NP_BV_05_I N/A
+TC_TG_MCN_NP_BV_06_C N/A
+TC_TG_MCN_NP_BV_06_I N/A
+TC_TG_MCN_NP_BV_07_C N/A
+TC_TG_MCN_NP_BV_07_I N/A
+TC_TG_MCN_NP_BV_09_C N/A
+TC_TG_MCN_SRC_BV_01_I N/A
+TC_TG_MCN_SRC_BV_02_C N/A
+TC_TG_MCN_SRC_BV_02_I N/A
+TC_TG_MCN_SRC_BV_03_I N/A
+TC_TG_MCN_SRC_BV_04_C N/A
+TC_TG_MCN_SRC_BV_04_I N/A
+TC_TG_MCN_SRC_BV_06_C N/A
+TC_TG_MDI_BV_02_C INC
+TC_TG_MDI_BV_04_C INC
+TC_TG_MDI_BV_05_C INC
+TC_TG_MPS_BI_01_C N/A
+TC_TG_MPS_BI_02_C N/A
+TC_TG_MPS_BV_01_I N/A
+TC_TG_MPS_BV_02_C N/A
+TC_TG_MPS_BV_02_I N/A
+TC_TG_MPS_BV_03_I N/A
+TC_TG_MPS_BV_04_C N/A
+TC_TG_MPS_BV_05_C N/A
+TC_TG_MPS_BV_06_C N/A
+TC_TG_MPS_BV_07_C N/A
+TC_TG_MPS_BV_09_C N/A
+TC_TG_MPS_BV_10_C N/A
+TC_TG_NFY_BI_01_C INC
+TC_TG_NFY_BV_02_C INC
+TC_TG_NFY_BV_03_C N/A
+TC_TG_NFY_BV_04_C INC
+TC_TG_NFY_BV_05_C INC
+TC_TG_NFY_BV_06_C N/A
+TC_TG_NFY_BV_07_C N/A
+TC_TG_NFY_BV_08_C INC
+TC_TG_PAS_BI_01_C N/A
+TC_TG_PAS_BI_02_C N/A
+TC_TG_PAS_BI_03_C N/A
+TC_TG_PAS_BI_04_C N/A
+TC_TG_PAS_BI_05_C N/A
+TC_TG_PAS_BV_02_C N/A
+TC_TG_PAS_BV_04_C N/A
+TC_TG_PAS_BV_06_C N/A
+TC_TG_PAS_BV_08_C N/A
+TC_TG_PAS_BV_10_C N/A
+TC_TG_PTT_BV_01_I INC
+TC_TG_PTT_BV_02_I N/A
+TC_TG_PTT_BV_03_I N/A
+TC_TG_PTT_BV_04_I N/A
+TC_TG_PTT_BV_05_I N/A
+TC_TG_RCR_BV_02_C INC
+TC_TG_RCR_BV_04_C INC
+TC_TG_VLH_BI_01_C N/A
+TC_TG_VLH_BI_02_C N/A
+TC_TG_VLH_BV_01_I N/A
+TC_TG_VLH_BV_02_C N/A
+TC_TG_VLH_BV_02_I N/A
+TC_TG_VLH_BV_04_C N/A
+-------------------------------------------------------------------------------
--
1.8.5.2
^ permalink raw reply related
* [PATCH 1/3] android/pts: Add PTS test results document for A2DP
From: Jakub Tyszkowski @ 2014-01-20 8:54 UTC (permalink / raw)
To: linux-bluetooth
This will allow for better tracking of current state of implementation.
---
android/Makefile.am | 1 +
android/pts-a2dp.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
create mode 100644 android/pts-a2dp.txt
diff --git a/android/Makefile.am b/android/Makefile.am
index f24b754..d4508a4 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -167,4 +167,5 @@ EXTRA_DIST += android/Android.mk android/README \
android/pts-hid.txt \
android/pts-opp.txt \
android/pts-map.txt \
+ android/pts-a2dp.txt \
android/pts-pbap.txt
diff --git a/android/pts-a2dp.txt b/android/pts-a2dp.txt
new file mode 100644
index 0000000..a269ec1
--- /dev/null
+++ b/android/pts-a2dp.txt
@@ -0,0 +1,57 @@
+PTS test results for A2DP
+
+PTS version: 5.0
+Tested: --not yet tested--
+
+Results:
+PASS test passed
+FAIL test failed
+INC test is inconclusive
+N/A test is disabled due to PICS setup
+
+ Source (SRC)
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_SRC_CC_BV_09_I INC
+TC_SRC_CC_BV_10_I N/A
+TC_SRC_REL_BV_01_I INC
+TC_SRC_REL_BV_02_I INC
+TC_SRC_SET_BV_01_I INC
+TC_SRC_SET_BV_02_I INC
+TC_SRC_SET_BV_03_I INC
+TC_SRC_SET_BV_04_I INC
+TC_SRC_SET_BV_05_I INC
+TC_SRC_SET_BV_06_I INC
+TC_SRC_SUS_BV_01_I INC
+TC_SRC_SUS_BV_02_I INC
+TC_SRC_SDP_BV_01_I INC
+TC_SRC_AS_BV_01_I INC
+-------------------------------------------------------------------------------
+
+
+ Sink (SNK)
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_SNK_CC_BV_01_I N/A
+TC_SNK_CC_BV_02_I N/A
+TC_SNK_CC_BV_03_I N/A
+TC_SNK_CC_BV_04_I N/A
+TC_SNK_CC_BV_05_I N/A
+TC_SNK_CC_BV_06_I N/A
+TC_SNK_CC_BV_07_I N/A
+TC_SNK_CC_BV_08_I N/A
+TC_SNK_REL_BV_01_I N/A
+TC_SNK_REL_BV_02_I N/A
+TC_SNK_SET_BV_01_I N/A
+TC_SNK_SET_BV_02_I N/A
+TC_SNK_SET_BV_03_I N/A
+TC_SNK_SET_BV_04_I N/A
+TC_SNK_SET_BV_05_I N/A
+TC_SNK_SET_BV_06_I N/A
+TC_SNK_SUS_BV_01_I N/A
+TC_SNK_SUS_BV_02_I N/A
+TC_SNK_SDP_BV_02_I N/A
+TC_SNK_AS_BV_01_I N/A
+-------------------------------------------------------------------------------
--
1.8.5.2
^ permalink raw reply related
* Re: [PATCH v3 0/4] Regression fixes for rfcomm/tty.c
From: Alexander Holler @ 2014-01-20 8:34 UTC (permalink / raw)
To: Marcel Holtmann, Gianluca Anzolin
Cc: Gustavo F. Padovan, peter,
linux-bluetooth@vger.kernel.org development, Greg KH, jslaby,
stable
In-Reply-To: <53C8DDF7-94EA-4E01-A2A9-C366F9F85530@holtmann.org>
Am 06.01.2014 22:57, schrieb Marcel Holtmann:
> all 4 patches have been applied to bluetooth-next tree.
Maybe a bit late, but I've just seen they miss a Cc:
stable@vger.kernel.org to automatically end up in 3.12 and 3.13 too.
Regards,
Alexander Holler
^ permalink raw reply
* Re: [PATCH 3/3] input: Add DualShock 4 detection
From: Frank Praznik @ 2014-01-20 4:37 UTC (permalink / raw)
To: Szymon Janc, David Herrmann
Cc: linux-bluetooth@vger.kernel.org, Simon Wood, Frank Praznik
In-Reply-To: <1572567.ZoR782tNKQ@athlon>
On 1/18/2014 10:13, Szymon Janc wrote:
> Hi,
>
> On Saturday 18 January 2014 16:05:26 David Herrmann wrote:
>> Hi
>>
>> @Simon and Frank:
>> This patch might help fix your DS4 issues.
>>
>> Cheers
>> David
> Just for clarification, this does not add DS4 support, just detection for it
> in input server. There is some problem with getting SDP records from DS4 by
> bluetoothd (works with sdptool) which prevents idev from being created.
>
> I'm working on fixing this, but no ETA yet.
>
With this and the IMTU patch I was able to get my controller paired. I
played around with it and from watching the traffic in btmon, there are
still two issues that are stopping full two way communications:
1. The Dualshock 4 sends communications to the host on PSM 19, but will
only receive packets on PSM 17. Currently the bluetooth stack is trying
to send data to the controller on PSM 19 so the data packets still
aren't reaching the it.
2. The hidp layer always assigns a report type of 0xA2 (HIDP_TRANS_DATA
| HIDP_DATA_RTYPE_OUTPUT) to every HIDP_OUTPUT_REPORT. The Dualshock 4
only accepts reports with type 0x52 (HIDP_TRANS_SEND_REPORT |
HIDP_DATA_RTYPE_OUTPUT). I was able to work around this with a kludge
in net/bluetooth/hidp/core.c to catch the Dualshock 4 packets and use
the value that the controller wants, but I don't think anyone wants a
device-specific hack in a core protocol file. Unfortunately, there
seems to be no elegant way to work around this.
^ permalink raw reply
* Re: linux-firmware: pull-request Marvell mwifiex-firmware 2014-01-09
From: Ben Hutchings @ 2014-01-20 2:57 UTC (permalink / raw)
To: Bing Zhao
Cc: linux-wireless@vger.kernel.org, linux-bluetooth@vger.kernel.org,
Frank Huang
In-Reply-To: <477F20668A386D41ADCC57781B1F70430F53691E15@SC-VEXCH1.marvell.com>
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
On Sun, 2014-01-19 at 18:10 -0800, Bing Zhao wrote:
> Hi Ben,
>
> > > @@ -730,10 +730,13 @@ File: mrvl/sd8797_uapsta.bin
> > > Version: 14.66.11.p151
> > >
> > > File: mrvl/sd8897_uapsta.bin
> > > -Version: 15.69.2.p11
> > > +Version: 15.68.201.p113
> > >
> > > File: mrvl/usb8797_uapsta.bin
> > > -Version: 14.69.11.p179
> > > +Version: 14.68.29.p26
> > [...]
> >
> > Why are these updates rolling the version number backward? Did the
> > later versions cause regressions?
>
> These images are newer firmware versions actually.
>
> The 2nd (69 or 68) and 3rd (11 or 29) numbers in the version string do
> not necessarily mean the version increasing or decreasing. Only when
> first 3 numbers are fixed, a smaller 4th number will mean that the
> version is rolling backward. For examples,
So what do you they mean and why are they in the version number?
> File: mrvl/sd8797_uapsta.bin
> -Version: 14.66.11.p100
> +Version: 14.66.11.p151
>
> The version is moving forward.
>
> But if we do,
>
> -Version: 14.66.11.p100
> +Version: 14.66.11.p99
>
> this will be rolling backward.
>
>
> Each firmware image contains a timestamp such as "2013/12/06, 21:28:31".
> If you think that is informative I can add the timestamps in commit
> logs and resend the pull request.
I don't think it is.
Ben.
--
Ben Hutchings
One of the nice things about standards is that there are so many of them.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: linux-firmware: pull-request Marvell mwifiex-firmware 2014-01-09
From: James Cameron @ 2014-01-20 2:22 UTC (permalink / raw)
To: Bing Zhao
Cc: Ben Hutchings, linux-wireless@vger.kernel.org,
linux-bluetooth@vger.kernel.org, Frank Huang
In-Reply-To: <477F20668A386D41ADCC57781B1F70430F53691E15@SC-VEXCH1.marvell.com>
On Sun, Jan 19, 2014 at 06:10:03PM -0800, Bing Zhao wrote:
> The 2nd (69 or 68) and 3rd (11 or 29) numbers in the version string
> do not necessarily mean the version increasing or decreasing. Only
> when first 3 numbers are fixed, a smaller 4th number will mean that
> the version is rolling backward.
Ah, light dawns. I've been dealing with these version numbers for
years now, for 8388, 8686 and 8787, and I didn't know that. Is this
documented anywhere else? Have the 2nd and 3rd numbers any meaning or
are they random?
--
James Cameron
http://quozl.linux.org.au/
^ permalink raw reply
* RE: linux-firmware: pull-request Marvell mwifiex-firmware 2014-01-09
From: Bing Zhao @ 2014-01-20 2:10 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-wireless@vger.kernel.org, linux-bluetooth@vger.kernel.org,
Frank Huang
In-Reply-To: <1390174797.3651.7.camel@deadeye.wl.decadent.org.uk>
SGkgQmVuLA0KDQo+ID4gQEAgLTczMCwxMCArNzMwLDEzIEBAIEZpbGU6IG1ydmwvc2Q4Nzk3X3Vh
cHN0YS5iaW4NCj4gPiAgVmVyc2lvbjogMTQuNjYuMTEucDE1MQ0KPiA+DQo+ID4gIEZpbGU6IG1y
dmwvc2Q4ODk3X3VhcHN0YS5iaW4NCj4gPiAtVmVyc2lvbjogMTUuNjkuMi5wMTENCj4gPiArVmVy
c2lvbjogMTUuNjguMjAxLnAxMTMNCj4gPg0KPiA+ICBGaWxlOiBtcnZsL3VzYjg3OTdfdWFwc3Rh
LmJpbg0KPiA+IC1WZXJzaW9uOiAxNC42OS4xMS5wMTc5DQo+ID4gK1ZlcnNpb246IDE0LjY4LjI5
LnAyNg0KPiBbLi4uXQ0KPiANCj4gV2h5IGFyZSB0aGVzZSB1cGRhdGVzIHJvbGxpbmcgdGhlIHZl
cnNpb24gbnVtYmVyIGJhY2t3YXJkPyAgRGlkIHRoZQ0KPiBsYXRlciB2ZXJzaW9ucyBjYXVzZSBy
ZWdyZXNzaW9ucz8NCg0KVGhlc2UgaW1hZ2VzIGFyZSBuZXdlciBmaXJtd2FyZSB2ZXJzaW9ucyBh
Y3R1YWxseS4NCg0KVGhlIDJuZCAoNjkgb3IgNjgpIGFuZCAzcmQgKDExIG9yIDI5KSBudW1iZXJz
IGluIHRoZSB2ZXJzaW9uIHN0cmluZyBkbyBub3QgbmVjZXNzYXJpbHkgbWVhbiB0aGUgdmVyc2lv
biBpbmNyZWFzaW5nIG9yIGRlY3JlYXNpbmcuIE9ubHkgd2hlbiBmaXJzdCAzIG51bWJlcnMgYXJl
IGZpeGVkLCBhIHNtYWxsZXIgNHRoIG51bWJlciB3aWxsIG1lYW4gdGhhdCB0aGUgdmVyc2lvbiBp
cyByb2xsaW5nIGJhY2t3YXJkLiBGb3IgZXhhbXBsZXMsDQoNCkZpbGU6IG1ydmwvc2Q4Nzk3X3Vh
cHN0YS5iaW4NCi1WZXJzaW9uOiAxNC42Ni4xMS5wMTAwDQorVmVyc2lvbjogMTQuNjYuMTEucDE1
MQ0KDQpUaGUgdmVyc2lvbiBpcyBtb3ZpbmcgZm9yd2FyZC4NCg0KQnV0IGlmIHdlIGRvLA0KDQot
VmVyc2lvbjogMTQuNjYuMTEucDEwMA0KK1ZlcnNpb246IDE0LjY2LjExLnA5OQ0KDQp0aGlzIHdp
bGwgYmUgcm9sbGluZyBiYWNrd2FyZC4NCg0KDQpFYWNoIGZpcm13YXJlIGltYWdlIGNvbnRhaW5z
IGEgdGltZXN0YW1wIHN1Y2ggYXMgIjIwMTMvMTIvMDYsIDIxOjI4OjMxIi4NCklmIHlvdSB0aGlu
ayB0aGF0IGlzIGluZm9ybWF0aXZlIEkgY2FuIGFkZCB0aGUgdGltZXN0YW1wcyBpbiBjb21taXQg
bG9ncyBhbmQgcmVzZW5kIHRoZSBwdWxsIHJlcXVlc3QuDQoNClRoYW5rcywNCkJpbmcNCg0K
^ permalink raw reply
* [PATCH 5/5] device: Match Dualshock4 with name and class
From: Szymon Janc @ 2014-01-20 0:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1390177914-13529-1-git-send-email-szymon.janc@gmail.com>
This allows to use DS4 with legacy adapters. This seems to require
general bonding to work correctly i.e. after dedicated bonding
connection is rejected with "Authentication Failure" error.
---
src/device.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/device.c b/src/device.c
index 6ae14b2..43d5876 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3513,6 +3513,14 @@ static uint16_t get_sdp_flags(struct btd_device *device)
if (vid == 0x054c && pid == 0x05c4)
return SDP_DOUBLE_IMTU;
+ if (btd_adapter_ssp_enabled(device->adapter))
+ return 0;
+
+ /* if no EIR try matching Sony DualShock 4 with name and class */
+ if (!strncmp(device->name, "Wireless Controller", MAX_NAME_LENGTH) &&
+ device->class == 0x2508)
+ return SDP_DOUBLE_IMTU;
+
return 0;
}
--
1.8.5.3
^ permalink raw reply related
* [PATCH 4/5] device: Add workaround for Sony Dualshock 4 broken SDP
From: Szymon Janc @ 2014-01-20 0:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1390177914-13529-1-git-send-email-szymon.janc@gmail.com>
Sony DualShock 4 is not respecting negotiated L2CAP IMTU. This might
results in SDP response being dropped by kernel. Workaround this by
forcing SDP code to use bigger IMTU while connecting.
---
src/device.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index 1bd27a1..6ae14b2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -118,6 +118,7 @@ struct browse_req {
int search_uuid;
int reconnect_attempt;
guint listener_id;
+ uint16_t sdp_flags;
};
struct included_search {
@@ -2971,7 +2972,8 @@ static void browse_cb(sdp_list_t *recs, int err, gpointer user_data)
sdp_uuid16_create(&uuid, uuid_list[req->search_uuid++]);
bt_search_service(btd_adapter_get_address(adapter),
&device->bdaddr, &uuid,
- browse_cb, user_data, NULL, 0);
+ browse_cb, user_data, NULL,
+ req->sdp_flags);
return;
}
@@ -3498,6 +3500,22 @@ done:
return 0;
}
+static uint16_t get_sdp_flags(struct btd_device *device)
+{
+ uint16_t vid, pid;
+
+ vid = btd_device_get_vendor(device);
+ pid = btd_device_get_product(device);
+
+ /* Sony DualShock 4 is not respecting negotiated L2CAP IMTU. This might
+ * results in SDP response being dropped by kernel. Workaround this by
+ * forcing SDP code to use bigger IMTU while connecting. */
+ if (vid == 0x054c && pid == 0x05c4)
+ return SDP_DOUBLE_IMTU;
+
+ return 0;
+}
+
static int device_browse_sdp(struct btd_device *device, DBusMessage *msg)
{
struct btd_adapter *adapter = device->adapter;
@@ -3512,9 +3530,11 @@ static int device_browse_sdp(struct btd_device *device, DBusMessage *msg)
req->device = device;
sdp_uuid16_create(&uuid, uuid_list[req->search_uuid++]);
+ req->sdp_flags = get_sdp_flags(device);
+
err = bt_search_service(btd_adapter_get_address(adapter),
&device->bdaddr, &uuid, browse_cb, req, NULL,
- 0);
+ req->sdp_flags);
if (err < 0) {
browse_request_free(req);
return err;
--
1.8.5.3
^ permalink raw reply related
* [PATCH 3/5] core: Add flags parameter to bt_search_service
From: Szymon Janc @ 2014-01-20 0:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1390177914-13529-1-git-send-email-szymon.janc@gmail.com>
This allows to pass custom SDP flags to sdp_connect.
---
android/bluetooth.c | 4 ++--
android/hidhost.c | 4 ++--
android/socket.c | 2 +-
profiles/health/hdp_util.c | 6 +++---
src/device.c | 5 +++--
src/profile.c | 2 +-
src/sdp-client.c | 8 ++++----
src/sdp-client.h | 2 +-
8 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/android/bluetooth.c b/android/bluetooth.c
index 17a8def..d320c54 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -693,7 +693,7 @@ static void browse_cb(sdp_list_t *recs, int err, gpointer user_data)
if (uuid_list[req->search_uuid]) {
sdp_uuid16_create(&uuid, uuid_list[req->search_uuid++]);
bt_search_service(&adapter.bdaddr, &req->bdaddr, &uuid,
- browse_cb, user_data, NULL);
+ browse_cb, user_data, NULL, 0);
return;
}
@@ -729,7 +729,7 @@ static uint8_t browse_remote_sdp(const bdaddr_t *addr)
sdp_uuid16_create(&uuid, uuid_list[req->search_uuid++]);
if (bt_search_service(&adapter.bdaddr,
- &req->bdaddr, &uuid, browse_cb, req, NULL) < 0) {
+ &req->bdaddr, &uuid, browse_cb, req, NULL , 0) < 0) {
browse_req_free(req);
return HAL_STATUS_FAILED;
}
diff --git a/android/hidhost.c b/android/hidhost.c
index aed9899..d66e863 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -751,7 +751,7 @@ static void bt_hid_connect(const void *buf, uint16_t len)
bt_string2uuid(&uuid, HID_UUID);
if (bt_search_service(&adapter_addr, &dev->dst, &uuid,
- hid_sdp_search_cb, dev, NULL) < 0) {
+ hid_sdp_search_cb, dev, NULL, 0) < 0) {
error("Failed to search sdp details");
hid_device_free(dev);
status = HAL_STATUS_FAILED;
@@ -1254,7 +1254,7 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
bt_string2uuid(&uuid, HID_UUID);
if (bt_search_service(&src, &dev->dst, &uuid,
- hid_sdp_search_cb, dev, NULL) < 0) {
+ hid_sdp_search_cb, dev, NULL, 0) < 0) {
error("failed to search sdp details");
hid_device_free(dev);
return;
diff --git a/android/socket.c b/android/socket.c
index 69b39ee..f662e79 100644
--- a/android/socket.c
+++ b/android/socket.c
@@ -1091,7 +1091,7 @@ static uint8_t connect_rfcomm(const bdaddr_t *addr, int chan,
rfsock->profile = get_profile_by_uuid(uuid);
if (bt_search_service(&adapter_addr, &rfsock->dst, &uu,
- sdp_search_cb, rfsock, NULL) < 0) {
+ sdp_search_cb, rfsock, NULL, 0) < 0) {
error("Failed to search SDP records");
goto failed;
}
diff --git a/profiles/health/hdp_util.c b/profiles/health/hdp_util.c
index 7de87a8..b9a09e9 100644
--- a/profiles/health/hdp_util.c
+++ b/profiles/health/hdp_util.c
@@ -864,7 +864,7 @@ gboolean hdp_get_mdep(struct hdp_device *device, struct hdp_application *app,
bt_string2uuid(&uuid, HDP_UUID);
if (bt_search_service(src, dst, &uuid, get_mdep_cb, mdep_data,
- free_mdep_data) < 0) {
+ free_mdep_data, 0) < 0) {
g_set_error(err, HDP_ERROR, HDP_CONNECTION_ERROR,
"Can't get remote SDP record");
g_free(mdep_data);
@@ -1092,7 +1092,7 @@ gboolean hdp_establish_mcl(struct hdp_device *device,
bt_string2uuid(&uuid, HDP_UUID);
if (bt_search_service(src, dst, &uuid, search_cb, conn_data,
- destroy_con_mcl_data) < 0) {
+ destroy_con_mcl_data, 0) < 0) {
g_set_error(err, HDP_ERROR, HDP_CONNECTION_ERROR,
"Can't get remote SDP record");
g_free(conn_data);
@@ -1161,7 +1161,7 @@ gboolean hdp_get_dcpsm(struct hdp_device *device, hdp_continue_dcpsm_f func,
bt_string2uuid(&uuid, HDP_UUID);
if (bt_search_service(src, dst, &uuid, get_dcpsm_cb, dcpsm_data,
- free_dcpsm_data) < 0) {
+ free_dcpsm_data, 0) < 0) {
g_set_error(err, HDP_ERROR, HDP_CONNECTION_ERROR,
"Can't get remote SDP record");
g_free(dcpsm_data);
diff --git a/src/device.c b/src/device.c
index bcc5561..1bd27a1 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2971,7 +2971,7 @@ static void browse_cb(sdp_list_t *recs, int err, gpointer user_data)
sdp_uuid16_create(&uuid, uuid_list[req->search_uuid++]);
bt_search_service(btd_adapter_get_address(adapter),
&device->bdaddr, &uuid,
- browse_cb, user_data, NULL);
+ browse_cb, user_data, NULL, 0);
return;
}
@@ -3513,7 +3513,8 @@ static int device_browse_sdp(struct btd_device *device, DBusMessage *msg)
sdp_uuid16_create(&uuid, uuid_list[req->search_uuid++]);
err = bt_search_service(btd_adapter_get_address(adapter),
- &device->bdaddr, &uuid, browse_cb, req, NULL);
+ &device->bdaddr, &uuid, browse_cb, req, NULL,
+ 0);
if (err < 0) {
browse_request_free(req);
return err;
diff --git a/src/profile.c b/src/profile.c
index 3c0d27c..e833181 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -1605,7 +1605,7 @@ static int resolve_service(struct ext_io *conn, const bdaddr_t *src,
bt_string2uuid(&uuid, ext->remote_uuid);
sdp_uuid128_to_uuid(&uuid);
- err = bt_search_service(src, dst, &uuid, record_cb, conn, NULL);
+ err = bt_search_service(src, dst, &uuid, record_cb, conn, NULL, 0);
if (err == 0)
conn->resolving = true;
diff --git a/src/sdp-client.c b/src/sdp-client.c
index 0599626..ff06b4d 100644
--- a/src/sdp-client.c
+++ b/src/sdp-client.c
@@ -264,7 +264,7 @@ failed:
static int create_search_context(struct search_context **ctxt,
const bdaddr_t *src,
const bdaddr_t *dst,
- uuid_t *uuid)
+ uuid_t *uuid, uint16_t flags)
{
sdp_session_t *s;
GIOChannel *chan;
@@ -276,7 +276,7 @@ static int create_search_context(struct search_context **ctxt,
s = get_cached_sdp_session(src, dst);
if (!s)
- s = sdp_connect(src, dst, SDP_NON_BLOCKING);
+ s = sdp_connect(src, dst, SDP_NON_BLOCKING | flags);
if (!s)
return -errno;
@@ -311,7 +311,7 @@ static int create_search_context(struct search_context **ctxt,
int bt_search_service(const bdaddr_t *src, const bdaddr_t *dst,
uuid_t *uuid, bt_callback_t cb, void *user_data,
- bt_destroy_t destroy)
+ bt_destroy_t destroy, uint16_t flags)
{
struct search_context *ctxt = NULL;
int err;
@@ -319,7 +319,7 @@ int bt_search_service(const bdaddr_t *src, const bdaddr_t *dst,
if (!cb)
return -EINVAL;
- err = create_search_context(&ctxt, src, dst, uuid);
+ err = create_search_context(&ctxt, src, dst, uuid, flags);
if (err < 0)
return err;
diff --git a/src/sdp-client.h b/src/sdp-client.h
index 9191594..9aa5a4d 100644
--- a/src/sdp-client.h
+++ b/src/sdp-client.h
@@ -26,6 +26,6 @@ typedef void (*bt_destroy_t) (gpointer user_data);
int bt_search_service(const bdaddr_t *src, const bdaddr_t *dst,
uuid_t *uuid, bt_callback_t cb, void *user_data,
- bt_destroy_t destroy);
+ bt_destroy_t destroy, uint16_t flags);
int bt_cancel_discovery(const bdaddr_t *src, const bdaddr_t *dst);
void bt_clear_cached_session(const bdaddr_t *src, const bdaddr_t *dst);
--
1.8.5.3
^ permalink raw reply related
* [PATCH 2/5] core: Opencode get_sdp_session in sdp-client
From: Szymon Janc @ 2014-01-20 0:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1390177914-13529-1-git-send-email-szymon.janc@gmail.com>
This is only used once and provides no benefit compared to opencoding.
---
src/sdp-client.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/sdp-client.c b/src/sdp-client.c
index 51f3048..0599626 100644
--- a/src/sdp-client.c
+++ b/src/sdp-client.c
@@ -86,17 +86,6 @@ static sdp_session_t *get_cached_sdp_session(const bdaddr_t *src, const bdaddr_t
return NULL;
}
-static sdp_session_t *get_sdp_session(const bdaddr_t *src, const bdaddr_t *dst)
-{
- sdp_session_t *session;
-
- session = get_cached_sdp_session(src, dst);
- if (session)
- return session;
-
- return sdp_connect(src, dst, SDP_NON_BLOCKING);
-}
-
static void cache_sdp_session(bdaddr_t *src, bdaddr_t *dst,
sdp_session_t *session)
{
@@ -285,7 +274,10 @@ static int create_search_context(struct search_context **ctxt,
if (!ctxt)
return -EINVAL;
- s = get_sdp_session(src, dst);
+ s = get_cached_sdp_session(src, dst);
+ if (!s)
+ s = sdp_connect(src, dst, SDP_NON_BLOCKING);
+
if (!s)
return -errno;
--
1.8.5.3
^ permalink raw reply related
* [PATCH 1/5] lib: Add flag to double L2CAP IMTU size used for SDP connection
From: Szymon Janc @ 2014-01-20 0:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
This will allow to workaround Dualshock4 not respecting L2CAP MTU
size while sending SDP response.
---
lib/sdp.c | 22 ++++++++++++++++++++++
lib/sdp_lib.h | 1 +
2 files changed, 23 insertions(+)
diff --git a/lib/sdp.c b/lib/sdp.c
index 886e7cf..4d9a4bb 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -4644,6 +4644,25 @@ static int sdp_connect_local(sdp_session_t *session)
return connect(session->sock, (struct sockaddr *) &sa, sizeof(sa));
}
+static int double_l2cap_imtu(int sk)
+{
+ struct l2cap_options l2o;
+ socklen_t len;
+
+ memset(&l2o, 0, sizeof(l2o));
+ len = sizeof(l2o);
+
+ if (getsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, &len) < 0)
+ return -1;
+
+ l2o.imtu = 2 * l2o.imtu;
+
+ if (setsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, sizeof(l2o)) < 0)
+ return -1;
+
+ return 0;
+}
+
static int sdp_connect_l2cap(const bdaddr_t *src,
const bdaddr_t *dst, sdp_session_t *session)
{
@@ -4678,6 +4697,9 @@ static int sdp_connect_l2cap(const bdaddr_t *src,
setsockopt(sk, SOL_SOCKET, SO_LINGER, &l, sizeof(l));
}
+ if ((flags & SDP_DOUBLE_IMTU) && double_l2cap_imtu(sk) < 0)
+ return -1;
+
sa.l2_psm = htobs(SDP_PSM);
sa.l2_bdaddr = *dst;
diff --git a/lib/sdp_lib.h b/lib/sdp_lib.h
index 6e1eb91..56ba2ea 100644
--- a/lib/sdp_lib.h
+++ b/lib/sdp_lib.h
@@ -81,6 +81,7 @@ static inline void sdp_list_foreach(sdp_list_t *list, sdp_list_func_t f, void *u
#define SDP_RETRY_IF_BUSY 0x01
#define SDP_WAIT_ON_CLOSE 0x02
#define SDP_NON_BLOCKING 0x04
+#define SDP_DOUBLE_IMTU 0x08
/*
* a session with an SDP server
--
1.8.5.3
^ permalink raw reply related
* Re: linux-firmware: pull-request Marvell mwifiex-firmware 2014-01-09
From: Ben Hutchings @ 2014-01-19 23:39 UTC (permalink / raw)
To: Bing Zhao; +Cc: linux-wireless, linux-bluetooth, Frank Huang
In-Reply-To: <1389325691-21371-1-git-send-email-bzhao@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
On Thu, 2014-01-09 at 19:48 -0800, Bing Zhao wrote:
> The following changes since commit 52d77db9f133afe4d2b26aeccfd603745f45fda1:
>
> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/egrumbach/linux-firmware (2013-12-30 15:22:40 +0100)
>
> are available in the git repository at:
>
>
> git://git.marvell.com/mwifiex-firmware.git master
>
> for you to fetch changes up to 2d4aa2037a7015c4d78cde40006f80b8012537a6:
>
> linux-firmware: add Marvell USB8897-B0 firmware combo image (2014-01-09 19:17:35 -0800)
>
> ----------------------------------------------------------------
> Bing Zhao (3):
> linux-firmware: update Marvell USB8797-B0 firmware image
> linux-firmware: update Marvell SD8897-B0 firmware combo image
> linux-firmware: add Marvell USB8897-B0 firmware combo image
>
> WHENCE | 7 +++++--
> mrvl/sd8897_uapsta.bin | Bin 639012 -> 668028 bytes
> mrvl/usb8797_uapsta.bin | Bin 508372 -> 541048 bytes
> mrvl/usb8897_uapsta.bin | Bin 0 -> 705364 bytes
> 4 files changed, 5 insertions(+), 2 deletions(-)
> create mode 100644 mrvl/usb8897_uapsta.bin
>
> diff --git a/WHENCE b/WHENCE
> index 4f87d8a..23faafa 100644
> --- a/WHENCE
> +++ b/WHENCE
> @@ -730,10 +730,13 @@ File: mrvl/sd8797_uapsta.bin
> Version: 14.66.11.p151
>
> File: mrvl/sd8897_uapsta.bin
> -Version: 15.69.2.p11
> +Version: 15.68.201.p113
>
> File: mrvl/usb8797_uapsta.bin
> -Version: 14.69.11.p179
> +Version: 14.68.29.p26
[...]
Why are these updates rolling the version number backward? Did the
later versions cause regressions?
Ben.
--
Ben Hutchings
friends: People who know you well, but like you anyway.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH] lib: Use bigger IMTU when connecting SDP
From: simon @ 2014-01-19 20:57 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth, David Herrmann, Frank Praznik
In-Reply-To: <1565501.U8ecNLfzyG@athlon>
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
>>
>> I note that the cache file for the DS4's mac picks up some details on a
>> SDP browse, but not a complete record. This is on an older machine, so
>> BT chipset might be a factor.
>>
>> Anything I can try?
>> Simon
>
> It looks like you are using BT 2.0 dongle. I suggest trying with 2.1.
> I didn't check with 2.0 yet.
Yep, it's official my laptop's crap ;-) I tried my wife's fancy laptop and
the patched version of bluez worked (normal version didn't).
--
[liveuser@localhost ~]$ bluetoothctl
[NEW] Controller 60:D8:19:B3:6E:E5 BlueZ 5.13 [default]
[bluetooth]# power on
[CHG] Controller 60:D8:19:B3:6E:E5 Class: 0x00010c
Changing power on succeeded
[CHG] Controller 60:D8:19:B3:6E:E5 Powered: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 60:D8:19:B3:6E:E5 Discovering: yes
[NEW] Device 1C:66:6D:07:C3:E0 Wireless Controller
[bluetooth]# connect 1C:66:6D:07:C3:E0
Attempting to connect to 1C:66:6D:07:C3:E0
[CHG] Device 1C:66:6D:07:C3:E0 Connected: yes
[CHG] Device 1C:66:6D:07:C3:E0 Modalias: usb:v054Cp05C4d0100
[CHG] Device 1C:66:6D:07:C3:E0 Modalias: usb:v054Cp05C4d0100
[CHG] Device 1C:66:6D:07:C3:E0 UUIDs has unsupported type
[CHG] Device 1C:66:6D:07:C3:E0 Paired: yes
Connection successful
--
The patched rpm is here is anyone else wants to try/confirm.
https://dl.dropboxusercontent.com/u/34518077/bluez-5.13-1.fc20.i686.rpm
Although, I would note that under Debian (bluez 4.99) on my 'crappy'
laptop I was able to receive the SDP record as noted here.
http://marc.info/?l=linux-bluetooth&m=138993853328540&w=2
>
> BTW
> This patch is not going to be merge in current form. I'll be sending V2
> later.
I look forward to it, and will help where I can.
Cheers,
Simon
[-- Attachment #2: fancy_cache.txt --]
[-- Type: text/plain, Size: 1469 bytes --]
[General]
Name=Wireless Controller
[ServiceRecords]
0x00010001=3602610900000A000100010900013503191124090004350D35061901000900113503190011090006350909656E09006A0901000900093508350619112409010009000D350F350D350619010009001335031900110901002513576972656C65737320436F6E74726F6C6C6572090101250F47616D6520436F6E74726F6C6C6572090102251B536F6E7920436F6D707574657220456E7465727461696E6D656E74090200090100090201090111090202080809020308000902042800090205280109020636016C360169082226016405010905A10185010930093109320935150026FF0075089504810209391500250775049501814205091901290E150025017501950E8102750695018101050109330934150026FF007508950281020604FF850209249524B10285A309259530B102850509269528B102850609279534B102850709289530B10285080929952FB1020603FF850309219526B10285040922952EB10285F00947953FB10285F10948953FB10285F20949950FB1020600FF85110920150026FF007508954D81020921910285120922958D8102092391028513092495CD81020925910285140926960D0181020927910285150928964D018102092991028516092A968D018102092B91028517092C96CD018102092D91028518092E960D028102092F9102851909309622028102093191020680FF85820922953FB10285830923B10285840924B10285900930B10285910931B10285920932B10285930933B10285A00940B10285A40944B102C0090207350835060904090901000902082800090209280109020A280109020B09010009020C091F4009020D280009020E2800
0x00010002=35520900000A000100020900013503191200090004350D350619010009000135031900010900093508350619120009010309020009010309020109054C0902020905C40902030901000902042801090205090002
[-- Attachment #3: fancy_hciconfig.txt --]
[-- Type: text/plain, Size: 613 bytes --]
hci0: Type: BR/EDR Bus: USB
BD Address: 60:D8:19:B3:6E:E5 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN INQUIRY
RX bytes:634454 acl:33222 sco:0 events:132 errors:0
TX bytes:5739 acl:43 sco:0 commands:76 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'BlueZ 5.13'
Class: 0x00010c
Service Classes: Unspecified
Device Class: Computer, Laptop
HCI Version: 3.0 (0x5) Revision: 0x2ec
LMP Version: 3.0 (0x5) Subversion: 0x4203
Manufacturer: Broadcom Corporation (15)
^ permalink raw reply
* Re: [PATCH] lib: Use bigger IMTU when connecting SDP
From: Szymon Janc @ 2014-01-19 20:01 UTC (permalink / raw)
To: simon; +Cc: linux-bluetooth, David Herrmann, Frank Praznik
In-Reply-To: <d1fe03c920dacec62bc0f59c62a8932c.squirrel@mungewell.org>
Hi Simon,
On Sunday 19 January 2014 14:45:43 simon@mungewell.org wrote:
> > Sony Dualshock 4 controller is ignoring L2CAP MTU while sending SDP
> > response. This results in data being dropped and no SDP response is
> > received (so no input device was created and HID connection was
> > refused). Workaround this by using large IMTU for SDP.
>
> I tried with this and your earlier DS4 patch, on top of a Fedora 20 Live
> CD, and unfortunately it does not work for me. I still get the situation
> where the DS initiates a connection and then turns off immediately.
>
> I get the log messages
> --
> Jan 19 14:01:14 localhost systemd: Reached target Bluetooth.
> Jan 19 14:01:14 localhost bluetoothd[1803]: Refusing input device connect:
> No such file or directory (2)
> Jan 19 14:01:14 localhost bluetoothd[1803]: Refusing connection from
> 1C:66:6D:07:C3:E0: unknown device
> --
>
> See log files:
> pair_ds4_fedora.txt
> connect_ds4_fedora.txt
>
> There is also a problem when the pairing is initiated from the PC side,
> seems that the resultant link key is not accepted on connection.
>
> See:
> pair_fedora_ds4_2.txt
> connect_ds4_fedora_2.txt
>
> I note that the cache file for the DS4's mac picks up some details on a
> SDP browse, but not a complete record. This is on an older machine, so BT
> chipset might be a factor.
>
> Anything I can try?
> Simon
It looks like you are using BT 2.0 dongle. I suggest trying with 2.1.
I didn't check with 2.0 yet.
BTW
This patch is not going to be merge in current form. I'll be sending V2 later.
--
Szymon K. Janc
szymon.janc@gmail.com
^ permalink raw reply
* Re: [PATCH] lib: Use bigger IMTU when connecting SDP
From: simon @ 2014-01-19 19:45 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth, David Herrmann, Frank Praznik
In-Reply-To: <1390153036-10030-1-git-send-email-szymon.janc@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]
> Sony Dualshock 4 controller is ignoring L2CAP MTU while sending SDP
> response. This results in data being dropped and no SDP response is
> received (so no input device was created and HID connection was
> refused). Workaround this by using large IMTU for SDP.
I tried with this and your earlier DS4 patch, on top of a Fedora 20 Live
CD, and unfortunately it does not work for me. I still get the situation
where the DS initiates a connection and then turns off immediately.
I get the log messages
--
Jan 19 14:01:14 localhost systemd: Reached target Bluetooth.
Jan 19 14:01:14 localhost bluetoothd[1803]: Refusing input device connect:
No such file or directory (2)
Jan 19 14:01:14 localhost bluetoothd[1803]: Refusing connection from
1C:66:6D:07:C3:E0: unknown device
--
See log files:
pair_ds4_fedora.txt
connect_ds4_fedora.txt
There is also a problem when the pairing is initiated from the PC side,
seems that the resultant link key is not accepted on connection.
See:
pair_fedora_ds4_2.txt
connect_ds4_fedora_2.txt
I note that the cache file for the DS4's mac picks up some details on a
SDP browse, but not a complete record. This is on an older machine, so BT
chipset might be a factor.
Anything I can try?
Simon
[-- Attachment #2: pair_ds4_fedora.txt --]
[-- Type: text/plain, Size: 10725 bytes --]
HCI sniffer - Bluetooth packet analyzer ver 5.13
device: hci0 snap_len: 1500 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr 1C:66:6D:07:C3:E0 class 0x002508 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 1C:66:6D:07:C3:E0 role 0x00
Role: Master
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 1C:66:6D:07:C3:E0 role 0x00
Role: Master
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 41 bdaddr 1C:66:6D:07:C3:E0 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 41
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr 1C:66:6D:07:C3:E0 mode 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Max Slots Change (0x1b) plen 3
handle 41 slots 5
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 1
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 41
Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 1C:66:6D:07:C3:E0 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
Connection pending - No futher information available
< ACL data: handle 41 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x0000
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x0040 len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x0100 (L2CAP)
max 2048
aid(s) 0x0000 - 0xffff
cont 00
< ACL data: handle 41 flags 0x02 dlen 192
< ACL data: handle 41 flags 0x01 dlen 192
< ACL data: handle 41 flags 0x01 dlen 93
L2CAP(d): cid 0x0040 len 473 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x1d4
count 465
record #0
aid 0x0000 (SrvRecHndl)
uint 0x10001
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1800 >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x1f > <
uuid-16 0x0007 uint 0x1 uint 0x8 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x000a (DocURL)
url "http://www.bluez.org/"
aid 0x000b (ClientExeURL)
url "http://www.bluez.org/"
aid 0x000c (IconURL)
url "http://www.bluez.org/"
aid 0x0100 (SrvName)
str "Generic Access Profile"
aid 0x0102 (ProviderName)
str "BlueZ"
record #1
aid 0x0000 (SrvRecHndl)
uint 0x10002
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1801 >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x1f > <
uuid-16 0x0007 uint 0x10 uint 0x10 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0100 (SrvName)
str "Generic Attribute Profile"
aid 0x0102 (ProviderName)
str "BlueZ"
record #2
aid 0x0000 (SrvRecHndl)
uint 0x10003
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110e (AVRemote) uuid-16 0x110f (AVRemCt) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x103 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110e (AVRemote) uint 0x105 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > > >
aid 0x0100 (SrvName)
str "AVRCP CT"
aid 0x0311 (SuppFeatures)
uint 0x4f
record #3
aid 0x0000 (SrvRecHndl)
uint 0x10004
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110c (AVRemTarget) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x103 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110e (AVRemote) uint 0x104 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > > >
aid 0x0100 (SrvName)
str "AVRCP TG"
aid 0x0311 (SuppFeatures)
uint 0x5f
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 2
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 1C:66:6D:07:C3:E0 name 'Wireless Controller'
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 1C:66:6D:07:C3:E0
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr 1C:66:6D:07:C3:E0
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr 1C:66:6D:07:C3:E0
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 1C:66:6D:07:C3:E0
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
bdaddr 1C:66:6D:07:C3:E0 len 4 pin '0000'
> HCI Event: Command Complete (0x0e) plen 10
PIN Code Request Reply (0x01|0x000d) ncmd 1
status 0x00 bdaddr 1C:66:6D:07:C3:E0
> HCI Event: Link Key Notification (0x18) plen 23
bdaddr 1C:66:6D:07:C3:E0 key BC41AFE608E8AD39806F772FCD37F5AD type 0
Type: Combination Key
> HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 41 encrypt 0x01
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 17 scid 0x0041
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0041 len 1 [psm 17]
HIDP: Control: Virtual cable unplug
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 19 scid 0x0042
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 1 status 2
Connection pending - Authorization pending
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 3 status 0
Connection refused - security block
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Unsupported request
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 41 reason 0x13
Reason: Remote User Terminated Connection
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 1C:66:6D:07:C3:E0 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x04 handle 0 bdaddr 1C:66:6D:07:C3:E0 type ACL encrypt 0x00
Error: Page Timeout
[-- Attachment #3: connect_ds4_fedora.txt --]
[-- Type: text/plain, Size: 9876 bytes --]
HCI sniffer - Bluetooth packet analyzer ver 5.13
device: hci0 snap_len: 1500 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr 1C:66:6D:07:C3:E0 class 0x002508 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 1C:66:6D:07:C3:E0 role 0x00
Role: Master
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 1C:66:6D:07:C3:E0 role 0x00
Role: Master
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 41 bdaddr 1C:66:6D:07:C3:E0 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 41
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr 1C:66:6D:07:C3:E0 mode 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Max Slots Change (0x1b) plen 3
handle 41 slots 5
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 1
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 41
Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 1C:66:6D:07:C3:E0 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
Connection pending - No futher information available
< ACL data: handle 41 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x0000
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x0040 len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x0100 (L2CAP)
max 2048
aid(s) 0x0000 - 0xffff
cont 00
< ACL data: handle 41 flags 0x02 dlen 192
< ACL data: handle 41 flags 0x01 dlen 192
< ACL data: handle 41 flags 0x01 dlen 93
L2CAP(d): cid 0x0040 len 473 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x1d4
count 465
record #0
aid 0x0000 (SrvRecHndl)
uint 0x10001
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1800 >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x1f > <
uuid-16 0x0007 uint 0x1 uint 0x8 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x000a (DocURL)
url "http://www.bluez.org/"
aid 0x000b (ClientExeURL)
url "http://www.bluez.org/"
aid 0x000c (IconURL)
url "http://www.bluez.org/"
aid 0x0100 (SrvName)
str "Generic Access Profile"
aid 0x0102 (ProviderName)
str "BlueZ"
record #1
aid 0x0000 (SrvRecHndl)
uint 0x10002
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1801 >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x1f > <
uuid-16 0x0007 uint 0x10 uint 0x10 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0100 (SrvName)
str "Generic Attribute Profile"
aid 0x0102 (ProviderName)
str "BlueZ"
record #2
aid 0x0000 (SrvRecHndl)
uint 0x10003
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110e (AVRemote) uuid-16 0x110f (AVRemCt) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x103 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110e (AVRemote) uint 0x105 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > > >
aid 0x0100 (SrvName)
str "AVRCP CT"
aid 0x0311 (SuppFeatures)
uint 0x4f
record #3
aid 0x0000 (SrvRecHndl)
uint 0x10004
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110c (AVRemTarget) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x103 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110e (AVRemote) uint 0x104 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > > >
aid 0x0100 (SrvName)
str "AVRCP TG"
aid 0x0311 (SuppFeatures)
uint 0x5f
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 2
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 1C:66:6D:07:C3:E0 name 'Wireless Controller'
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 1C:66:6D:07:C3:E0
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
bdaddr 1C:66:6D:07:C3:E0 key BC41AFE608E8AD39806F772FCD37F5AD
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 1C:66:6D:07:C3:E0
> HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 41 encrypt 0x01
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 17 scid 0x0041
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0041 len 1 [psm 17]
HIDP: Control: Virtual cable unplug
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 19 scid 0x0042
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 1 status 2
Connection pending - Authorization pending
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 3 status 0
Connection refused - security block
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Unsupported request
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 41 reason 0x13
Reason: Remote User Terminated Connection
[-- Attachment #4: connect_ds4_fedora_2.txt --]
[-- Type: text/plain, Size: 7888 bytes --]
HCI sniffer - Bluetooth packet analyzer ver 5.13
device: hci0 snap_len: 1500 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr 1C:66:6D:07:C3:E0 class 0x002508 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 1C:66:6D:07:C3:E0 role 0x00
Role: Master
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 1C:66:6D:07:C3:E0 role 0x00
Role: Master
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 41 bdaddr 1C:66:6D:07:C3:E0 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 41
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr 1C:66:6D:07:C3:E0 mode 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Max Slots Change (0x1b) plen 3
handle 41 slots 5
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 1
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 41
Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 1C:66:6D:07:C3:E0 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
Connection pending - No futher information available
< ACL data: handle 41 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x0000
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 672
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x0040 len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x0100 (L2CAP)
max 2048
aid(s) 0x0000 - 0xffff
cont 00
< ACL data: handle 41 flags 0x02 dlen 192
< ACL data: handle 41 flags 0x01 dlen 192
< ACL data: handle 41 flags 0x01 dlen 93
L2CAP(d): cid 0x0040 len 473 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x1d4
count 465
record #0
aid 0x0000 (SrvRecHndl)
uint 0x10001
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1800 >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x1f > <
uuid-16 0x0007 uint 0x1 uint 0x8 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x000a (DocURL)
url "http://www.bluez.org/"
aid 0x000b (ClientExeURL)
url "http://www.bluez.org/"
aid 0x000c (IconURL)
url "http://www.bluez.org/"
aid 0x0100 (SrvName)
str "Generic Access Profile"
aid 0x0102 (ProviderName)
str "BlueZ"
record #1
aid 0x0000 (SrvRecHndl)
uint 0x10002
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1801 >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x1f > <
uuid-16 0x0007 uint 0x10 uint 0x10 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0100 (SrvName)
str "Generic Attribute Profile"
aid 0x0102 (ProviderName)
str "BlueZ"
record #2
aid 0x0000 (SrvRecHndl)
uint 0x10003
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110e (AVRemote) uuid-16 0x110f (AVRemCt) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x103 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110e (AVRemote) uint 0x105 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > > >
aid 0x0100 (SrvName)
str "AVRCP CT"
aid 0x0311 (SuppFeatures)
uint 0x4f
record #3
aid 0x0000 (SrvRecHndl)
uint 0x10004
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110c (AVRemTarget) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x103 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110e (AVRemote) uint 0x104 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > > >
aid 0x0100 (SrvName)
str "AVRCP TG"
aid 0x0311 (SuppFeatures)
uint 0x5f
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 2
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 1C:66:6D:07:C3:E0 name 'Wireless Controller'
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 1C:66:6D:07:C3:E0
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
bdaddr 1C:66:6D:07:C3:E0 key E7A1FCE56F3CDF257687D829E953C33C
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 1C:66:6D:07:C3:E0
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 41 reason 0x05
Reason: Authentication Failure
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 8 num 0
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
[-- Attachment #5: pair_fedora_ds4_2.txt --]
[-- Type: text/plain, Size: 3874 bytes --]
HCI sniffer - Bluetooth packet analyzer ver 5.13
device: hci0 snap_len: 1500 filter: 0xffffffff
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 1C:66:6D:07:C3:E0 ptype 0xcc18 rswitch 0x01 clkoffset 0x514b (valid)
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 41 bdaddr 1C:66:6D:07:C3:E0 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 41
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Max Slots Change (0x1b) plen 3
handle 41 slots 5
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 41
Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 1C:66:6D:07:C3:E0 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 1C:66:6D:07:C3:E0 name 'Wireless Controller'
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
handle 41
> HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 1C:66:6D:07:C3:E0
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr 1C:66:6D:07:C3:E0
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr 1C:66:6D:07:C3:E0
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 1C:66:6D:07:C3:E0
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
bdaddr 1C:66:6D:07:C3:E0 len 4 pin '0000'
> HCI Event: Command Complete (0x0e) plen 10
PIN Code Request Reply (0x01|0x000d) ncmd 1
status 0x00 bdaddr 1C:66:6D:07:C3:E0
> HCI Event: Link Key Notification (0x18) plen 23
bdaddr 1C:66:6D:07:C3:E0 key E7A1FCE56F3CDF257687D829E953C33C type 0
Type: Combination Key
> HCI Event: Auth Complete (0x06) plen 3
status 0x00 handle 41
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 41 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 41 reason 0x16
Reason: Connection Terminated by Local Host
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 8 num 0
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Inquiry Result (0x02) plen 15
bdaddr 1C:66:6D:07:C3:E0 mode 1 clkoffset 0x514c class 0x002508
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 8 num 0
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Inquiry Result (0x02) plen 15
bdaddr 1C:66:6D:07:C3:E0 mode 1 clkoffset 0x514c class 0x002508
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 8 num 0
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Inquiry Result (0x02) plen 15
bdaddr 1C:66:6D:07:C3:E0 mode 1 clkoffset 0x514c class 0x002508
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 8 num 0
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
[-- Attachment #6: info_ds4_fedora.txt --]
[-- Type: text/plain, Size: 156 bytes --]
[LinkKey]
Key=0x67C8E811F0C7CF297C6900ABA9A73BA7
Type=0
PINLength=4
[General]
Name=
Class=0x002508
SupportedTechnologies=BR/EDR
Trusted=false
Blocked=false
[-- Attachment #7: cache_after_sdp_browse.txt --]
[-- Type: text/plain, Size: 34 bytes --]
[General]
Name=Wireless Controller
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox