From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] DiscoverDevices with apitest?
Date: Thu, 19 Oct 2006 14:04:29 +0200 [thread overview]
Message-ID: <1161259469.27710.40.camel@localhost> (raw)
In-Reply-To: <20061019115608.GB31910@suse.de>
Hi Stefan,
> i tried today to discover devices with apitest (instead of "hcitool scan"),
> but it did not work:
>
> seife@strolchi:~> apitest DiscoverDevices
> None
>
> and it returns immediately. So i tried my luck with direct "dbus-send":
> seife@strolchi:~> dbus-send --system --dest=org.bluez --print-reply /org/bluez/hci0 org.bluez.Adapter.DiscoverDevices
> method return sender=:1.541 -> dest=:1.867
>
> No luck either.
> I always get this in my syslog from hcid:
> Oct 19 13:52:39 strolchi hcid[17330]: Introspect path:/org/bluez
> Oct 19 13:52:39 strolchi hcid[17330]: Introspect path:/org/bluez/hci0
> Oct 19 13:52:39 strolchi hcid[17330]: name_listener_add(:1.869)
> Oct 19 13:52:39 strolchi hcid[17330]: DiscoverDevices requestor at :1.869 exited before the operation finished
> Oct 19 13:52:39 strolchi hcid[17330]: name_listener_remove(:1.869)
> Oct 19 13:52:39 strolchi hcid[17330]: remove_name_listener: no listener for :1.869
>
> So why doesn't the dbus call block? I also tried with a "apitest -l"
> running in parallel, to see if this would get something discovered, but it
> didn't:
> seife@strolchi:~> apitest -l
> Listening for events...
> DiscoveryStarted - /org/bluez/hci0:
> DiscoveryCompleted - /org/bluez/hci0:
> DiscoveryStarted - /org/bluez/hci0:
> DiscoveryCompleted - /org/bluez/hci0:
> Caught signal, exiting
You need to keep the calling application running, because otherwise hcid
will stop the discovery. That is actually what you see in syslog.
It is not blocking, because this is simply not a blocking task. You
might wanna have a look at this blog on how to do it with Python:
http://blogs.gnome.org/view/jamesh/2006/10/19/0
Regards
Marcel
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next prev parent reply other threads:[~2006-10-19 12:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-19 11:56 [Bluez-users] DiscoverDevices with apitest? Stefan Seyfried
2006-10-19 12:04 ` Marcel Holtmann [this message]
2006-10-19 12:31 ` Johan Hedberg
2006-10-19 12:35 ` Johan Hedberg
2006-10-19 12:42 ` Marcel Holtmann
2006-10-19 12:49 ` Johan Hedberg
2006-10-19 12:41 ` Stefan Seyfried
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=1161259469.27710.40.camel@localhost \
--to=marcel@holtmann.org \
--cc=bluez-users@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.