C API for BALTECH SDK
bleperiph.h File Reference

**This command group is not available in our standard firmware. More...

#include "../typedefs.h"

Go to the source code of this file.

Macros

#define BRP_BlePeriph_ErrNotInactive   BRP_ERR_STATUS(0x4B00, 0x01)
 Must not call BlePeriph.DefineService after calling brp_BlePeriph_Enable() More...
 

Functions

brp_errcode brp_BlePeriph_DefineService (brp_protocol protocol, brp_buf ServiceUUID, size_t ServiceUUID_len, brp_BlePeriph_DefineService_Characteristics_Entry *Characteristics, size_t Characteristics_len)
 This command registers a new BLE service. More...
 
brp_errcode brp_BlePeriph_Enable (brp_protocol protocol, bool Activate)
 This command starts/stops the advertisement of the reader as a BLE Peripheral, so you can react to connect and all other kinds of requests. More...
 
brp_errcode brp_BlePeriph_SetDeviceName (brp_protocol protocol, brp_buf DeviceName, size_t DeviceName_len)
 This command sets the device name which should be advertized by the reader. More...
 
brp_errcode brp_BlePeriph_SetCharacteristic (brp_protocol protocol, unsigned CharacteristicNdx, brp_buf NewValue, size_t NewValue_len)
 This command changes the value of a characteristic. More...
 
brp_errcode brp_BlePeriph_GetCharacteristic (brp_protocol protocol, unsigned CharacteristicNdx, brp_buf *CurrentValue, size_t *CurrentValue_len, brp_mempool *mempool)
 This command retrieves the current value of a characteristic. More...
 
brp_errcode brp_BlePeriph_GetEvents (brp_protocol protocol, brp_BlePeriph_GetEvents_Events_Entry **Events, size_t *Events_len, brp_mempool *mempool)
 This command returns all events that have occurred since the last call of BlePeriph.GetEvents. More...
 
brp_errcode brp_BlePeriph_GetRSSI (brp_protocol protocol, unsigned *AbsRSSI)
 This command returns the RSSI value of the connected BLE Central. More...
 

Detailed Description

**This command group is not available in our standard firmware.

If you want us to activate this functionality for you, pleaseget in touch with us.**

With this command group, you can implement your own BLE peripheral protocol, i.e. your own BLE service (with its own characteristics), which will be advertised by the reader.

Before BLE can be activated via brp_BlePeriph_Enable(), you have to define your service via brp_BlePeriph_DefineService(). This will create an internal database of characteristics that can be accessed from the BRP host with the commands brp_BlePeriph_SetCharacteristic() and brp_BlePeriph_GetCharacteristic().

As soon as BLE is activated via brp_BlePeriph_Enable() and a BLE Central connects to your reader, it also has access to this internal database of characteristcs. If it connects to the reader or modifies a characteristic, you'll be informed via brp_BlePeriph_GetEvents().

Definition in file bleperiph.h.