BALTECH SDK wrapper functions reference

§ brp_BlePeriph_ReadCharacteristic()

brp_errcode brp_BlePeriph_ReadCharacteristic ( brp_BlePeriph_ReadCharacteristic_t  params)

This command retrieves the current value of a characteristic.

A characteristic will be initialized to 00 00 ... 00 when calling brp_BlePeriph_Enable() and will be modified by either the BRP host ( brp_BlePeriph_WriteCharacteristic()) or the BLE Central (via a write to the characteristic).

A characteristic can only be read when BLE is brp_BlePeriph_Enable() .

Parameters
[in]paramsStruct with the following fields:
  • protocol used to execute the command
  • CharacteristicNdx (in) The index of the characteristic to be read in the Characteristics array passed to brp_BlePeriph_DefineService(), starting with 0
  • ReadLength (in) Number of bytes to read from characteristic This value may exceed the actual characteristic size, but only the available data is returned in the response.
  • ReadValue (out)
  • ReadValue_len (out) Length of ReadValue (in bytes).
  • mempool (in) is used to store response data. Maybe NULL to use an internal mempool, in this case the data is only available until another command uses the internal mempool