This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540: attHandleValueNoti_t structure in att.h

Hi,

    There is a doubt which need to be clarified

In the structure attHandleValueNoti_t structure in att.h file

typedef struct

{

 uint16 handle;

uint8 len;

uint8  value[ATT_MTU_SIZE -3];

}attHandleValueNoti_t;

The field uint8 value[ATT_MTU_SIZE - 3] can it be change to uint8 value[150];

If changed what will happen ? Is there any problems associated if changed ?

Regards,

Rakesh

  • I'm not the most clued up around here, but I guess nothing will really happen except that you'll waste a bunch of memory.  You'll NEVER send a packet that big, would you?

    You do however have a valid idea in increasing it I reckon.  ATT_MTU_SIZE is defined as L2CAP_MTU_SIZE which is defined as 23, which is the minimum according to the Core V4 doc.  Perhaps rather just try and define L2CAP_MTU_SIZE as a larger value.  I also see that the default  value is 672 octets... So perhaps your 150 is not so absurd, but changing L2CAP_MTU_SIZE will mean ALL the structs will chow more memory, so I'll probably not go too big.  Just monitor your memory usage.

    My uneducated 2c  ;)

  • Thanks for your reply .

    I will try doing that, actually I am trying to catch the time interrupt happening on a GPIO pin during the raising and falling edge of the Interrupt from the sensor I am using, so i might need to send a packet with most of the 32bit interrupt time including from which sensor it coming.


    Can you suggest  me if I do uint32 instead of unit8 of the value field in the structure would change the behaviour ?

    I am changing the size of the structure variable.


    Regards,

    Rakesh

  • Hi Rakesh


    Sorry, it's been a while since I was here :)

    Don't know if you came right?  I'm about to test this also.  I've read on numerous threads that the maximum is 23 bytes (no matter how you slice it - bytes - if I understand your question correct, hence a 32bit will just be 4 bytes) as specified by Core V4, but my understanding of the Core V4 document specifies that 23 bytes is the absolute smallest allowed MTU size over an LE-U logical link.

    So here goes my testing, let's see what happens!

  • Warning[w6]: Type conflict for external/entry "GATT_Notification", in module hci_ext_app against external/entry in module gatt_server; function types differ in parameter 2; class/struct/union  
    types have different sizes

    Bugger!!  It's predefined in the external object files..  I guess we'll have to wait for TI to allow us to do this.  Looks like they are working on it according to this thread here : http://e2e.ti.com/support/wireless_connectivity/f/538/t/71381.aspx

    That being said, 1.4.0 came out November last year, the last of that thread was May.  This seems like a very simple addition to make.  Please TI!!!