hcid dbus patches
Hello,
Here are a couple of patches that implement the following commands in dbus-test:
GetRemoteClass
GetRemoteServiceHandles
GetRemoteServiceRecord
This required modifications to dbus-sdp.c. The problem was that the call to dbus_message_get_args in this file used a NULL pointer for the error structure. This patch adds a pointer in the same way that dbus-adapter.c calls dbus_messsage_get_args. The end result is that both GetRemoteService* calls now seem to work.
Regards,
Jose Vasconcellos
../../bluez-utils-3.5/hcid/dbus-test renamed from dbus-test +19 -2
@@ -55,6 +55,8 @@ "GetEncryptionKeySize", "DiscoverDevices", "DiscoverDevicesWithoutNameResolving", + "GetRemoteServiceHandles", + "GetRemoteServiceRecord", "CancelDiscovery" ] dev_signals = [ "ModeChanged", "NameChanged",
@@ -303,9 +305,9 @@ print self.device.GetRemoteCompany(self.cmd_args[0]) else: print 'Usage: %s -i <dev> GetRemoteCompany address' % self.name - elif self.cmd == 'GetRemoteAlias': + elif self.cmd == 'GetRemoteClass': if len(self.cmd_args) == 1: - print self.device.GetRemoteAlias(self.cmd_args[0]) + print self.device.GetRemoteClass(self.cmd_args[0]) else: print 'Usage: %s -i <dev> GetRemoteAlias address' % self.name elif self.cmd == 'GetRemoteMajorClass':
@@ -323,6 +325,11 @@ print self.device.GetRemoteServiceClasses(self.cmd_args[0]) else: print 'Usage: %s -i <dev> GetRemoteServiceClasses address' % self.name + elif self.cmd == 'GetRemoteAlias': + if len(self.cmd_args) == 1: + print self.device.GetRemoteAlias(self.cmd_args[0]) + else: + print 'Usage: %s -i <dev> GetRemoteAlias address' % self.name elif self.cmd == 'SetRemoteAlias': if len(self.cmd_args) == 2: self.device.SetRemoteAlias(self.cmd_args[0], self.cmd_args[1])
@@ -386,6 +393,16 @@ print self.device.DiscoverDevices() elif self.cmd == 'DiscoverDevicesWithoutNameResolving': print self.device.DiscoverDevicesWithoutNameResolving() + elif self.cmd == 'GetRemoteServiceHandles': + if len(self.cmd_args) == 1: + print self.device.GetRemoteServiceHandles(self.cmd_args[0]) + else: + print 'Usage: %s -i <dev> GetRemoteServiceHandles address service' % self.name + elif self.cmd == 'GetRemoteServiceRecord': + if len(self.cmd_args) == 2: + print self.device.GetRemoteServiceRecord(self.cmd_args[0],dbus.UInt32(self.cmd_args[1])) + else: + print 'Usage: %s -i <dev> GetRemoteServiceRecord address service handle' % self.name else: # FIXME: remove at future version print 'Script Error: Method %s not found. Maybe a mispelled word.' % (self.cmd_args)
../../bluez-utils-3.5/hcid/dbus-sdp.c renamed from dbus-sdp.c +73 -17
229 lines not on this page · raw message
-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Jose,
Quoted 6 lines
Here are a couple of patches that implement the following commands in dbus-test:
GetRemoteClass
GetRemoteServiceHandles
GetRemoteServiceRecord
Quoted 6 lines
This required modifications to
dbus-sdp.c. The problem was that the call todbus_message_get_argsin this file used a NULL pointer for the error structure. This patch adds a pointer in the same way thatdbus-adapter.ccallsdbus_messsage_get_args. The end result is that both GetRemoteService* calls now seem to work.
I am not following that argument. If we don't care about the error code, then why should we fill one it. If this is a problem, then the problem is in the D-Bus low-level library or the Python bindings.
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Quoted 17 lines · Marcel Holtmann
Hi Jose,
Quoted 6 lines
Here are a couple of patches that implement the following commands in dbus-test:
GetRemoteClass
GetRemoteServiceHandles
GetRemoteServiceRecordQuoted 7 lines
This required modifications to
dbus-sdp.c. The problem was that the call todbus_message_get_argsin this file used a NULL pointer for the error structure. This patch adds a pointer in the same way thatdbus-adapter.ccallsdbus_messsage_get_args. The end result is that both GetRemoteService* calls now seem to work.
Quoted 8 lines
I am not following that argument. If we don't care about the error code, then why should we fill one it. If this is a problem, then the problem is in the D-Bus low-level library or the Python bindings.
Regards
Marcel
Hi Marcel,
This was my first hack with dbus. I haven't read the docs so I'm not sure how it all works. I just noticed that the code in dbus-adapter.c is working so put the same changes on dbus-sdp.c and it worked.
I don't think the patch to dbus-sdp.c should be put in. Someone with more dbus expertise should fix it. The patch to dbus-test is simple and adds the new commands.
Sorry, that I don't have much time to help in this area. My focus is to try to figure out how to get multiple SCO channels to work.
Jose
begin:vcard
fn:Jose Vasconcellos
n:Vasconcellos;Jose
org:Vas & Mac Enterprises LLC
adr:;;P.O. Box 567;Red Bank;NJ;07701;USA
email;internet:[email protected]
title:Managing Member and CTO
tel;work:+1 732 978 4680 x102
tel;fax:+1 206 888 6951
url:http://www.vasmac.com
version:2.1
end:vcard
-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Jose,
Quoted 18 lines
Quoted 14 lines
Quoted 6 lines
Here are a couple of patches that implement the following commands in dbus-test:
GetRemoteClass
GetRemoteServiceHandles
GetRemoteServiceRecordQuoted 7 lines
This required modifications to
dbus-sdp.c. The problem was that the call todbus_message_get_argsin this file used a NULL pointer for the error structure. This patch adds a pointer in the same way thatdbus-adapter.ccallsdbus_messsage_get_args. The end result is that both GetRemoteService* calls now seem to work.Quoted 3 lines
I am not following that argument. If we don't care about the error code, then why should we fill one it. If this is a problem, then the problem is in the D-Bus low-level library or the Python bindings.
Quoted 8 lines
This was my first hack with dbus. I haven't read the docs so I'm not sure how it all works. I just noticed that the code in
dbus-adapter.cis working so put the same changes ondbus-sdp.cand it worked.I don't think the patch to
dbus-sdp.cshould be put in. Someone with more dbus expertise should fix it. The patch to dbus-test is simple and adds the new commands.
every patch is welcome, but for this one, I simply don't see the need. For me it looks like D-Bus is at fault here and maybe updating your D-Bus installation and the Python bindings might fix this.
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel