linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: linux-bluetooth@vger.kernel.org
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: [RFC v0 5/5] test: add requestdiscoverable command to test-adapter
Date: Thu,  6 Jun 2013 15:18:59 +0100	[thread overview]
Message-ID: <1370528339-7921-5-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1370528339-7921-1-git-send-email-gustavo@padovan.org>

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

---
 test/test-adapter | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/test-adapter b/test/test-adapter
index 5deeda4..764330d 100755
--- a/test/test-adapter
+++ b/test/test-adapter
@@ -136,6 +136,14 @@ if (args[0] == "discoverabletimeout"):
 		adapter.Set("org.bluez.Adapter1", "DiscoverableTimeout", to)
 	sys.exit(0)
 
+if (args[0] == "requestdiscoverable"):
+	adapter1 = dbus.Interface(bus.get_object("org.bluez", adapter_path),
+					"org.bluez.Adapter1")
+	adapter1.RequestDiscoverable()
+	time.sleep(20);
+	adapter1.ReleaseDiscoverable()
+	sys.exit(0)
+
 if (args[0] == "discovering"):
 	discovering = adapter.Get("org.bluez.Adapter1", "Discovering")
 	print(discovering)
-- 
1.8.1.4


      parent reply	other threads:[~2013-06-06 14:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 14:18 [RFC v0 1/5] adapter: rename discovery_client to watch_client Gustavo Padovan
2013-06-06 14:18 ` [RFC v0 2/5] adapter: rename compare_discovery_sender Gustavo Padovan
2013-06-06 14:18 ` [RFC v0 3/5] doc: add RequestDiscoverable() and ReleaseDiscoverable() Gustavo Padovan
2013-06-06 14:18 ` [RFC v0 4/5] adapter: " Gustavo Padovan
2013-06-06 15:50   ` Luiz Augusto von Dentz
2013-06-06 15:59     ` Gustavo Padovan
2013-06-06 16:06       ` Luiz Augusto von Dentz
2013-06-06 16:20         ` Gustavo Padovan
2013-06-07  7:58           ` Mikel Astiz
2013-06-06 14:18 ` Gustavo Padovan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370528339-7921-5-git-send-email-gustavo@padovan.org \
    --to=gustavo@padovan.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).