2015-10-09 03:31 AM
Hello,
we have to transfer long attributes (images) on BlueTooth. We read in BLE Specifications 4.0 that this can be accomplished using the “Write Long Characteristic Values�? procedure described in 4.9.4 of part F: a sequence of Attribute ProtocolPrepare Write Request – Prepare Write Response
terminated by:
Execute Write Request - Execute Write Response
However, looking at the code, it seems that only BlueNRG MS (and not BlueNRG)
provides the offset: #define EVT_BLUE_GATT_ATTRIBUTE_MODIFIED (0x0C01) typedef __packed struct _evt_gatt_attr_modified{ uint16_t conn_handle; /**< The connection handle which modified the attribute. */ uint16_t attr_handle; /**< Handle of the attribute that was modified. */ uint8_t data_length; /**< The length of the data */ #if BLUENRG_MS ///@cond BLUENRG_MS uint16_t offset; /**< Offset from which the write has been performed by the peer device */ ///@endcond #endif uint8_t att_data[VARIABLE_SIZE]; /**< The new value (length is data_length) */ } PACKED evt_gatt_attr_modified; What happens when a prepare write is received by the BlueNRG? Is EVT_BLUE_GATT_ATTRIBUTE_MODIFIED event generated or is command rejected? Does evt_gatt_attr_modified contain at least length and data? I also wonder why an uint8_t (max value = 255) is used for data_length, as in“BlueTooth_Core_v4.0 “ Volume 3 of Part F – Attribute Protocol (ATT) section 3.2.9 ''Long Attribute Values'' I read: “The maximum length of an attribute value shall be 512 octets.�? Thanks