BALTECH SDK wrapper functions reference

§ brp_BlePeriph_DefineService()

brp_errcode brp_BlePeriph_DefineService ( brp_BlePeriph_DefineService_t  params)

This command registers a new BLE service.

When a BLE Central tries to discover services, this service will be amongst the available ones.

If currently enabled, this method disables BLE implicitly. To start the service, call brp_BlePeriph_Enable() afterwards.

A maximum of 5 characteristics may be defined for the BLE service. The total size of all characteristics may not exceed 1536 bytes.

Parameters
[in]paramsStruct with the following fields:
  • protocol used to execute the command
  • ServiceUUID (in) Specifies the UUID (16 or 128 bits) of the BLE service
  • ServiceUUID_len (in) Length of ServiceUUID (in bytes).
  • Characteristics (in) List of characteristics (max. 5)
  • Characteristics_len (in) Number of elements in Characteristics.