Return-Path: Message-ID: From: Robert Rawlins To: Date: Wed, 18 Apr 2007 08:11:52 +0000 MIME-Version: 1.0 Subject: [Bluez-users] Listening For Signals Reply-To: BlueZ users List-Id: BlueZ users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1043241357==" Sender: bluez-users-bounces@lists.sourceforge.net Errors-To: bluez-users-bounces@lists.sourceforge.net --===============1043241357== Content-Type: multipart/alternative; boundary="_b6ab9737-5882-49b6-8052-ce669af6f71d_" --_b6ab9737-5882-49b6-8052-ce669af6f71d_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Guys, =20 I'm trying to listen for signals posted by the API, but I'm struggling to g= et it working properly, here is the code i'm attempting to run at the momen= t. =20 #!/usr/bin/python import dbus, signal, time bus =3D dbus.SystemBus() obj =3D bus.get_object('org.bluez', '/org/bluez') obj =3D bus.get_object('org.bluez', '/org/bluez/hci0') adapter =3D dbus.Interface(obj, 'org.bluez.Adapter') def remote_device_found(addr, class_, rssi): print 'Device Found:', addr adapter.connect_to_signal('RemoteDeviceFound', remote_device_found) def main(): adapter.DiscoverDevices() main() =20 The code runs without error, but it doesn't print the found devices, what a= m i missing? =20 Thanks guys, =20 Rob _________________________________________________________________ Try Live.com: where your online world comes together - with news, sports, w= eather, and much more. http://www.live.com/getstarted= --_b6ab9737-5882-49b6-8052-ce669af6f71d_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Guys,
 
I'm trying to listen for signals posted by the API, but I'm struggling to g= et it working properly, here is the code i'm attempting to run at the momen= t.
 
#!/usr/bin/python
import dbus, signal, time
bus =3D dbus.SystemBus()
obj =3D bus.get_object('org.bluez', '/org/bluez')
obj =3D bus.get_object('org.bluez', '/org/bluez/hci0')
adapter =3D dbus.Interface(obj, 'org.bluez.Adapter')
def remote_device_found(addr, class_, rssi):
print 'Device Found:', addr
adapter.connect_to_signal('RemoteDeviceFound', remote_device_found)
def main():
adapter.DiscoverDevices()
main()
 
The code runs without error, but it doesn't print = the found devices, what am i missing?
 
Thanks guys,
 
Rob


Be one of the first to try = Windows Live Mail. Wi= ndows Live Mail. = --_b6ab9737-5882-49b6-8052-ce669af6f71d_-- --===============1043241357== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============1043241357== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --===============1043241357==--