* Re: [PATCH 6/9] android/bluetooth: Add support for remote device RSSI
From: Szymon Janc @ 2013-12-12 8:58 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: BlueZ development
In-Reply-To: <CAJdJm_N2aABBteKtWyRXh_-a8Oy722BMbZSrH_koNYbY8F5hpA@mail.gmail.com>
Hi Anderson,
> Hi Szymon,
>
> On Wed, Dec 11, 2013 at 7:31 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
> \> @@ -2306,11 +2309,13 @@ static uint8_t
> get_device_friendly_name(struct device *dev)
> >
> > static uint8_t get_device_rssi(struct device *dev)
> > {
> > - DBG("Not implemented");
> > + if (!dev->rssi)
> > + return HAL_STATUS_FAILED;
>
> 0 dBm is a valid RSSI value, so I suppose this code needs some other
> way to identify an uninitialized value (e.g. a second boolean field.)
Kernel sends rssi==0 if rssi info was not present on inquiry so I used this
value, but maybe it should use 127 for that.. ? (yet, this might cause trouble
as linux bluetoothd is checking 0 as well)
--
BR
Szymon Janc
^ permalink raw reply
* [PATCH] android/tester: Test Socket Init
From: Andrei Emeltchenko @ 2013-12-12 9:00 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The first test for testing socket init (get socket interface)
---
android/android-tester.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index a36c10a..b864483 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -34,6 +34,7 @@
#include <hardware/hardware.h>
#include <hardware/bluetooth.h>
+#include <hardware/bt_sock.h>
#define adapter_props adapter_prop_bdaddr, adapter_prop_bdname, \
adapter_prop_uuids, adapter_prop_cod, \
@@ -76,7 +77,9 @@ struct test_data {
enum hciemu_type hciemu_type;
const struct generic_data *test_data;
pid_t bluetoothd_pid;
+
const bt_interface_t *if_bluetooth;
+ const btsock_interface_t *if_sock;
bool mgmt_settings_set;
bool hal_cb_called;
@@ -625,6 +628,22 @@ static void setup_enabled_adapter(const void *test_data)
data->if_bluetooth->enable();
}
+static void setup_socket_interface(const void *test_data)
+{
+ struct test_data *data = tester_get_data();
+ const void *sock;
+
+ setup(data);
+
+ sock = data->if_bluetooth->get_profile_interface(BT_PROFILE_SOCKETS_ID);
+ if (!sock)
+ tester_setup_failed();
+
+ data->if_sock = sock;
+
+ tester_setup_complete();
+}
+
static void teardown(const void *test_data)
{
struct test_data *data = tester_get_data();
@@ -707,5 +726,8 @@ int main(int argc, char *argv[])
test_bredrle("Test Disable - Success", &bluetooth_disable_success_test,
setup_enabled_adapter, test_disable, teardown);
+ test_bredrle("Test Socket Init", NULL, setup_socket_interface,
+ controller_setup, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCH 1/4] android/tester: Rename controller_setup to test_dummy
From: Andrei Emeltchenko @ 2013-12-12 10:49 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
test_dummy is a better name for dummy function test.
---
android/android-tester.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/android/android-tester.c b/android/android-tester.c
index a36c10a..7ecc80d 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -672,7 +672,7 @@ static void test_disable(const void *test_data)
data->if_bluetooth->disable();
}
-static void controller_setup(const void *test_data)
+static void test_dummy(const void *test_data)
{
tester_test_passed();
}
@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
tester_init(&argc, &argv);
- test_bredrle("Test Init", NULL, setup_base, controller_setup, teardown);
+ test_bredrle("Test Init", NULL, setup_base, test_dummy, teardown);
test_bredrle("Test Enable - Success", &bluetooth_enable_success_test,
setup_base, test_enable, teardown);
--
1.8.3.2
^ permalink raw reply related
* [PATCH 2/4] android/tester: Add basic Socket Init test
From: Andrei Emeltchenko @ 2013-12-12 10:49 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386845350-13982-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Test get_socket_interface() and basic setup
---
android/android-tester.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 7ecc80d..185f57b 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -34,6 +34,7 @@
#include <hardware/hardware.h>
#include <hardware/bluetooth.h>
+#include <hardware/bt_sock.h>
#define adapter_props adapter_prop_bdaddr, adapter_prop_bdname, \
adapter_prop_uuids, adapter_prop_cod, \
@@ -76,7 +77,9 @@ struct test_data {
enum hciemu_type hciemu_type;
const struct generic_data *test_data;
pid_t bluetoothd_pid;
+
const bt_interface_t *if_bluetooth;
+ const btsock_interface_t *if_sock;
bool mgmt_settings_set;
bool hal_cb_called;
@@ -677,6 +680,24 @@ static void test_dummy(const void *test_data)
tester_test_passed();
}
+/* Test Socket HAL */
+
+static void setup_socket_interface(const void *test_data)
+{
+ struct test_data *data = tester_get_data();
+ const void *sock;
+
+ setup(data);
+
+ sock = data->if_bluetooth->get_profile_interface(BT_PROFILE_SOCKETS_ID);
+ if (!sock)
+ tester_setup_failed();
+
+ data->if_sock = sock;
+
+ tester_setup_complete();
+}
+
#define test_bredrle(name, data, test_setup, test, test_teardown) \
do { \
struct test_data *user; \
@@ -707,5 +728,8 @@ int main(int argc, char *argv[])
test_bredrle("Test Disable - Success", &bluetooth_disable_success_test,
setup_enabled_adapter, test_disable, teardown);
+ test_bredrle("Test Socket Init", NULL, setup_socket_interface,
+ test_dummy, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCH 3/4] android/tester: Add Socket data to generic test data struct
From: Andrei Emeltchenko @ 2013-12-12 10:49 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386845350-13982-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Socket data will be used in generic Socket HAL tests
---
android/android-tester.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 185f57b..15fd29e 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -61,6 +61,14 @@ enum hal_bluetooth_callbacks_id {
};
struct generic_data {
+ /* Socket data */
+ btsock_type_t sock_type;
+ const char *service_name;
+ const uint8_t *service_uuid;
+ int channel;
+ int flags;
+ bt_status_t expected_status;
+
uint8_t expected_adapter_status;
uint32_t expect_settings_set;
uint8_t expected_hal_callbacks[];
--
1.8.3.2
^ permalink raw reply related
* [PATCH 4/4] android/tester: Add Socket listen() invalid sock type
From: Andrei Emeltchenko @ 2013-12-12 10:49 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386845350-13982-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Test invalid socket type during listen()
---
android/android-tester.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 15fd29e..e2554a3 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -690,6 +690,15 @@ static void test_dummy(const void *test_data)
/* Test Socket HAL */
+static const struct generic_data btsock_inv_param_socktype = {
+ .sock_type = 0,
+ .channel = 1,
+ .service_uuid = NULL,
+ .service_name = "Test service",
+ .flags = 0,
+ .expected_status = BT_STATUS_PARM_INVALID,
+};
+
static void setup_socket_interface(const void *test_data)
{
struct test_data *data = tester_get_data();
@@ -706,6 +715,28 @@ static void setup_socket_interface(const void *test_data)
tester_setup_complete();
}
+static void test_generic_listen(const void *test_data)
+{
+ struct test_data *data = tester_get_data();
+ const struct generic_data *test = data->test_data;
+ bt_status_t status;
+ int sock_fd = -1;
+
+ status = data->if_sock->listen(test->sock_type,
+ test->service_name, test->service_uuid,
+ test->channel, &sock_fd, test->flags);
+ if (status != test->expected_status) {
+ tester_test_failed();
+ goto clean;
+ }
+
+ tester_test_passed();
+
+clean:
+ if (sock_fd >= 0)
+ close(sock_fd);
+}
+
#define test_bredrle(name, data, test_setup, test, test_teardown) \
do { \
struct test_data *user; \
@@ -739,5 +770,9 @@ int main(int argc, char *argv[])
test_bredrle("Test Socket Init", NULL, setup_socket_interface,
test_dummy, teardown);
+ test_bredrle("Test Socket Listen - Invalid sock type",
+ &btsock_inv_param_socktype, setup_socket_interface,
+ test_generic_listen, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCH] android/hal-sock: Fix returning unsupported instead of invalid
From: Andrei Emeltchenko @ 2013-12-12 10:58 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
For socket type 0 we shall return BT_STATUS_PARM_INVALID,
BT_STATUS_UNSUPPORTED shall be returned for unsupported socket types
like L2CAP.
---
android/hal-sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/android/hal-sock.c b/android/hal-sock.c
index f45be30..301c77f 100644
--- a/android/hal-sock.c
+++ b/android/hal-sock.c
@@ -54,7 +54,7 @@ static bt_status_t sock_listen(btsock_type_t type, const char *service_name,
const uint8_t *uuid, int chan,
int *sock, int flags)
{
- if ((!uuid && chan <= 0) || !sock) {
+ if ((!uuid && chan <= 0) || !sock || !type) {
error("Invalid params: uuid %s, chan %d, sock %p",
btuuid2str(uuid), chan, sock);
return BT_STATUS_PARM_INVALID;
--
1.8.3.2
^ permalink raw reply related
* Re: [PATCH 6/9] android/bluetooth: Add support for remote device RSSI
From: Anderson Lizardo @ 2013-12-12 11:03 UTC (permalink / raw)
To: Szymon Janc; +Cc: BlueZ development
In-Reply-To: <3353914.oihVPgriBc@uw000953>
Hi Szymon,
On Thu, Dec 12, 2013 at 5:58 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> On Wed, Dec 11, 2013 at 7:31 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> \> @@ -2306,11 +2309,13 @@ static uint8_t
>> get_device_friendly_name(struct device *dev)
>> >
>> > static uint8_t get_device_rssi(struct device *dev)
>> > {
>> > - DBG("Not implemented");
>> > + if (!dev->rssi)
>> > + return HAL_STATUS_FAILED;
>>
>> 0 dBm is a valid RSSI value, so I suppose this code needs some other
>> way to identify an uninitialized value (e.g. a second boolean field.)
>
> Kernel sends rssi==0 if rssi info was not present on inquiry so I used this
> value, but maybe it should use 127 for that.. ? (yet, this might cause trouble
> as linux bluetoothd is checking 0 as well)
I remember commenting on this when mgmt API (it was for TX Power,
which is more common to be 0 dBm, but I can't remember what was the
result of the discussion). In any case, I think handling this way will
make devices that use TX Power higher than 0 dBm (and thus can make a
0dBm RSSI possible) not report their RSSI. It is not common IMHO, but
it is possible.
Best Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply
* Re: mouse not found with bluez5 but was fine with bluez4
From: Brian J. Murrell @ 2013-12-12 12:15 UTC (permalink / raw)
To: Bastien Nocera; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <1386798596.1982.32.camel@nuvo>
On Wed, 2013-12-11 at 22:49 +0100, Bastien Nocera wrote:
>
> I don't see why it would be a problem in the wizard. You basically
> didn't have a Bluetooth adapter before you installed bluez-hid2hci.
But of course I also tried the wizard after correcting that. I most
certainly could understand that the wizard would not have worked before
running hid2hci and would only assert that the wizard is not working by
trying it after installing bluez-hid2hci.
So just to be clear, I have a mouse working, so the adapter is
definitely in a state where bluetooth-wizard should work (right?), yet
it is not finding the headset I have sitting here in pairing mode right
this minute.
bluetoothctl certainly sees it:
$ bluetoothctl
[NEW] Controller 00:02:72:1E:E0:12 pc.interlinx.bc.ca-0 [default]
[NEW] Device 00:0D:E6:68:B4:6F Samsung WEP850
[NEW] Device 70:F3:95:3E:92:34 brian-laptop
[NEW] Device 7C:1E:52:6E:59:D2 Microsoft Sculpt Touch Mouse
> > > Maybe that was somehow auto-run with
> > > your previous installation?
> >
> > I don't really know. It was F19. And that means bluez4. So I guess
> > this is going to be a transition issue/bug I need to raise on F20.
>
> bluez-hid2hci was already an optional package in F19.
But since I didn't have it installed on F19, apparently needing it on
F20 is a new requirement of Bluez5.
But really, I don't want to argue about it. I have my machine working
and have gained a bit of operational knowledge about Bluez5 that will
serve me well as I migrate machines to F20. I have filed a ticket with
the Fedora project alerting them to the new requirement. It's now up to
them to decide how important it is that their F20 users don't have the
same problem that I had.
Cheers and thanks much for the help!
b.
^ permalink raw reply
* [PATCHv2 0/7] Add basic socket tests
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Initial socket test cases
Andrei Emeltchenko (7):
android/tester: Rename controller_setup to test_dummy
android/tester: Make generic_data structure const void pointer
android/tester: Add basic Socket Init test
android/tester: Add Socket data to generic test data struct
android/tester: Add Socket listen() invalid sock type
android/hal-sock: Fix returning unsupported instead of invalid
android/tester: Add Socket listen() invalid L2CAP socket type
android/android-tester.c | 114 +++++++++++++++++++++++++++++++++++++++++------
android/hal-sock.c | 2 +-
2 files changed, 102 insertions(+), 14 deletions(-)
--
1.8.3.2
^ permalink raw reply
* [PATCHv2 1/7] android/tester: Rename controller_setup to test_dummy
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
test_dummy is a better name for dummy function test.
---
android/android-tester.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/android/android-tester.c b/android/android-tester.c
index a36c10a..7ecc80d 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -672,7 +672,7 @@ static void test_disable(const void *test_data)
data->if_bluetooth->disable();
}
-static void controller_setup(const void *test_data)
+static void test_dummy(const void *test_data)
{
tester_test_passed();
}
@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
tester_init(&argc, &argv);
- test_bredrle("Test Init", NULL, setup_base, controller_setup, teardown);
+ test_bredrle("Test Init", NULL, setup_base, test_dummy, teardown);
test_bredrle("Test Enable - Success", &bluetooth_enable_success_test,
setup_base, test_enable, teardown);
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 2/7] android/tester: Make generic_data structure const void pointer
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This allows us to have different types of generic data, like socket
data, bluetooth data, etc.
---
android/android-tester.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/android/android-tester.c b/android/android-tester.c
index 7ecc80d..800c14d 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -74,7 +74,7 @@ struct test_data {
unsigned int mgmt_settings_id;
struct hciemu *hciemu;
enum hciemu_type hciemu_type;
- const struct generic_data *test_data;
+ const void *test_data;
pid_t bluetoothd_pid;
const bt_interface_t *if_bluetooth;
@@ -111,6 +111,7 @@ static void command_generic_new_settings(uint16_t index, uint16_t length,
const void *param, void *user_data)
{
struct test_data *data = tester_get_data();
+ const struct generic_data *test_data = data->test_data;
uint32_t settings;
if (length != 4) {
@@ -121,8 +122,8 @@ static void command_generic_new_settings(uint16_t index, uint16_t length,
settings = bt_get_le32(param);
- if ((settings & data->test_data->expect_settings_set) !=
- data->test_data->expect_settings_set)
+ if ((settings & test_data->expect_settings_set) !=
+ test_data->expect_settings_set)
return;
test_mgmt_settings_set(data);
@@ -131,29 +132,34 @@ static void command_generic_new_settings(uint16_t index, uint16_t length,
static void hal_cb_init(struct test_data *data)
{
+ const struct generic_data *test_data = data->test_data;
unsigned int i = 0;
- while (data->test_data->expected_hal_callbacks[i]) {
- data->expected_callbacks =
- g_slist_append(data->expected_callbacks,
- GINT_TO_POINTER(data->test_data->expected_hal_callbacks[i]));
+ while (test_data->expected_hal_callbacks[i]) {
+ data->expected_callbacks =
+ g_slist_append(data->expected_callbacks,
+ GINT_TO_POINTER(test_data->expected_hal_callbacks[i]));
i++;
}
}
static void mgmt_cb_init(struct test_data *data)
{
- if (!data->test_data->expect_settings_set)
+ const struct generic_data *test_data = data->test_data;
+
+ if (!test_data->expect_settings_set)
test_mgmt_settings_set(data);
else
data->mgmt_settings_id = mgmt_register(data->mgmt,
- MGMT_EV_NEW_SETTINGS, data->mgmt_index,
+ MGMT_EV_NEW_SETTINGS, data->mgmt_index,
command_generic_new_settings, NULL, NULL);
}
static void expected_status_init(struct test_data *data)
{
- if (!(data->test_data->expected_adapter_status))
+ const struct generic_data *test_data = data->test_data;
+
+ if (!(test_data->expected_adapter_status))
data->status_checked = true;
}
@@ -167,8 +173,9 @@ static void init_test_conditions(struct test_data *data)
static void check_expected_status(uint8_t status)
{
struct test_data *data = tester_get_data();
+ const struct generic_data *test_data = data->test_data;
- if (data->test_data->expected_adapter_status == status)
+ if (test_data->expected_adapter_status == status)
data->status_checked = true;
else
tester_test_failed();
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 3/7] android/tester: Add basic Socket Init test
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Test get_socket_interface() and basic setup
---
android/android-tester.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 800c14d..c58b13a 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -34,6 +34,7 @@
#include <hardware/hardware.h>
#include <hardware/bluetooth.h>
+#include <hardware/bt_sock.h>
#define adapter_props adapter_prop_bdaddr, adapter_prop_bdname, \
adapter_prop_uuids, adapter_prop_cod, \
@@ -76,7 +77,9 @@ struct test_data {
enum hciemu_type hciemu_type;
const void *test_data;
pid_t bluetoothd_pid;
+
const bt_interface_t *if_bluetooth;
+ const btsock_interface_t *if_sock;
bool mgmt_settings_set;
bool hal_cb_called;
@@ -684,6 +687,24 @@ static void test_dummy(const void *test_data)
tester_test_passed();
}
+/* Test Socket HAL */
+
+static void setup_socket_interface(const void *test_data)
+{
+ struct test_data *data = tester_get_data();
+ const void *sock;
+
+ setup(data);
+
+ sock = data->if_bluetooth->get_profile_interface(BT_PROFILE_SOCKETS_ID);
+ if (!sock)
+ tester_setup_failed();
+
+ data->if_sock = sock;
+
+ tester_setup_complete();
+}
+
#define test_bredrle(name, data, test_setup, test, test_teardown) \
do { \
struct test_data *user; \
@@ -714,5 +735,8 @@ int main(int argc, char *argv[])
test_bredrle("Test Disable - Success", &bluetooth_disable_success_test,
setup_enabled_adapter, test_disable, teardown);
+ test_bredrle("Test Socket Init", NULL, setup_socket_interface,
+ test_dummy, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 4/7] android/tester: Add Socket data to generic test data struct
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Socket data will be used in generic Socket HAL tests
---
android/android-tester.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index c58b13a..11c3639 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -66,6 +66,15 @@ struct generic_data {
uint8_t expected_hal_callbacks[];
};
+struct socket_data {
+ btsock_type_t sock_type;
+ const char *service_name;
+ const uint8_t *service_uuid;
+ int channel;
+ int flags;
+ bt_status_t expected_status;
+};
+
#define WAIT_FOR_SIGNAL_TIME 2 /* in seconds */
#define EMULATOR_SIGNAL "emulator_started"
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 5/7] android/tester: Add Socket listen() invalid sock type
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Test invalid socket type during listen()
---
android/android-tester.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 11c3639..f5df0df 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -698,6 +698,15 @@ static void test_dummy(const void *test_data)
/* Test Socket HAL */
+static const struct socket_data btsock_inv_param_socktype = {
+ .sock_type = 0,
+ .channel = 1,
+ .service_uuid = NULL,
+ .service_name = "Test service",
+ .flags = 0,
+ .expected_status = BT_STATUS_PARM_INVALID,
+};
+
static void setup_socket_interface(const void *test_data)
{
struct test_data *data = tester_get_data();
@@ -714,6 +723,28 @@ static void setup_socket_interface(const void *test_data)
tester_setup_complete();
}
+static void test_generic_listen(const void *test_data)
+{
+ struct test_data *data = tester_get_data();
+ const struct socket_data *test = data->test_data;
+ bt_status_t status;
+ int sock_fd = -1;
+
+ status = data->if_sock->listen(test->sock_type,
+ test->service_name, test->service_uuid,
+ test->channel, &sock_fd, test->flags);
+ if (status != test->expected_status) {
+ tester_test_failed();
+ goto clean;
+ }
+
+ tester_test_passed();
+
+clean:
+ if (sock_fd >= 0)
+ close(sock_fd);
+}
+
#define test_bredrle(name, data, test_setup, test, test_teardown) \
do { \
struct test_data *user; \
@@ -747,5 +778,9 @@ int main(int argc, char *argv[])
test_bredrle("Test Socket Init", NULL, setup_socket_interface,
test_dummy, teardown);
+ test_bredrle("Test Socket Listen - Invalid sock type",
+ &btsock_inv_param_socktype, setup_socket_interface,
+ test_generic_listen, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 6/7] android/hal-sock: Fix returning unsupported instead of invalid
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
For socket type 0 we shall return BT_STATUS_PARM_INVALID,
BT_STATUS_UNSUPPORTED shall be returned for unsupported socket types
like L2CAP.
---
android/hal-sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/android/hal-sock.c b/android/hal-sock.c
index f45be30..301c77f 100644
--- a/android/hal-sock.c
+++ b/android/hal-sock.c
@@ -54,7 +54,7 @@ static bt_status_t sock_listen(btsock_type_t type, const char *service_name,
const uint8_t *uuid, int chan,
int *sock, int flags)
{
- if ((!uuid && chan <= 0) || !sock) {
+ if ((!uuid && chan <= 0) || !sock || !type) {
error("Invalid params: uuid %s, chan %d, sock %p",
btuuid2str(uuid), chan, sock);
return BT_STATUS_PARM_INVALID;
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 7/7] android/tester: Add Socket listen() invalid L2CAP socket type
From: Andrei Emeltchenko @ 2013-12-12 12:48 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Check that we get BT_STATUS_UNSUPPORTED for socket type BTSOCK_L2CAP.
---
android/android-tester.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index f5df0df..a50ed7b 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -707,6 +707,15 @@ static const struct socket_data btsock_inv_param_socktype = {
.expected_status = BT_STATUS_PARM_INVALID,
};
+static const struct socket_data btsock_inv_param_socktype_l2cap = {
+ .sock_type = BTSOCK_L2CAP,
+ .channel = 1,
+ .service_uuid = NULL,
+ .service_name = "Test service",
+ .flags = 0,
+ .expected_status = BT_STATUS_UNSUPPORTED,
+};
+
static void setup_socket_interface(const void *test_data)
{
struct test_data *data = tester_get_data();
@@ -782,5 +791,9 @@ int main(int argc, char *argv[])
&btsock_inv_param_socktype, setup_socket_interface,
test_generic_listen, teardown);
+ test_bredrle("Test Socket Listen - Invalid: L2CAP",
+ &btsock_inv_param_socktype_l2cap,
+ setup_socket_interface, test_generic_listen, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* Re: [PATCHv2 0/7] Add basic socket tests
From: Johan Hedberg @ 2013-12-12 13:02 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
In-Reply-To: <1386852514-17270-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
On Thu, Dec 12, 2013, Andrei Emeltchenko wrote:
> Initial socket test cases
>
> Andrei Emeltchenko (7):
> android/tester: Rename controller_setup to test_dummy
> android/tester: Make generic_data structure const void pointer
> android/tester: Add basic Socket Init test
> android/tester: Add Socket data to generic test data struct
> android/tester: Add Socket listen() invalid sock type
> android/hal-sock: Fix returning unsupported instead of invalid
> android/tester: Add Socket listen() invalid L2CAP socket type
>
> android/android-tester.c | 114 +++++++++++++++++++++++++++++++++++++++++------
> android/hal-sock.c | 2 +-
> 2 files changed, 102 insertions(+), 14 deletions(-)
All patches in this set have been applied. Thanks.
Johan
^ permalink raw reply
* [PATCH 1/2] android/pts: Add PTS test results for GAP
From: Szymon Janc @ 2013-12-12 13:35 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
This will allow for better tracking of current state of implementation.
---
android/Makefile.am | 2 +-
android/pts-gap.txt | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 156 insertions(+), 1 deletion(-)
create mode 100644 android/pts-gap.txt
diff --git a/android/Makefile.am b/android/Makefile.am
index 0bcab2f..7db0616 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -110,4 +110,4 @@ EXTRA_DIST += android/Android.mk android/hal-ipc-api.txt android/README \
android/pixit-did.txt android/pts-did.txt \
android/pixit-gap.txt android/pixit-hid.txt \
android/pixit-opp.txt android/pixit-pan.txt \
- android/pixit-pbap.txt
+ android/pixit-pbap.txt android/pts-gap.txt
diff --git a/android/pts-gap.txt b/android/pts-gap.txt
new file mode 100644
index 0000000..0ea5539
--- /dev/null
+++ b/android/pts-gap.txt
@@ -0,0 +1,155 @@
+PTS test results for GAP
+
+PTS version: 4.9
+Tested: 14.11.2013
+
+Results:
+PASS test passed
+FAIL test failed
+INC test is inconclusive
+N/A test is disabled due to PICS setup
+
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_MOD_NDIS_BV_01_C PASS
+TC_MOD_LDIS_BV_01_C N/A
+TC_MOD_LDIS_BV_02_C N/A
+TC_MOD_LDIS_BV_03_C N/A
+TC_MOD_GDIS_BV_01_C PASS
+TC_MOD_GDIS_BV_02_C PASS
+TC_MOD_NCON_BV_01_C PASS
+TC_MOD_CON_BV_01_C PASS
+TC_BROB_BCST_BV_01_C N/A
+TC_BROB_BCST_BV_02_C N/A
+TC_BROB_BCST_BV_03_C N/A
+TC_BROB_OBSV_BV_01_C N/A
+TC_BROB_OBSV_BV_02_C N/A
+TC_BROB_OBSV_BV_03_C N/A
+TC_BROB_OBSV_BV_04_C N/A
+TC_BROB_OBSV_BV_05_C N/A
+TC_DISC_NONM_BV_01_C N/A
+TC_DISC_NONM_BV_02_C N/A
+TC_DISC_LIMM_BV_01_C N/A
+TC_DISC_LIMM_BV_02_C N/A
+TC_DISC_LIMM_BV_03_C N/A
+TC_DISC_LIMM_BV_04_C N/A
+TC_DISC_GENM_BV_01_C N/A
+TC_DISC_GENM_BV_02_C N/A
+TC_DISC_GENM_BV_03_C N/A
+TC_DISC_GENM_BV_04_C N/A
+TC_DISC_LIMP_BV_01_C N/A
+TC_DISC_LIMP_BV_02_C N/A
+TC_DISC_LIMP_BV_03_C N/A
+TC_DISC_LIMP_BV_04_C N/A
+TC_DISC_LIMP_BV_05_C N/A
+TC_DISC_GENP_BV_01_C INC LE not supported yet
+TC_DISC_GENP_BV_02_C INC LE not supported yet
+TC_DISC_GENP_BV_03_C INC LE not supported yet
+TC_DISC_GENP_BV_04_C INC LE not supported yet
+TC_DISC_GENP_BV_05_C INC LE not supported yet
+TC_IDLE_GIN_BV_01_C PASS
+TC_IDLE_LIN_BV_01_C N/A
+TC_IDLE_NAMP_BV_01_C INC LE not supported yet
+TC_IDLE_NAMP_BV_02_C INC LE not supported yet
+TC_CONN_NCON_BV_01_C N/A
+TC_CONN_NCON_BV_02_C N/A
+TC_CONN_NCON_BV_03_C N/A
+TC_CONN_DCON_BV_01_C N/A
+TC_CONN_DCON_BV_02_C N/A
+TC_CONN_DCON_BV_03_C N/A
+TC_CONN_UCON_BV_01_C N/A
+TC_CONN_UCON_BV_02_C N/A
+TC_CONN_UCON_BV_03_C N/A
+TC_CONN_UCON_BV_04_C N/A
+TC_CONN_UCON_BV_05_C N/A
+TC_CONN_ACEP_BV_01_C INC LE not supported yet
+TC_CONN_ACEP_BV_02_C N/A
+TC_CONN_GCEP_BV_01_C INC LE not supported yet
+TC_CONN_GCEP_BV_02_C INC LE not supported yet
+TC_CONN_GCEP_BV_03_C N/A
+TC_CONN_GCEP_BV_04_C N/A
+TC_CONN_SCEP_BV_01_C INC LE not supported yet
+TC_CONN_SCEP_BV_02_C N/A
+TC_CONN_DCEP_BV_01_C INC LE not supported yet
+TC_CONN_DCEP_BV_02_C N/A
+TC_CONN_DCEP_BV_03_C INC LE not supported yet
+TC_CONN_DCEP_BV_04_C N/A
+TC_CONN_CPUP_BV_01_C N/A
+TC_CONN_CPUP_BV_02_C N/A
+TC_CONN_CPUP_BV_03_C N/A
+TC_CONN_CPUP_BV_04_C INC LE not supported yet
+TC_CONN_CPUP_BV_05_C INC LE not supported yet
+TC_CONN_CPUP_BV_06_C INC LE not supported yet
+TC_CONN_TERM_BV_01_C INC LE not supported yet
+TC_CONN_PRDA_BV_01_C N/A
+TC_CONN_PRDA_BV_02_C INC LE not supported yet
+TC_BOND_NBON_BV_01_C N/A
+TC_BOND_NBON_BV_02_C N/A
+TC_BOND_NBON_BV_03_C N/A
+TC_BOND_BON_BV_01_C N/A
+TC_BOND_BON_BV_02_C INC LE not supported yet
+TC_BOND_BON_BV_03_C N/A
+TC_BOND_BON_BV_04_C INC LE not supported yet
+TC_SEC_AUT_BV_11_C N/A
+TC_SEC_AUT_BV_12_C INC LE not supported yet
+TC_SEC_AUT_BV_13_C N/A
+TC_SEC_AUT_BV_14_C N/A
+TC_SEC_AUT_BV_15_C N/A
+TC_SEC_AUT_BV_16_C INC LE not supported yet
+TC_SEC_AUT_BV_17_C N/A
+TC_SEC_AUT_BV_18_C N/A
+TC_SEC_AUT_BV_19_C N/A
+TC_SEC_AUT_BV_20_C N/A
+TC_SEC_AUT_BV_21_C N/A
+TC_SEC_AUT_BV_22_C N/A
+TC_SEC_AUT_BV_23_C N/A
+TC_SEC_AUT_BV_24_C N/A
+TC_SEC_CSIGN_BV_01_C INC LE not supported yet
+TC_SEC_CSIGN_BV_02_C INC LE not supported yet
+TC_SEC_CSIGN_BI_01_C INC LE not supported yet
+TC_SEC_CSIGN_BI_02_C INC LE not supported yet
+TC_SEC_CSIGN_BI_03_C INC LE not supported yet
+TC_SEC_CSIGN_BI_04_C INC LE not supported yet
+TC_PRIV_CONN_BV_01_C N/A
+TC_PRIV_CONN_BV_02_C N/A
+TC_PRIV_CONN_BV_03_C N/A
+TC_PRIV_CONN_BV_04_C N/A
+TC_PRIV_CONN_BV_05_C N/A
+TC_PRIV_CONN_BV_06_C N/A
+TC_PRIV_CONN_BV_07_C N/A
+TC_PRIV_CONN_BV_08_C N/A
+TC_PRIV_CONN_BV_09_C N/A
+TC_ADV_BV_01_C N/A
+TC_ADV_BV_02_C N/A
+TC_ADV_BV_03_C N/A
+TC_ADV_BV_04_C N/A
+TC_ADV_BV_05_C N/A
+TC_ADV_BV_06_C N/A
+TC_ADV_BV_07_C N/A
+TC_ADV_BV_08_C N/A
+TC_ADV_BV_09_C N/A
+TC_ADV_BV_10_C N/A
+TC_GAT_BV_01_C INC LE not supported yet
+TC_GAT_BV_02_C N/A
+TC_GAT_BV_03_C N/A
+TC_GAT_BV_04_C N/A
+TC_GAT_BV_05_C N/A
+TC_GAT_BV_06_C N/A
+TC_GAT_BV_07_C N/A
+TC_GAT_BV_08_C N/A
+TC_DM_NCON_BV_01_C N/A
+TC_DM_CON_BV_01_C N/A
+TC_DM_NBON_BV_01_C N/A
+TC_DM_BON_BV_01_C INC LE not supported yet
+TC_DM_GIN_BV_01_C INC LE not supported yet
+TC_DM_LIN_BV_01_C N/A
+TC_DM_NAD_BV_01_C PASS
+TC_DM_NAD_BV_02_C INC LE not supported yet
+TC_DM_LEP_BV_01_C N/A
+TC_DM_LEP_BV_02_C N/A
+TC_DM_LEP_BV_03_C N/A
+TC_DM_LEP_BV_04_C N/A
+TC_DM_LEP_BV_05_C N/A
+TC_DM_LEP_BV_06_C INC LE not supported yet
+-------------------------------------------------------------------------------
--
1.8.3.2
^ permalink raw reply related
* [PATCH 2/2] android/pts: Add PTS test results for HID
From: Szymon Janc @ 2013-12-12 13:35 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1386855340-22911-1-git-send-email-szymon.janc@tieto.com>
This will allow for better tracking of current state of implementation.
---
android/Makefile.am | 2 +-
android/pts-hid.txt | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 android/pts-hid.txt
diff --git a/android/Makefile.am b/android/Makefile.am
index 7db0616..1dde8c1 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -110,4 +110,4 @@ EXTRA_DIST += android/Android.mk android/hal-ipc-api.txt android/README \
android/pixit-did.txt android/pts-did.txt \
android/pixit-gap.txt android/pixit-hid.txt \
android/pixit-opp.txt android/pixit-pan.txt \
- android/pixit-pbap.txt android/pts-gap.txt
+ android/pixit-pbap.txt android/pts-gap.txt android/pts-hid.txt
diff --git a/android/pts-hid.txt b/android/pts-hid.txt
new file mode 100644
index 0000000..7e9f986
--- /dev/null
+++ b/android/pts-hid.txt
@@ -0,0 +1,76 @@
+PTS test results for DID
+
+PTS version: 4.9
+Tested: 14.11.2013
+
+Results:
+PASS test passed
+FAIL test failed
+INC test is inconclusive
+N/A test is disabled due to PICS setup
+
+-------------------------------------------------------------------------------
+Test Name Result Notes
+-------------------------------------------------------------------------------
+TC_HOS_HCE_BV_01_I PASS
+TC_HOS_HCE_BV_02_I PASS
+TC_HOS_HCE_BV_03_I PASS
+TC_HOS_HCE_BV_04_I PASS
+TC_HOS_HCR_BV_01_I PASS
+TC_HOS_HCR_BV_02_I PASS
+TC_HOS_HCR_BV_03_I N/A
+TC_HOS_HCR_BV_04_I N/A
+TC_HOS_HDT_BV_01_I PASS from shell execute:
+ haltest
+ bluetooth enable
+ hidhost connect <PTS bdaddr>
+ hidhost send_data <PTS bdaddr> ff00
+TC_HOS_HDT_BV_02_I PASS
+TC_HOS_HDT_BV_03_I N/A
+TC_HOS_HDT_BV_04_I N/A
+TC_HOS_HID_BV_01_C N/A
+TC_HOS_HID_BV_02_C N/A
+TC_HOS_HID_BV_03_C N/A
+TC_HOS_HID_BV_04_C N/A
+TC_HOS_HID_BV_05_C N/A
+TC_HOS_HID_BV_06_C N/A
+TC_HOS_HID_BV_08_C N/A
+TC_HOS_HID_BV_09_C N/A
+TC_HOS_HID_BV_10_C N/A
+TC_HOS_DAT_BV_01_C PASS from shell execute:
+ haltest
+ bluetooth enable
+ hidhost connect <PTS bdaddr>
+ hidhost send_data <PTS bdaddr> ff00
+TC_HOS_DAT_BV_02_C N/A
+TC_HOS_DAT_BI_01_C N/A
+TC_HOS_DAT_BI_02_C N/A
+TC_DEV_HCE_BV_01_I N/A
+TC_DEV_HCE_BV_02_I N/A
+TC_DEV_HCE_BV_03_I PASS
+TC_DEV_HCE_BV_04_I PASS
+TC_DEV_HCE_BV_05_I N/A
+TC_DEV_HCR_BV_01_I N/A
+TC_DEV_HCR_BV_02_I N/A
+TC_DEV_HCR_BV_03_I N/A
+TC_DEV_HCR_BV_04_I N/A
+TC_DEV_HDT_BV_01_I N/A
+TC_DEV_HDT_BV_02_I N/A
+TC_DEV_HDT_BV_03_I N/A
+TC_DEV_HDT_BV_04_I N/A
+TC_DEV_HID_BV_01_C N/A
+TC_DEV_HID_BV_03_C N/A
+TC_DEV_HID_BV_04_C N/A
+TC_DEV_HID_BV_05_C N/A
+TC_DEV_HID_BV_06_C N/A
+TC_DEV_HID_BV_08_C N/A
+TC_DEV_HID_BV_09_C N/A
+TC_DEV_HID_BV_10_C N/A
+TC_DEV_HID_BI_01_C N/A
+TC_DEV_HID_BI_02_C N/A
+TC_DEV_DAT_BV_01_C N/A
+TC_DEV_SDD_BV_01_C N/A
+TC_DEV_SDD_BV_02_C N/A
+TC_DEV_SDD_BV_03_C N/A
+TC_DEV_SDD_BV_04_I N/A
+-------------------------------------------------------------------------------
--
1.8.3.2
^ permalink raw reply related
* Re: mouse not found with bluez5 but was fine with bluez4
From: Bastien Nocera @ 2013-12-12 13:53 UTC (permalink / raw)
To: Brian J. Murrell; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <1386850542.3586.19.camel@bmurrell-mobl.amr.corp.intel.com>
On Thu, 2013-12-12 at 07:15 -0500, Brian J. Murrell wrote:
> On Wed, 2013-12-11 at 22:49 +0100, Bastien Nocera wrote:
> >
> > I don't see why it would be a problem in the wizard. You basically
> > didn't have a Bluetooth adapter before you installed bluez-hid2hci.
>
> But of course I also tried the wizard after correcting that. I most
> certainly could understand that the wizard would not have worked before
> running hid2hci and would only assert that the wizard is not working by
> trying it after installing bluez-hid2hci.
>
> So just to be clear, I have a mouse working, so the adapter is
> definitely in a state where bluetooth-wizard should work (right?), yet
> it is not finding the headset I have sitting here in pairing mode right
> this minute.
Is the headset still in the list of paired devices though? If so, it
wouldn't show up in the list in the wizard.
> bluetoothctl certainly sees it:
>
> $ bluetoothctl
> [NEW] Controller 00:02:72:1E:E0:12 pc.interlinx.bc.ca-0 [default]
> [NEW] Device 00:0D:E6:68:B4:6F Samsung WEP850
> [NEW] Device 70:F3:95:3E:92:34 brian-laptop
> [NEW] Device 7C:1E:52:6E:59:D2 Microsoft Sculpt Touch Mouse
If you see it in bluetoothctl without typing scan, that means that
either it was discovered less than 3 minutes ago, or that it's a known
device (so paired or trusted, paired in the case of headsets).
If you do:
info 00:0D:E6:68:B4:6F
in bluetoothctl, you should also see which services your headset uses.
Some of them aren't supported yet in Fedora (HandsFree for example)
because the support was removed in bluez itself.
> > > > Maybe that was somehow auto-run with
> > > > your previous installation?
> > >
> > > I don't really know. It was F19. And that means bluez4. So I guess
> > > this is going to be a transition issue/bug I need to raise on F20.
> >
> > bluez-hid2hci was already an optional package in F19.
>
> But since I didn't have it installed on F19, apparently needing it on
> F20 is a new requirement of Bluez5.
I've just double-checked, and it's not installed by default in F19.
Maybe you installed it and don't remember, or upgraded from an earlier
version that had it installed but disabled by default (there used to be
a separate config file to enable it after installation).
> But really, I don't want to argue about it. I have my machine working
> and have gained a bit of operational knowledge about Bluez5 that will
> serve me well as I migrate machines to F20. I have filed a ticket with
> the Fedora project alerting them to the new requirement. It's now up to
> them to decide how important it is that their F20 users don't have the
> same problem that I had.
There's plenty of SELinux warnings in there. Maybe you need to enable
permissive mode, and/or file bugs about those.
^ permalink raw reply
* Re: mouse not found with bluez5 but was fine with bluez4
From: Bastien Nocera @ 2013-12-12 14:12 UTC (permalink / raw)
To: Brian J. Murrell; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <1386856382.1982.42.camel@nuvo>
On Thu, 2013-12-12 at 14:53 +0100, Bastien Nocera wrote:
<snip>
> There's plenty of SELinux warnings in there. Maybe you need to enable
> permissive mode, and/or file bugs about those.
Never mind, confusing with another headset issue I'm working on :/
^ permalink raw reply
* Re: mouse not found with bluez5 but was fine with bluez4
From: Brian J. Murrell @ 2013-12-12 14:20 UTC (permalink / raw)
To: Bastien Nocera; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <1386856382.1982.42.camel@nuvo>
On Thu, 2013-12-12 at 14:53 +0100, Bastien Nocera wrote:
>
> Is the headset still in the list of paired devices though?
Could be.
> If so, it
> wouldn't show up in the list in the wizard.
That makes sense. I wonder if that was/is the case with the mouse then.
> If you do:
> info 00:0D:E6:68:B4:6F
> in bluetoothctl, you should also see which services your headset uses.
> Some of them aren't supported yet in Fedora (HandsFree for example)
> because the support was removed in bluez itself.
[bluetooth]# info 00:0D:E6:68:B4:6F
Device 00:0D:E6:68:B4:6F
Name: Samsung WEP850
Alias: Samsung WEP850
Class: 0x200404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
> I've just double-checked, and it's not installed by default in F19.
Right. I never had it installed in F19. But my dongle worked anyway,
pressumably without having to use hid2hci
> Maybe you installed it and don't remember, or upgraded from an earlier
> version that had it installed but disabled by default (there used to be
> a separate config file to enable it after installation).
No. I still have my F19 system. I checked and it's not installed. So
clearly this needing it on F20 is something new with bluez5.
> There's plenty of SELinux warnings in there. Maybe you need to enable
> permissive mode, and/or file bugs about those.
Interesting that I don't get that that SELinux troubleshooter icon
notifying me of any problems, and nothing new is in the SELinux Alert
Browser.
b.
^ permalink raw reply
* [PATCH 1/8] android/tester: Add Socket test invalid params: chan and uuid
From: Andrei Emeltchenko @ 2013-12-12 15:17 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
For the socket listen() call parameters channel and uuid cannot be both
zeroes.
---
android/android-tester.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index a50ed7b..3f763d8 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -716,6 +716,16 @@ static const struct socket_data btsock_inv_param_socktype_l2cap = {
.expected_status = BT_STATUS_UNSUPPORTED,
};
+/* Test invalid: channel & uuid are both zeroes */
+static const struct socket_data btsock_inv_params_chan_uuid = {
+ .sock_type = BTSOCK_RFCOMM,
+ .channel = 0,
+ .service_uuid = NULL,
+ .service_name = "Test service",
+ .flags = 0,
+ .expected_status = BT_STATUS_PARM_INVALID,
+};
+
static void setup_socket_interface(const void *test_data)
{
struct test_data *data = tester_get_data();
@@ -795,5 +805,9 @@ int main(int argc, char *argv[])
&btsock_inv_param_socktype_l2cap,
setup_socket_interface, test_generic_listen, teardown);
+ test_bredrle("Test Socket Listen - Invalid: chan, uuid",
+ &btsock_inv_params_chan_uuid,
+ setup_socket_interface, test_generic_listen, teardown);
+
return tester_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCH 2/8] android/tester: Check that fd is valid for Success case
From: Andrei Emeltchenko @ 2013-12-12 15:17 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1386861474-29524-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
For the successful test case check that file descriptor is valid through
fcntl which is cheap way.
---
android/android-tester.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 3f763d8..2bb7d73 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include <fcntl.h>
#include <glib.h>
#include <sys/socket.h>
@@ -757,6 +758,12 @@ static void test_generic_listen(const void *test_data)
goto clean;
}
+ /* Check that file descriptor is valid */
+ if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) == -1) {
+ tester_test_failed();
+ return;
+ }
+
tester_test_passed();
clean:
--
1.8.3.2
^ permalink raw reply related
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