Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] tools: Add mgmt test case for pair device while powered off
@ 2013-01-18 11:51 Szymon Janc
  2013-01-18 11:51 ` [PATCH 2/2] Adapter: Add workaround for device pairing kernel bug Szymon Janc
  2013-01-18 13:26 ` [PATCH 1/2] tools: Add mgmt test case for pair device while powered off Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Szymon Janc @ 2013-01-18 11:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

This tests if kernel is responding with proper command complete event.
---
 tools/mgmt-tester.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index cb02480..5c72d00 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -916,6 +916,20 @@ static const struct generic_data add_uuid32_test_1 = {
 	.expect_hci_len = sizeof(write_eir_uuid32_hci),
 };
 
+static const char pair_device_param[] = {
+			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00 };
+static const char pair_device_rsp[] = {
+			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00 };
+
+static const struct generic_data pair_device_not_powered_test_1 = {
+	.send_opcode = MGMT_OP_PAIR_DEVICE,
+	.send_param = pair_device_param,
+	.send_len = sizeof(pair_device_param),
+	.expect_status = MGMT_STATUS_NOT_POWERED,
+	.expect_param = pair_device_rsp,
+	.expect_len = sizeof(pair_device_rsp),
+};
+
 static void setup_powered_callback(uint8_t status, uint16_t length,
 					const void *param, void *user_data)
 {
@@ -1414,5 +1428,8 @@ int main(int argc, char *argv[])
 	test_bredr("Add UUID - UUID-32 1", &add_uuid32_test_1, setup_ssp,
 				test_command_generic);
 
+	test_bredr("Pair Device - Not Powered 1",
+				&pair_device_not_powered_test_1, NULL,
+				test_command_generic);
 	return tester_run();
 }
-- 
1.8.0.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-18 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 11:51 [PATCH 1/2] tools: Add mgmt test case for pair device while powered off Szymon Janc
2013-01-18 11:51 ` [PATCH 2/2] Adapter: Add workaround for device pairing kernel bug Szymon Janc
2013-01-18 13:26 ` [PATCH 1/2] tools: Add mgmt test case for pair device while powered off Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox