On Apr 6, 2006, at 09:24 , John Dobbins wrote:
I set EIP_verbosity = 10 and it appears that the identity check
(EIP_check_interface) is failing only because Get_Attribute is
returning 52 bytes where your code (ether_ip.c line 2212) requires
less than 34 bytes for the Name attribute.
Right, based on the specifications from which I worked:
"Product name
This text string may represent a short description of the
product/product family represented by the product code in
attribute 3. The same product code may have a variety of product name
strings. The maximum number of 8-bit
characters in this string shall be 32. Each of the characters shall be
in the range 0x20 to 0x7E."
So I reserved room for a max of 33 characters = 32 + '\0'.
The allowable name length might well have evolved,
so please go ahead, allow longer names,
I'll change the sources to something similar to what's shown below,
and maybe that's really all you need to use the driver with CompactLogix.
Thanks for delving into this,
-Kay
ether_ip.h
< CN_USINT name[33];
---
> CN_USINT name[100];
ether_ip.c
< if (data && len > 0 && len < 34)
---
> if (data && len > 0 && len < sizeof(info->name)-1)