Hello Guys,
I've been toying with this today and I'm still not making any real progress, In the mean time i tried to give the XML version a go as to be honest this is likely to be of more use to me anyway, But it doesn't appear to find the XML function in the adapter object so i get the following error when trying to run it.
File "./sdp.py", line 14, in ? result2 = adapter.GetRemoteServiceRecordAsXML('00:17:B0:A0:E7:09', result[0]) File "/var/lib/python-support/python2.4/dbus/proxies.py", line 169, in __call__ reply_message = self._connection.send_message_with_reply_and_block(message, timeout)dbus.DBusException: org.bluez.Error.UnknownMethod: Method "GetRemoteServiceRecordAsXML" with signature "su" on interface "org.bluez.Adapter" doesn't exist
The code I'm using looks like this.
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
obj = bus.get_object('org.bluez', '/org/bluez')
obj = bus.get_object('org.bluez', '/org/bluez/hci0')
adapter = dbus.Interface(obj, 'org.bluez.Adapter')
# Search For Obex Push Protocol
print('Start Scan...')
result = adapter.GetRemoteServiceHandles('00:17:B0:A0:E7:09', 'opp')
result2 = adapter.GetRemoteServiceRecordAsXML('00:17:B0:A0:E7:09', result[0])
print result
print('Done Scanning.')
Now as you can see from the code and the signature in the exception thrown by dbus I'm passing in the right types of arguments in the form of a string address and a unit32 handle for the obex push record but it doesn't appear to come to life, I've upgraded to bluez 3.9 and still no change.
Thanks for any further help anyone can offer,
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted