# unpack return from ddo\_get\_param

**URL:** <https://forums.digi.com/t/unpack-return-from-ddo-get-param/2801>\
**Category:** Python\
**Created:** [August 5, 2011, 5:25pm UTC](https://forums.digi.com/t/unpack-return-from-ddo-get-param/2801 "2011-08-05T17:25:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dano](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Dano](https://forums.digi.com/u/Dano)\
**Post date:** [August 5, 2011, 5:25pm UTC](https://forums.digi.com/t/unpack-return-from-ddo-get-param/2801/1 "2011-08-05T17:25:42Z")

</div>

I’m trying to unpack the return from  
smple = xbee.ddo\_get\_param (xbadd,id)  
xbadd =“[00:13:A2:00:40:3C:42:76]!”  
id = (“IS”)  
print len(smple) =5

struct.unpack(“\>H”,smple)[0] give me the error  
unpack string size does not match format.

I’m not sure how to interpet the format of the return. Any advice?

---

<div class="post-metadata">

**Author:** ![shahrj1988](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@shahrj1988](https://forums.digi.com/u/shahrj1988)\
**Post date:** [August 6, 2011, 1:19am UTC](https://forums.digi.com/t/unpack-return-from-ddo-get-param/2801/2 "2011-08-06T01:19:25Z")

</div>

Hi,

Go to [www.digi.com/wiki/developer/](http://www.digi.com/wiki/developer/) and search for ‘ParseIS’ function. This function will do the IS parsing and returns in the dictionary format.

You will also find the same while searching for ‘XBee Smart Plug’.

---

<div class="post-metadata">

**Author:** ![nathanf](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/nathanf/32/5307_2.png) [@nathanf](https://forums.digi.com/u/nathanf)\
**Post date:** [October 4, 2011, 10:38pm UTC](https://forums.digi.com/t/unpack-return-from-ddo-get-param/2801/3 "2011-10-04T22:38:18Z")

</div>

Hello. A lot of times I will look at Dia drivers to see how they are doing things, to get an idea as to how I can do it in my own Python script.

For the ParseIS function, search your PC for the file “io\_sample”, found in the “common” directory in your iDigi Dia.

You will see the definition of ParseIS to see how they do it, or you can use the code in your own script (import, etc.)

I hope this helps!
