TI BLE Stack API Documentation
2.03.08
|
Functions | |
bStatus_t | GATT_ExchangeMTU (uint16 connHandle, attExchangeMTUReq_t *pReq, uint8 taskId) |
This sub-procedure is used by the client to set the ATT_MTU to the maximum possible value that can be supported by both devices when the client supports a value greater than the default ATT_MTU for the Attribute Protocol. This sub-procedure shall only be initiated once during a connection. More... | |
bStatus_t | GATT_DiscAllPrimaryServices (uint16 connHandle, uint8 taskId) |
This sub-procedure is used by a client to discover all the primary services on a server. More... | |
bStatus_t | GATT_DiscPrimaryServiceByUUID (uint16 connHandle, uint8 *pUUID, uint8 len, uint8 taskId) |
This sub-procedure is used by a client to discover a specific primary service on a server when only the Service UUID is known. The primary specific service may exist multiple times on a server. The primary service being discovered is identified by the service UUID. More... | |
bStatus_t | GATT_FindIncludedServices (uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId) |
This sub-procedure is used by a client to find include service declarations within a service definition on a server. The service specified is identified by the service handle range. More... | |
bStatus_t | GATT_DiscAllChars (uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId) |
This sub-procedure is used by a client to find all the characteristic declarations within a service definition on a server when only the service handle range is known. The service specified is identified by the service handle range. More... | |
bStatus_t | GATT_DiscCharsByUUID (uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId) |
This sub-procedure is used by a client to discover service characteristics on a server when only the service handle ranges are known and the characteristic UUID is known. The specific service may exist multiple times on a server. The characteristic being discovered is identified by the characteristic UUID. More... | |
bStatus_t | GATT_DiscAllCharDescs (uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId) |
This sub-procedure is used by a client to find all the characteristic descriptor's Attribute Handles and Attribute Types within a characteristic definition when only the characteristic handle range is known. The characteristic specified is identified by the characteristic handle range. More... | |
bStatus_t | GATT_ReadCharValue (uint16 connHandle, attReadReq_t *pReq, uint8 taskId) |
This sub-procedure is used to read a Characteristic Value from a server when the client knows the Characteristic Value Handle. The ATT Read Request is used with the Attribute Handle parameter set to the Characteristic Value Handle. The Read Response returns the Characteristic Value in the Attribute Value parameter. More... | |
bStatus_t | GATT_ReadUsingCharUUID (uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId) |
This sub-procedure is used to read a Characteristic Value from a server when the client only knows the characteristic UUID and does not know the handle of the characteristic. More... | |
bStatus_t | GATT_ReadLongCharValue (uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId) |
This sub-procedure is used to read a Characteristic Value from a server when the client knows the Characteristic Value Handle and the length of the Characteristic Value is longer than can be sent in a single Read Response Attribute Protocol message. More... | |
bStatus_t | GATT_ReadMultiCharValues (uint16 connHandle, attReadMultiReq_t *pReq, uint8 taskId) |
This sub-procedure is used to read multiple Characteristic Values from a server when the client knows the Characteristic Value Handles. The Attribute Protocol Read Multiple Requests is used with the Set Of Handles parameter set to the Characteristic Value Handles. The Read Multiple Response returns the Characteristic Values in the Set Of Values parameter. More... | |
bStatus_t | GATT_WriteNoRsp (uint16 connHandle, attWriteReq_t *pReq) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle and the client does not need an acknowledgement that the write was successfully performed. This sub-procedure only writes the first (ATT_MTU - 3) octets of a Characteristic Value. This sub-procedure can not be used to write a long characteristic; instead the Write Long Characteristic Values sub-procedure should be used. More... | |
bStatus_t | GATT_SignedWriteNoRsp (uint16 connHandle, attWriteReq_t *pReq) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle and the ATT Bearer is not encrypted. This sub-procedure shall only be used if the Characteristic Properties authenticated bit is enabled and the client and server device share a bond as defined in the GAP. More... | |
bStatus_t | GATT_WriteCharValue (uint16 connHandle, attWriteReq_t *pReq, uint8 taskId) |
This sub-procedure is used to write a characteristic value to a server when the client knows the characteristic value handle. This sub-procedure only writes the first (ATT_MTU-3) octets of a characteristic value. This sub-procedure can not be used to write a long attribute; instead the Write Long Characteristic Values sub-procedure should be used. More... | |
bStatus_t | GATT_WriteLongCharValue (uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle but the length of the Characteristic Value is longer than can be sent in a single Write Request Attribute Protocol message. More... | |
bStatus_t | GATT_ReliableWrites (uint16 connHandle, attPrepareWriteReq_t *pReqs, uint8 numReqs, uint8 flags, uint8 taskId) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle, and assurance is required that the correct Characteristic Value is going to be written by transferring the Characteristic Value to be written in both directions before the write is performed. This sub-procedure can also be used when multiple values must be written, in order, in a single operation. More... | |
bStatus_t | GATT_ReadCharDesc (uint16 connHandle, attReadReq_t *pReq, uint8 taskId) |
This sub-procedure is used to read a characteristic descriptor from a server when the client knows the characteristic descriptor declaration's Attribute handle. More... | |
bStatus_t | GATT_ReadLongCharDesc (uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId) |
This sub-procedure is used to read a characteristic descriptor from a server when the client knows the characteristic descriptor declaration's Attribute handle and the length of the characteristic descriptor declaration is longer than can be sent in a single Read Response attribute protocol message. More... | |
bStatus_t | GATT_WriteCharDesc (uint16 connHandle, attWriteReq_t *pReq, uint8 taskId) |
This sub-procedure is used to write a characteristic descriptor value to a server when the client knows the characteristic descriptor handle. More... | |
bStatus_t | GATT_WriteLongCharDesc (uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle but the length of the Characteristic Value is longer than can be sent in a single Write Request Attribute Protocol message. More... | |
bStatus_t GATT_DiscAllCharDescs | ( | uint16 | connHandle, |
uint16 | startHandle, | ||
uint16 | endHandle, | ||
uint8 | taskId | ||
) |
This sub-procedure is used by a client to find all the characteristic descriptor's Attribute Handles and Attribute Types within a characteristic definition when only the characteristic handle range is known. The characteristic specified is identified by the characteristic handle range.
The ATT Find Information Request is used with the Starting Handle set to starting handle of the specified characteristic and the Ending Handle set to the ending handle of the specified characteristic. The UUID Filter parameter is NULL (zero length).
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_FIND_INFO_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_FIND_INFO_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
startHandle | - starting handle |
endHandle | - end handle |
taskId | - task to be notified of response |
bStatus_t GATT_DiscAllChars | ( | uint16 | connHandle, |
uint16 | startHandle, | ||
uint16 | endHandle, | ||
uint8 | taskId | ||
) |
This sub-procedure is used by a client to find all the characteristic declarations within a service definition on a server when only the service handle range is known. The service specified is identified by the service handle range.
The ATT Read By Type Request is used with the Attribute Type parameter set to the UUID for "Characteristic". The Starting Handle is set to starting handle of the specified service and the Ending Handle is set to the ending handle of the specified service.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_READ_BY_TYPE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BY_TYPE_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
startHandle | - starting handle |
endHandle | - end handle |
taskId | - task to be notified of response |
bStatus_t GATT_DiscAllPrimaryServices | ( | uint16 | connHandle, |
uint8 | taskId | ||
) |
This sub-procedure is used by a client to discover all the primary services on a server.
The ATT Read By Group Type Request is used with the Attribute Type parameter set to the UUID for "Primary Service". The Starting Handle is set to 0x0001 and the Ending Handle is set to 0xFFFF.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_READ_BY_GRP_TYPE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BY_GRP_TYPE_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
taskId | - task to be notified of response |
bStatus_t GATT_DiscCharsByUUID | ( | uint16 | connHandle, |
attReadByTypeReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used by a client to discover service characteristics on a server when only the service handle ranges are known and the characteristic UUID is known. The specific service may exist multiple times on a server. The characteristic being discovered is identified by the characteristic UUID.
The ATT Read By Type Request is used with the Attribute Type is set to the UUID for "Characteristic" and the Starting Handle and Ending Handle parameters is set to the service handle range.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_READ_BY_TYPE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BY_TYPE_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_DiscPrimaryServiceByUUID | ( | uint16 | connHandle, |
uint8 * | pUUID, | ||
uint8 | len, | ||
uint8 | taskId | ||
) |
This sub-procedure is used by a client to discover a specific primary service on a server when only the Service UUID is known. The primary specific service may exist multiple times on a server. The primary service being discovered is identified by the service UUID.
The ATT Find By Type Value Request is used with the Attribute Type parameter set to the UUID for "Primary Service" and the Attribute Value set to the 16-bit Bluetooth UUID or 128-bit UUID for the specific primary service. The Starting Handle shall be set to 0x0001 and the Ending Handle shall be set to 0xFFFF.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_FIND_BY_TYPE_VALUE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_FIND_BY_TYPE_VALUE_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pUUID | - pointer to service UUID to look for |
len | - length of value |
taskId | - task to be notified of response |
bStatus_t GATT_ExchangeMTU | ( | uint16 | connHandle, |
attExchangeMTUReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used by the client to set the ATT_MTU to the maximum possible value that can be supported by both devices when the client supports a value greater than the default ATT_MTU for the Attribute Protocol. This sub-procedure shall only be initiated once during a connection.
The ATT Exchange MTU Request is used by this sub-procedure.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT message. The type of the message will be either ATT_EXCHANGE_MTU_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_EXCHANGE_MTU_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_FindIncludedServices | ( | uint16 | connHandle, |
uint16 | startHandle, | ||
uint16 | endHandle, | ||
uint8 | taskId | ||
) |
This sub-procedure is used by a client to find include service declarations within a service definition on a server. The service specified is identified by the service handle range.
The ATT Read By Type Request is used with the Attribute Type parameter set to the UUID for "Included Service". The Starting Handle is set to starting handle of the specified service and the Ending Handle is set to the ending handle of the specified service.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_READ_BY_TYPE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BY_TYPE_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
startHandle | - starting handle |
endHandle | - end handle |
taskId | - task to be notified of response |
bStatus_t GATT_ReadCharDesc | ( | uint16 | connHandle, |
attReadReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to read a characteristic descriptor from a server when the client knows the characteristic descriptor declaration's Attribute handle.
The ATT Read Request is used for this sub-procedure. The Read Request is used with the Attribute Handle parameter set to the characteristic descriptor handle. The Read Response returns the characteristic descriptor value in the Attribute Value parameter.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT message. The type of the message will be either ATT_READ_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_ReadCharValue | ( | uint16 | connHandle, |
attReadReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to read a Characteristic Value from a server when the client knows the Characteristic Value Handle. The ATT Read Request is used with the Attribute Handle parameter set to the Characteristic Value Handle. The Read Response returns the Characteristic Value in the Attribute Value parameter.
The Read Response only contains a Characteristic Value that is less than or equal to (ATT_MTU - 1) octets in length. If the Characteristic Value is greater than (ATT_MTU - 1) octets in length, the Read Long Characteristic Value procedure may be used if the rest of the Characteristic Value is required.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT message. The type of the message will be either ATT_READ_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_ReadLongCharDesc | ( | uint16 | connHandle, |
attReadBlobReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to read a characteristic descriptor from a server when the client knows the characteristic descriptor declaration's Attribute handle and the length of the characteristic descriptor declaration is longer than can be sent in a single Read Response attribute protocol message.
The ATT Read Blob Request is used to perform this sub-procedure. The Attribute Handle parameter shall be set to the characteristic descriptor handle. The Value Offset parameter shall be the offset within the characteristic descriptor to be read.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_READ_BLOB_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BLOB_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_ReadLongCharValue | ( | uint16 | connHandle, |
attReadBlobReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to read a Characteristic Value from a server when the client knows the Characteristic Value Handle and the length of the Characteristic Value is longer than can be sent in a single Read Response Attribute Protocol message.
The ATT Read Blob Request is used in this sub-procedure.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_READ_BLOB_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BLOB_RSP (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_ReadMultiCharValues | ( | uint16 | connHandle, |
attReadMultiReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to read multiple Characteristic Values from a server when the client knows the Characteristic Value Handles. The Attribute Protocol Read Multiple Requests is used with the Set Of Handles parameter set to the Characteristic Value Handles. The Read Multiple Response returns the Characteristic Values in the Set Of Values parameter.
The ATT Read Multiple Request is used in this sub-procedure.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT message. The type of the message will be either ATT_READ_MULTI_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_MULTI_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_ReadUsingCharUUID | ( | uint16 | connHandle, |
attReadByTypeReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to read a Characteristic Value from a server when the client only knows the characteristic UUID and does not know the handle of the characteristic.
The ATT Read By Type Request is used to perform the sub-procedure. The Attribute Type is set to the known characteristic UUID and the Starting Handle and Ending Handle parameters shall be set to the range over which this read is to be performed. This is typically the handle range for the service in which the characteristic belongs.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT messages. The type of the message will be either ATT_READ_BY_TYPE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_READ_BY_TYPE_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_ReliableWrites | ( | uint16 | connHandle, |
attPrepareWriteReq_t * | pReqs, | ||
uint8 | numReqs, | ||
uint8 | flags, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle, and assurance is required that the correct Characteristic Value is going to be written by transferring the Characteristic Value to be written in both directions before the write is performed. This sub-procedure can also be used when multiple values must be written, in order, in a single operation.
The sub-procedure has two phases, the first phase prepares the characteristic values to be written. Once this is complete, the second phase performs the execution of all of the prepared characteristic value writes on the server from this client.
In the first phase, the ATT Prepare Write Request is used. In the second phase, the attribute protocol Execute Write Request is used.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_PREPARE_WRITE_RSP, ATT_EXECUTE_WRITE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_PREPARE_WRITE_RSP (with bleTimeout status), ATT_EXECUTE_WRITE_RSP (with SUCCESS or bleTimeout status), or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
Note: The 'pReqs' pointer will be freed when the sub-procedure is complete.
connHandle | - connection to use |
pReqs | - pointer to requests to be sent (must be allocated) |
numReqs | - number of requests in pReq |
flags | - execute write request flags |
taskId | - task to be notified of response |
bStatus_t GATT_SignedWriteNoRsp | ( | uint16 | connHandle, |
attWriteReq_t * | pReq | ||
) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle and the ATT Bearer is not encrypted. This sub-procedure shall only be used if the Characteristic Properties authenticated bit is enabled and the client and server device share a bond as defined in the GAP.
This sub-procedure only writes the first (ATT_MTU - 15) octets of an Attribute Value. This sub-procedure cannot be used to write a long Attribute.
The ATT Write Command is used for this sub-procedure. The Attribute Handle parameter shall be set to the Characteristic Value Handle. The Attribute Value parameter shall be set to the new Characteristic Value authenticated by signing the value, as defined in the Security Manager.
No response will be sent to the calling application task for this sub-procedure. If the authenticated Characteristic Value that is written is the wrong size, or has an invalid value as defined by the profile, or the signed value does not authenticate the client, then the write will not succeed and no error will be generated by the server.
connHandle | - connection to use |
pReq | - pointer to command to be sent |
bStatus_t GATT_WriteCharDesc | ( | uint16 | connHandle, |
attWriteReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to write a characteristic descriptor value to a server when the client knows the characteristic descriptor handle.
The ATT Write Request is used for this sub-procedure. The Attribute Handle parameter shall be set to the characteristic descriptor handle. The Attribute Value parameter shall be set to the new characteristic descriptor value.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT message. The type of the message will be either ATT_WRITE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_WRITE_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_WriteCharValue | ( | uint16 | connHandle, |
attWriteReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to write a characteristic value to a server when the client knows the characteristic value handle. This sub-procedure only writes the first (ATT_MTU-3) octets of a characteristic value. This sub-procedure can not be used to write a long attribute; instead the Write Long Characteristic Values sub-procedure should be used.
The ATT Write Request is used in this sub-procedure. The Attribute Handle parameter shall be set to the Characteristic Value Handle. The Attribute Value parameter shall be set to the new characteristic.
If the return status from this function is SUCCESS, the calling application task will receive an OSAL GATT_MSG_EVENT message. The type of the message will be either ATT_WRITE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_WRITE_RSP (with SUCCESS or bleTimeout status) or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_WriteLongCharDesc | ( | uint16 | connHandle, |
attPrepareWriteReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle but the length of the Characteristic Value is longer than can be sent in a single Write Request Attribute Protocol message.
The ATT Prepare Write Request and Execute Write Request are used to perform this sub-procedure.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_PREPARE_WRITE_RSP, ATT_EXECUTE_WRITE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_PREPARE_WRITE_RSP (with bleTimeout status), ATT_EXECUTE_WRITE_RSP (with SUCCESS or bleTimeout status), or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
Note: The 'pReq->pValue' pointer will be freed when the sub-procedure is complete.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_WriteLongCharValue | ( | uint16 | connHandle, |
attPrepareWriteReq_t * | pReq, | ||
uint8 | taskId | ||
) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle but the length of the Characteristic Value is longer than can be sent in a single Write Request Attribute Protocol message.
The ATT Prepare Write Request and Execute Write Request are used to perform this sub-procedure.
If the return status from this function is SUCCESS, the calling application task will receive multiple OSAL GATT_MSG_EVENT messages. The type of the messages will be either ATT_PREPARE_WRITE_RSP, ATT_EXECUTE_WRITE_RSP or ATT_ERROR_RSP (if an error occurred on the server).
Note: This sub-procedure is complete when either ATT_PREPARE_WRITE_RSP (with bleTimeout status), ATT_EXECUTE_WRITE_RSP (with SUCCESS or bleTimeout status), or ATT_ERROR_RSP (with SUCCESS status) is received by the calling application task.
Note: The 'pReq->pValue' pointer will be freed when the sub-procedure is complete.
connHandle | - connection to use |
pReq | - pointer to request to be sent |
taskId | - task to be notified of response |
bStatus_t GATT_WriteNoRsp | ( | uint16 | connHandle, |
attWriteReq_t * | pReq | ||
) |
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle and the client does not need an acknowledgement that the write was successfully performed. This sub-procedure only writes the first (ATT_MTU - 3) octets of a Characteristic Value. This sub-procedure can not be used to write a long characteristic; instead the Write Long Characteristic Values sub-procedure should be used.
The ATT Write Command is used for this sub-procedure. The Attribute Handle parameter shall be set to the Characteristic Value Handle. The Attribute Value parameter shall be set to the new Characteristic Value.
No response will be sent to the calling application task for this sub-procedure. If the Characteristic Value write request is the wrong size, or has an invalid value as defined by the profile, then the write will not succeed and no error will be generated by the server.
connHandle | - connection to use |
pReq | - pointer to command to be sent |