I can't seem to get how the API lengh is calculated

Hi,

Could somebody explain how I get the API lengh because whenever I count it , it is a different number between 7e and checksum.

Thanks in advance
Stuart

Have you tried looking at:

http://knowledge.digi.com/articles/Knowledge_Base_Article/What-is-API-Application-Programming-Interface-Mode-and-how-does-it-work/?q=API&l=en_US&fs=Search&pn=1

and

http://knowledge.digi.com/articles/Knowledge_Base_Article/Calculating-the-Checksum-of-an-API-Packet/?q=API&l=en_US&fs=Search&pn=1

Yes I have tried looking at several explanations but whenever i count the bits in between 7e and he checksum I get a different number.

You need to be counting Bytes not bits.