1 Reply Latest reply on Feb 17, 2015 9:41 AM by MichaelF_56

    How to use "LEGATTDB_PERM_VARIABLE_LENGTH"

      Hello,

       

      SDK:2.1.1

      Hardware:Tag board + iPhone

       

      I want to send variable data from client(iPhone) to the tag-board.

      I have checked some samples and documents, and I found a description of setting "LEGATTDB_PERM_VARIABLE_LENGTH" in MMP920732SW-AN103-R application note, P12, table2.

       

      Does any body know how to set this setting?

       

      The samples just have the setting function CHARACTERISTIC_UUID128_WRITABLE () for write characteristic, and it need the length information like this.


      CHARACTERISTIC_UUID128_WRITABLE (HDLC_VSP_VSP_TX,

        HDLC_VSP_VSP_TX_VALUE,

      __UUID_VSP_VSP_TX,

      LEGATTDB_CHAR_PROP_WRITE_NO_RESPONSE,

      LEGATTDB_PERM_WRITE_CMD,

      16), ect...

       

      It sets the data length, so the length is always 16 or something even iPhone sent other length data.

       

      I want to like this,

       

      When I sent data

       

      0x00 0x00

       

      then I want to get two byte of 0x00.

       

      When I sent

       

      0x00 0x00 0x00

       

      then I want to get three byte of 0x00.

       

      I changed the setting LEGATTDB_PERM_WRITE_CMD to LEGATTDB_PERM_VARIABLE_LENGTH.


      I want to get 16byte data paket, so I can not add a length data in the data.