node-dbus icon indicating copy to clipboard operation
node-dbus copied to clipboard

GetManagedObjects - Invalid Type

Open brycejacobs opened this issue 10 years ago • 2 comments

I'm attempting to send back some managed objects on the dbus for the bluez gatt api, and it's out signature is as follow:

out: 'a{oa{sa{sv}}}'

The format of the data I'm sending back looks like:

{ "/org/bluez/18508/bluez/dev_5C_F3_70_67_E2_6F/service0": {"org.bluez.GattService1": { "UUID":"13333333-3333-3333-3333-333333333333", "Primary":true, "Characteristics":["/org/bluez/18508/bluez/dev_5C_F3_70_67_E2_6F/service0/char0"] } } }

I referenced the out signature from the python example that is hosted on the bluez repo, but not sure what the problem is. It's spitting out a Invalid Type error, which I see is located in the encoder.cc. Any recommendations? Any help is much appreciated!

Bryce

brycejacobs avatar Oct 08 '15 19:10 brycejacobs

The older code would have marshalled "Characteristics":["/org/bluez/18508/bluez/dev_5C_F3_70_67_E2_6F/service0/char0"] as a dict entry in an object whose value is an array of variants. Today's code (in the master branch) will marshall the value as an array of strings, instead. It would be interesting to hear if this resolves your issue...

mkrufky avatar Apr 15 '16 22:04 mkrufky

seems like this should be closed?

ghost avatar Oct 01 '17 22:10 ghost