Array{byte}

Robert Rawlins robert_rawlins at hotmail.com
Fri Apr 20 03:39:04 PDT 2007


Hello Guys,
 
I've got a function from the dbus bluez api that returns a byte array but i'm a little lost as to how I can extract any useful information from it :-D I'm new to both dbus and python but picking thing up quite nicely.
 
Now, when i print the array to screen it looks like this.
 
dbus.Array([dbus.Byte(54), dbus.Byte(0), dbus.Byte(101), dbus.Byte(9), dbus.Byte(0), dbus.Byte(0), dbus.Byte(10               ), dbus.Byte(0), dbus.Byte(1), dbus.Byte(0), dbus.Byte(27), dbus.Byte(9), dbus.Byte(0), dbus.Byte(1), dbus.Byte               (53), dbus.Byte(3), dbus.Byte(25), dbus.Byte(17), dbus.Byte(5), dbus.Byte(9), dbus.Byte(0), dbus.Byte(4), dbus.               Byte(53), dbus.Byte(17), dbus.Byte(53), dbus.Byte(3), dbus.Byte(25), dbus.Byte(1), dbus.Byte(0), dbus.Byte(53),                dbus.Byte(5), dbus.Byte(25), dbus.Byte(0), dbus.Byte(3), dbus.Byte(8), dbus.Byte(9), dbus.Byte(53), dbus.Byte(               3), dbus.Byte(25), dbus.Byte(0), dbus.Byte(8), dbus.Byte(9), dbus.Byte(0), dbus.Byte(5), dbus.Byte(53), dbus.By               te(3), dbus.Byte(25), dbus.Byte(16), dbus.Byte(2), dbus.Byte(9), dbus.Byte(0), dbus.Byte(6), dbus.Byte(53), dbu               s.Byte(9), dbus.Byte(9), dbus.Byte(101), dbus.Byte(110), dbus.Byte(9), dbus.Byte(0), dbus.Byte(106), dbus.Byte(               9), dbus.Byte(1), dbus.Byte(0), dbus.Byte(9), dbus.Byte(0), dbus.Byte(9), dbus.Byte(53), dbus.Byte(8), dbus.Byt               e(53), dbus.Byte(6), dbus.Byte(25), dbus.Byte(17), dbus.Byte(5), dbus.Byte(9), dbus.Byte(1), dbus.Byte(0), dbus               .Byte(9), dbus.Byte(1), dbus.Byte(0), dbus.Byte(37), dbus.Byte(16), dbus.Byte(79), dbus.Byte(66), dbus.Byte(69)               , dbus.Byte(88), dbus.Byte(32), dbus.Byte(79), dbus.Byte(98), dbus.Byte(106), dbus.Byte(101), dbus.Byte(99), db               us.Byte(116), dbus.Byte(32), dbus.Byte(80), dbus.Byte(117), dbus.Byte(115), dbus.Byte(104), dbus.Byte(9), dbus.               Byte(3), dbus.Byte(3), dbus.Byte(53), dbus.Byte(2), dbus.Byte(8), dbus.Byte(255)], signature=dbus.Signature('y'               ))
 
Now what can i do to extract useful information from this? is there any way to convert the array elements into a readable string so i know what the array contains? I'll then known which array element it is that is of use to me. I've posted on the python mailing list but nobody seemed to have any concrete answers and suggested i speak with you.
 
Thanks guys,
 
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070420/070d09f3/attachment.htm


More information about the dbus mailing list