Class SmartBeacon
This class contains additional requests that are specific for blukii Smart Beacons.
To quick start please follow the instructions of the quick start documentation of base
class Blukii
Note: Sensor Beacons are also handled with this class. You can check the
type via the type check methods: Blukii.isSmartBeacon()
and Blukii.isSensorBeacon()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Smart Beacon event alternation mode: MAJOR CONTINUOUSstatic final int
Smart Beacon event alternation mode: MAJOR CONTINUOUS LEDstatic final int
Smart Beacon event alternation mode: MINOR CONTINUOUSstatic final int
Smart Beacon event alternation mode: MINOR RESETstatic final int
Smart Beacon event alternation mode: OFFstatic final int
Smart Beacon event alternation mode: UNUSED.static final int
Smart Beacon event trigger: Button.static final int
Smart Beacon event trigger: Off.static final int
Smart Beacon event trigger: Ripline.static final int
Smart Beacon event trigger: Sensor.static final int
Smart Beacon event trigger: Timer.static final int
Smart Beacon frame: Eddystone TLM.static final int
Smart Beacon frame: Eddystone UID.static final int
Smart Beacon frame: Eddystone URL.static final int
Smart Beacon frame: iBeacon secure (Event Beacon only).static final int
Smart Beacon frame: iBeacon.static final int
Smart Beacon frame: InfoBeacon Acceleration.static final int
Smart Beacon frame: InfoBeacon Environment.static final int
Smart Beacon frame: InfoBeacon Magnetometer.static final int
Smart Beacon frame: No frame.static final int
Smart Beacon frame: Specialstatic final int
Smart Beacon frame advertising type: connectable.static final int
Smart Beacon frame advertising type: not connectable, no scan response.static final int
Smart Beacon frame advertising type: not connectable, with scan response.static final int
SmartBeacon Accelerometer Range: 2gstatic final int
SmartBeacon Accelerometer Range: 4gstatic final int
SmartBeacon Accelerometer Range: 8gstatic final int
SmartBeacon Sensor Measure State: Notify if connected.static final int
SmartBeacon Sensor Measure State: Off.static final int
SmartBeacon Sensor Measure State: Recording if connected.static final int
SmartBeacon Sensor Measure State: Recording if disconnected.static final int
SmartBeacon Sensor Mode: Always continuous measurement.static final int
SmartBeacon Sensor Mode: Always measurement after interrupt.static final int
SmartBeacon Sensor Mode: Measurement after interrupt if connected.static final int
SmartBeacon Sensor Mode: Measurement after interrupt if disconnected.static final int
SmartBeacon Transfer State: Data transfer is started or runningstatic final int
SmartBeacon Transfer State: Data header transfer is started or runningstatic final int
SmartBeacon Transfer State: Data transfer is off or completed.static final int
SmartBeacon Transfer State: Data reset is started or runningstatic final int
Eddystone TxPower mode: High.static final int
Eddystone TxPower mode: Low.static final int
Eddystone TxPower mode: Lowest.static final int
Eddystone TxPower mode: Medium.Fields inherited from class com.blukii.sdk.config.Blukii
FIRMWARE, HARDWARE, SETTING_BLUETOOTH_TXPOWER_VALUES_003, SETTING_BLUETOOTH_TXPOWER_VALUES_007, SETTING_BLUKII_BATTERY_TYPE_3000, SETTING_BLUKII_BATTERY_TYPE_3300, SETTING_BLUKII_BATTERY_TYPE_3600, SETTING_BLUKII_LED_FLASH_1000, SETTING_BLUKII_LED_FLASH_300, SETTING_BLUKII_LED_FLASH_50, SETTING_BLUKII_LED_OFF, SETTING_BLUKII_LED_ON_MINUTES, SETTING_BLUKII_LED_ON_SECONDS, SETTING_BLUKII_SYSTEM_RESET_FACTORY_DATA_RESET, SETTING_BLUKII_SYSTEM_RESET_FACTORY_DATA_UPDATE, SETTING_BLUKII_SYSTEM_RESET_FACTORY_FLASH_RESET, SETTING_BLUKII_SYSTEM_RESET_FACTORY_IMAGE_RESET, SETTING_BLUKII_SYSTEM_RESET_REBOOT
-
Method Summary
Modifier and TypeMethodDescriptionvoid
readDeviceTracingRssiThreshold
(ResponseListener responseListener) Reads the Device Tracing Rssi Threshold.void
readDeviceTracingScanDuration
(ResponseListener responseListener) Reads the Device Tracing Scan Duration.void
readDeviceTracingScanInterval
(ResponseListener responseListener) Reads the Device Tracing Scan Interval.void
readDeviceTracingScanPeriod
(ResponseListener responseListener) Reads the Device Tracing Scan Period.void
readDeviceTracingScanWindow
(ResponseListener responseListener) Reads the Device Tracing Scan Window.void
readEddystoneLockState
(ResponseListener responseListener) Reads the Eddystone locked state.void
readEddystoneTxPowerMeasuredLevels
(ResponseListener responseListener) Reads the measured Eddystone TxPower Levels.void
readEddystoneTxPowerMode
(ResponseListener responseListener) Reads the Eddystone TxPower Mode.void
readEddystoneTxPowerPhysicalLevels
(ResponseListener responseListener) Reads the physical Eddystone TxPower Levels.void
readEddystoneUID
(ResponseListener responseListener) Reads the Eddystone UID (namespace and instance ID).void
readEddystoneUrl
(ResponseListener responseListener) Reads the Eddystone URL.void
readEventBeaconSettings
(ResponseListener responseListener) Reads Event Beacon settings.void
readFrames
(ResponseListener responseListener) Reads the Smart Beacon selected frames.void
readIBeaconAdvertisement
(ResponseListener responseListener) Reads the iBeacon advertising data: UUID, Major, Minor and MeasuredPower.void
readRepeaterSettings
(ResponseListener responseListener) Reads the Settings for iBeacon Repeater.void
readSecureMode
(ResponseListener responseListener) Reads Secure Mode.void
readSensorAccelerometerRange
(ResponseListener responseListener) Reads the Accelerometer sensor range.void
readSensorInterruptSettings
(ResponseListener responseListener) Reads the Sensor Interrupt settings.void
readSensorIntervals
(ResponseListener responseListener) Reads the Sensor Interval settings.void
readSensorLimitedRecording
(ResponseListener responseListener) Reads the Sensor Limited Recording settings.void
readSensorMeasureState
(ResponseListener responseListener) Reads the Sensor Measure State.void
readSensorMode
(ResponseListener responseListener) Reads the the Sensor Mode.void
readSensorTransferState
(ResponseListener responseListener) Reads the Sensor Transfer State.void
readSettings
(ResponseListener responseListener) Reads the global Smart Beacon settings.void
resetEddystone
(ResponseListener responseListener) Resets all Eddystone values to factory default settings.void
syncSecureMode
(ResponseListener responseListener) Starts secure mode sync.void
writeDeviceTracingRssiThreshold
(int rssi, ResponseListener responseListener) Writes the Device Tracing Rssi Threshold.void
writeDeviceTracingScanDuration
(int duration, ResponseListener responseListener) Writes the Device Tracing Scan Duration.void
writeDeviceTracingScanInterval
(int interval, ResponseListener responseListener) Writes the Device Tracing Scan Interval.void
writeDeviceTracingScanPeriod
(int period, ResponseListener responseListener) Writes the Device Tracing Scan Period.void
writeDeviceTracingScanWindow
(int window, ResponseListener responseListener) Writes the Device Tracing Scan Window.void
writeEddystoneLock
(UUID key, ResponseListener responseListener) Locks the Eddystone settings against unauthorized changes.void
writeEddystoneTxPowerMeasuredLevels
(EddystoneTxPowerLevels eddystoneTxPowerLevels, ResponseListener responseListener) Writes the Eddystone TxPower Levels.void
writeEddystoneTxPowerMode
(int mode, ResponseListener responseListener) Writes the Eddystone TxPower Mode.void
writeEddystoneUID
(EddystoneUID eddystoneUID, ResponseListener responseListener) Writes the Eddystone UID (namespace and instance ID).void
writeEddystoneUnlock
(UUID key, ResponseListener responseListener) Unlocks the Eddystone settings.void
writeEddystoneUrl
(String url, ResponseListener responseListener) Writes the Eddystone URL.void
writeEventBeaconSettings
(EventBeaconSettings eventBeaconSettings, ResponseListener responseListener) Write Event Beacon settings.void
writeFrames
(int selectedFrames, ResponseListener responseListener) Writes the Smart Beacon selected frames.void
writeIBeaconAdvertisement
(IBeacon iBeacon, ResponseListener responseListener) Writes the iBeacon advertising data: UUID, Major, Minor and MeasuredPower.void
writeRepeaterSettings
(RepeaterSettings repeaterSettings, ResponseListener responseListener) Writes the Settings for iBeacon Repeater.void
writeSecureMode
(boolean mode, ResponseListener responseListener) Enable/Disable Secure Mode.void
writeSensorAccelerometerRange
(int range, ResponseListener responseListener) Writes the Accelerometer sensor range.void
writeSensorInterruptSettings
(SensorInterrupt interrupt, ResponseListener responseListener) Writes the Sensor Interrupt settings.void
writeSensorIntervals
(SensorIntervals intervals, ResponseListener responseListener) Writes the Sensor Interval settings.void
writeSensorLimitedRecording
(SensorLimitedRecording limitedRecording, ResponseListener responseListener) Writes the Sensor Limited Recording settings.void
writeSensorMeasureState
(int state, ResponseListener responseListener) Writes the Sensor Measure State.void
writeSensorMode
(int mode, ResponseListener responseListener) Writes the Sensor Mode.void
writeSensorTransferState
(SensorTransferCommand transferParam, ResponseListener responseListener) Writes the Sensor Transfer State.void
writeSettings
(SmartBeaconSettings smartBeaconSettings, ResponseListener responseListener) Writes the global Smart Beacon settings.Methods inherited from class com.blukii.sdk.config.Blukii
check, connect, connect, disconnect, getBluetoothDevice, getBluetoothDeviceName, getBlukiiData, getConnectionTimeout, getSubType, getType, initiatePairing, isReady, isSensorBeacon, isSmartBeacon, isSmartKey, readAdvertisingChannels, readAdvertisingUpdateDelay, readBatteryLevel, readBatteryType, readConnectionParameterDelay, readCurrentConnectionParameter, readDelayedAdvertisingInterval, readDelayedConnectionParameter, readDelayedDisconnect, readEnergySaveSettings, readInitialAdvertisingInterval, readLimitedAdvertising, readRssi, readRTC, readSecureConnect, readStateCounter, readTemperature, readTxPower, resetStateCounter, setConnectionTimeout, syncRTC, updateData, updateFirmware, updateFirmware, writeAdvertisingChannels, writeAdvertisingUpdateDelay, writeBatteryType, writeConnectionParameterDelay, writeCurrentConnectionParameter, writeDelayedAdvertisingInterval, writeDelayedConnectionParameter, writeDelayedDisconnect, writeEnergySaveSettings, writeInitialAdvertisingInterval, writeLEDMode, writeLimitedAdvertising, writeSecureConnect, writeSecureKey, writeSystemReset, writeTemperature, writeTxPower
-
Field Details
-
SETTING_BEACON_FRAME_NONE
public static final int SETTING_BEACON_FRAME_NONESmart Beacon frame: No frame. -
SETTING_BEACON_FRAME_INFOBEACON_ENVIRONMENT
public static final int SETTING_BEACON_FRAME_INFOBEACON_ENVIRONMENTSmart Beacon frame: InfoBeacon Environment. -
SETTING_BEACON_FRAME_INFOBEACON_ACCELERATION
public static final int SETTING_BEACON_FRAME_INFOBEACON_ACCELERATIONSmart Beacon frame: InfoBeacon Acceleration. -
SETTING_BEACON_FRAME_INFOBEACON_MAGNETOMETER
public static final int SETTING_BEACON_FRAME_INFOBEACON_MAGNETOMETERSmart Beacon frame: InfoBeacon Magnetometer. -
SETTING_BEACON_FRAME_EDDYSTONE_UID
public static final int SETTING_BEACON_FRAME_EDDYSTONE_UIDSmart Beacon frame: Eddystone UID. -
SETTING_BEACON_FRAME_EDDYSTONE_URL
public static final int SETTING_BEACON_FRAME_EDDYSTONE_URLSmart Beacon frame: Eddystone URL. -
SETTING_BEACON_FRAME_EDDYSTONE_TLM
public static final int SETTING_BEACON_FRAME_EDDYSTONE_TLMSmart Beacon frame: Eddystone TLM. -
SETTING_BEACON_FRAME_SPECIAL
public static final int SETTING_BEACON_FRAME_SPECIALSmart Beacon frame: Special -
SETTING_BEACON_FRAME_IBEACON
public static final int SETTING_BEACON_FRAME_IBEACONSmart Beacon frame: iBeacon. -
SETTING_BEACON_FRAME_EVENTBEACON_SECURE
public static final int SETTING_BEACON_FRAME_EVENTBEACON_SECURESmart Beacon frame: iBeacon secure (Event Beacon only). -
SETTING_BEACON_SELECTED_ADVERTISING_TYPE_CONNECTABLE_SCANRESPONSE
public static final int SETTING_BEACON_SELECTED_ADVERTISING_TYPE_CONNECTABLE_SCANRESPONSESmart Beacon frame advertising type: connectable. -
SETTING_BEACON_SELECTED_ADVERTISING_TYPE_NONCONNECTABLE_SCANRESPONSE
public static final int SETTING_BEACON_SELECTED_ADVERTISING_TYPE_NONCONNECTABLE_SCANRESPONSESmart Beacon frame advertising type: not connectable, with scan response. -
SETTING_BEACON_SELECTED_ADVERTISING_TYPE_NONCONNECTABLE_NOSCANRESPONSE
public static final int SETTING_BEACON_SELECTED_ADVERTISING_TYPE_NONCONNECTABLE_NOSCANRESPONSESmart Beacon frame advertising type: not connectable, no scan response. -
SETTING_BEACON_EVENT_ALTERNATION_MODE_UNUSED
public static final int SETTING_BEACON_EVENT_ALTERNATION_MODE_UNUSEDSmart Beacon event alternation mode: UNUSED.Because alternation mode is an new feature since version 002.015 this mode is set for all older versions.
-
SETTING_BEACON_EVENT_ALTERNATION_MODE_OFF
public static final int SETTING_BEACON_EVENT_ALTERNATION_MODE_OFFSmart Beacon event alternation mode: OFFiBeacon Minor and Major base value will be constantly sent
-
SETTING_BEACON_EVENT_ALTERNATION_MODE_MINOR_CONTINUOUS
public static final int SETTING_BEACON_EVENT_ALTERNATION_MODE_MINOR_CONTINUOUSSmart Beacon event alternation mode: MINOR CONTINUOUSiBeacon Minor will be increased each event until Modulo - 1 (see
EventBeaconSettings.getIBeaconAlternationModulo()
) -
SETTING_BEACON_EVENT_ALTERNATION_MODE_MINOR_RESET
public static final int SETTING_BEACON_EVENT_ALTERNATION_MODE_MINOR_RESETSmart Beacon event alternation mode: MINOR RESETiBeacon Minor will be increased each event until Modulo - 1 (see
EventBeaconSettings.getIBeaconAlternationModulo()
).After event duration (see
EventBeaconSettings.getEventDuration()
) iBeacon Minor is reset to base value. -
SETTING_BEACON_EVENT_ALTERNATION_MODE_MAJOR_RESET
public static final int SETTING_BEACON_EVENT_ALTERNATION_MODE_MAJOR_RESETSmart Beacon event alternation mode: MAJOR CONTINUOUSiBeacon Major will be increased each event until Modulo - 1 (see
EventBeaconSettings.getIBeaconAlternationModulo()
).After event duration (see
EventBeaconSettings.getEventDuration()
) iBeacon Major is reset to base value. -
SETTING_BEACON_EVENT_ALTERNATION_MODE_MAJOR_RESET_LED
public static final int SETTING_BEACON_EVENT_ALTERNATION_MODE_MAJOR_RESET_LEDSmart Beacon event alternation mode: MAJOR CONTINUOUS LEDiBeacon Major will be increased each event until Modulo - 1 (see
EventBeaconSettings.getIBeaconAlternationModulo()
).After event duration (see
EventBeaconSettings.getEventDuration()
) iBeacon Major is reset to base value.Red LED is visualising the alternation state for complete event duration:
- Major + 0: fast blink (interval 50ms)
- Major + 1: slow blink (interval 300ms)
- Major + 2: continuously on
- Major + >2: continuously off
-
SETTING_BEACON_EVENT_TRIGGER_OFF
public static final int SETTING_BEACON_EVENT_TRIGGER_OFFSmart Beacon event trigger: Off. -
SETTING_BEACON_EVENT_TRIGGER_BUTTON
public static final int SETTING_BEACON_EVENT_TRIGGER_BUTTONSmart Beacon event trigger: Button. -
SETTING_BEACON_EVENT_TRIGGER_RIPLINE
public static final int SETTING_BEACON_EVENT_TRIGGER_RIPLINESmart Beacon event trigger: Ripline. -
SETTING_BEACON_EVENT_TRIGGER_TIMER
public static final int SETTING_BEACON_EVENT_TRIGGER_TIMERSmart Beacon event trigger: Timer. -
SETTING_BEACON_EVENT_TRIGGER_SENSOR
public static final int SETTING_BEACON_EVENT_TRIGGER_SENSORSmart Beacon event trigger: Sensor. -
SETTING_EDDYSTONE_TXPOWER_MODE_LOWEST
public static final int SETTING_EDDYSTONE_TXPOWER_MODE_LOWESTEddystone TxPower mode: Lowest. -
SETTING_EDDYSTONE_TXPOWER_MODE_LOW
public static final int SETTING_EDDYSTONE_TXPOWER_MODE_LOWEddystone TxPower mode: Low. -
SETTING_EDDYSTONE_TXPOWER_MODE_MEDIUM
public static final int SETTING_EDDYSTONE_TXPOWER_MODE_MEDIUMEddystone TxPower mode: Medium. -
SETTING_EDDYSTONE_TXPOWER_MODE_HIGH
public static final int SETTING_EDDYSTONE_TXPOWER_MODE_HIGHEddystone TxPower mode: High. -
SETTING_BEACON_SENSOR_MEASURE_STATE_OFF
public static final int SETTING_BEACON_SENSOR_MEASURE_STATE_OFFSmartBeacon Sensor Measure State: Off. -
SETTING_BEACON_SENSOR_MEASURE_STATE_NOFITY_CONNECTED
public static final int SETTING_BEACON_SENSOR_MEASURE_STATE_NOFITY_CONNECTEDSmartBeacon Sensor Measure State: Notify if connected. -
SETTING_BEACON_SENSOR_MEASURE_STATE_RECORDING_CONNECTED
public static final int SETTING_BEACON_SENSOR_MEASURE_STATE_RECORDING_CONNECTEDSmartBeacon Sensor Measure State: Recording if connected. -
SETTING_BEACON_SENSOR_MEASURE_STATE_RECORDING_DISCONNECTED
public static final int SETTING_BEACON_SENSOR_MEASURE_STATE_RECORDING_DISCONNECTEDSmartBeacon Sensor Measure State: Recording if disconnected. -
SETTING_BEACON_SENSOR_MODE_CONTINUOUS_ALWAYS
public static final int SETTING_BEACON_SENSOR_MODE_CONTINUOUS_ALWAYSSmartBeacon Sensor Mode: Always continuous measurement. -
SETTING_BEACON_SENSOR_MODE_INTERRUPT_CONNECTED
public static final int SETTING_BEACON_SENSOR_MODE_INTERRUPT_CONNECTEDSmartBeacon Sensor Mode: Measurement after interrupt if connected. -
SETTING_BEACON_SENSOR_MODE_INTERRUPT_DISCONNECTED
public static final int SETTING_BEACON_SENSOR_MODE_INTERRUPT_DISCONNECTEDSmartBeacon Sensor Mode: Measurement after interrupt if disconnected. -
SETTING_BEACON_SENSOR_MODE_INTERRUPT_ALWAYS
public static final int SETTING_BEACON_SENSOR_MODE_INTERRUPT_ALWAYSSmartBeacon Sensor Mode: Always measurement after interrupt. -
SETTING_BEACON_SENSOR_TRANSFER_STATE_OFF
public static final int SETTING_BEACON_SENSOR_TRANSFER_STATE_OFFSmartBeacon Transfer State: Data transfer is off or completed. -
SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_DATA
public static final int SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_DATASmartBeacon Transfer State: Data transfer is started or running -
SETTING_BEACON_SENSOR_TRANSFER_STATE_RESET_DATA
public static final int SETTING_BEACON_SENSOR_TRANSFER_STATE_RESET_DATASmartBeacon Transfer State: Data reset is started or running -
SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_HEADERS
public static final int SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_HEADERSSmartBeacon Transfer State: Data header transfer is started or running -
SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_2G
public static final int SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_2GSmartBeacon Accelerometer Range: 2g -
SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_4G
public static final int SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_4GSmartBeacon Accelerometer Range: 4g -
SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_8G
public static final int SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_8GSmartBeacon Accelerometer Range: 8g
-
-
Method Details
-
readFrames
Reads the Smart Beacon selected frames.See
writeFrames(int, ResponseListener)
for more information.Note: valid for Firmware versions: 006.xxx
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeFrames
Writes the Smart Beacon selected frames.Note: valid for Firmware versions: 006.xxx
Values: (Bitwise Set of following constants)
- Parameters:
selectedFrames
- a bitwise set of selected framesresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSettings
Reads the global Smart Beacon settings.See
writeSettings(SmartBeaconSettings, ResponseListener)
for more information.Note: valid for Firmware versions: 002.xxx and 003.xxx
ResponseData:
BlukiiDataItem Type
-SmartBeaconSettings
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSettings
public void writeSettings(SmartBeaconSettings smartBeaconSettings, @NonNull ResponseListener responseListener) Writes the global Smart Beacon settings.Use a
SmartBeaconSettings
object to define settings.Note: valid for Firmware versions: 002.xxx and 003.xxx
ResponseData:
BlukiiDataItem Type
-SmartBeaconSettings
- Parameters:
smartBeaconSettings
- Set of global Smart Beacon settingsresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSecureMode
Reads Secure Mode.If Secure Mode is enabled the beacon sends a random mac address and a encrypted iBeacon (major/minor) Advertising.
Note: This feature must be unlocked on blukii purchase.
ResponseData:
BlukiiDataItem Type
-SmartBeaconSecureMode
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSecureMode
Enable/Disable Secure Mode.If Secure Mode is enabled the beacon sends a random mac address and a encrypted iBeacon Advertising.
To finally activate secure mode you have to call
syncSecureMode(ResponseListener)
. If you don't sync secure mode, the beacon sends a random mac address and a major and minor of 0. You also can't decrypt your beacon via blukii cloud if you haven't synced secure mode.Values:
true
to enablefalse
to disable
Note: This feature must be unlocked on blukii purchase.
ResponseData:
BlukiiDataItem Type
-SmartBeaconSecureMode
- Parameters:
mode
-true
to enable secure mode,false
to disable secure moderesponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
syncSecureMode
Starts secure mode sync.This finally activates secure mode on your blukii.
After the final activation the beacon sends a random mac address and a encrypted iBeacon (major/minor) advertising.
That you can encrypt your blukii via blukii cloud, this method sets the blukii real time clock to UTC time.
See
readSecureMode(ResponseListener)
andwriteSecureMode(boolean, ResponseListener)
for more information.- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEventBeaconSettings
Reads Event Beacon settings.Note: This feature must be unlocked on blukii purchase.
ResponseData:
BlukiiDataItem Type
-EventBeaconSettings
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEventBeaconSettings
public void writeEventBeaconSettings(EventBeaconSettings eventBeaconSettings, @NonNull ResponseListener responseListener) Write Event Beacon settings.ResponseData:
BlukiiDataItem Type
-EventBeaconSettings
- Parameters:
eventBeaconSettings
-EventBeaconSettings
object which defines the settingsresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readIBeaconAdvertisement
Reads the iBeacon advertising data: UUID, Major, Minor and MeasuredPower.ResponseData:
BlukiiDataItem Type
-IBeacon
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeIBeaconAdvertisement
Writes the iBeacon advertising data: UUID, Major, Minor and MeasuredPower.ResponseData:
BlukiiDataItem Type
-IBeacon
- Parameters:
iBeacon
-IBeacon
object, which defines UUID, Major, Minor & MeasuredPowerresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readRepeaterSettings
Reads the Settings for iBeacon Repeater.ResponseData:
BlukiiDataItem Type
-RepeaterSettings
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeRepeaterSettings
public void writeRepeaterSettings(RepeaterSettings repeaterSettings, @NonNull ResponseListener responseListener) Writes the Settings for iBeacon Repeater.ResponseData:
BlukiiDataItem Type
-RepeaterSettings
- Parameters:
repeaterSettings
-IBeacon
object, which defines Repeater Settings for primary and event advertisingresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEddystoneUID
Reads the Eddystone UID (namespace and instance ID).ResponseData:
BlukiiDataItem Type
-EddystoneUID
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEddystoneUID
public void writeEddystoneUID(EddystoneUID eddystoneUID, @NonNull ResponseListener responseListener) Writes the Eddystone UID (namespace and instance ID).ResponseData:
BlukiiDataItem Type
-EddystoneUID
- Parameters:
eddystoneUID
-EddystoneUID
object, which defines Namespace & InstanceresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEddystoneUrl
Reads the Eddystone URL.ResponseData:
BlukiiDataItem Type
-String
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEddystoneUrl
Writes the Eddystone URL.ResponseData:
BlukiiDataItem Type
-String
- Parameters:
url
- url stringresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEddystoneLockState
Reads the Eddystone locked state.Values:
true
: Eddystone is lockedfalse
: Eddystone is unlocked
ResponseData:
BlukiiDataItem Type
-Boolean
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEddystoneLock
Locks the Eddystone settings against unauthorized changes.Note: Eddystone will be lock with a secret key. You can unlock (see
writeEddystoneUnlock(UUID, ResponseListener)
) with this key only.ResponseData:
BlukiiDataItem Type
-null
- Parameters:
key
- secret lock key as UUIDresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEddystoneUnlock
Unlocks the Eddystone settings.Note: You only can unlock, if Eddystone is locked and if you know the secret key that is set by
writeEddystoneLock(UUID, ResponseListener)
.ResponseData:
BlukiiDataItem Type
-null
- Parameters:
key
- UUID as secret lock keyresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEddystoneTxPowerPhysicalLevels
Reads the physical Eddystone TxPower Levels.ResponseData:
BlukiiDataItem Type
-EddystoneTxPowerLevels
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEddystoneTxPowerMeasuredLevels
Reads the measured Eddystone TxPower Levels.ResponseData:
BlukiiDataItem Type
-EddystoneTxPowerLevels
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEddystoneTxPowerMeasuredLevels
public void writeEddystoneTxPowerMeasuredLevels(EddystoneTxPowerLevels eddystoneTxPowerLevels, @NonNull ResponseListener responseListener) Writes the Eddystone TxPower Levels.You can define the measured TxPower strength for each Eddystone TxPower Mode (see
writeEddystoneTxPowerMode(int, ResponseListener)
) that is received at 0 meters from the device.See also the Google definition for Tx Power Level.
ResponseData:
BlukiiDataItem Type
-EddystoneTxPowerLevels
- Parameters:
eddystoneTxPowerLevels
-EddystoneTxPowerLevels
object, which defines the levelsresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readEddystoneTxPowerMode
Reads the Eddystone TxPower Mode.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeEddystoneTxPowerMode
Writes the Eddystone TxPower Mode.This action sets the physical TxPower strength. You can choose between 4 modes that's physical power is defined by the blukii device.
Values:
SETTING_EDDYSTONE_TXPOWER_MODE_LOWEST
SETTING_EDDYSTONE_TXPOWER_MODE_LOW
SETTING_EDDYSTONE_TXPOWER_MODE_MEDIUM
SETTING_EDDYSTONE_TXPOWER_MODE_HIGH
See also the Google definition for Tx Power Mode.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
mode
- TxPower mode, a constant valueresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
resetEddystone
Resets all Eddystone values to factory default settings.Note: This action is only valid if Eddystone is not locked (see
readEddystoneLockState(ResponseListener)
).ResponseData:
BlukiiDataItem Type
-null
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorMeasureState
Reads the Sensor Measure State.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorMeasureState
Writes the Sensor Measure State.The measure state is a combined value of the following operating states:
SETTING_BEACON_SENSOR_MEASURE_STATE_NOFITY_CONNECTED
: Sensor value notifications, if the beacon is connected.SETTING_BEACON_SENSOR_MEASURE_STATE_RECORDING_CONNECTED
: Sensor value recording, if the beacon is connected.SETTING_BEACON_SENSOR_MEASURE_STATE_RECORDING_DISCONNECTED
: Sensor value recording, if the beacon is disconnected.
SETTING_BEACON_SENSOR_MEASURE_STATE_OFF
: no notifications or recordingNote: If operating state
SETTING_BEACON_SENSOR_MEASURE_STATE_NOFITY_CONNECTED
is set thenResponseListener.onNotify(ResponseData)
is called every Measure Interval (seewriteSensorIntervals(SensorIntervals, ResponseListener)
).ResponseData:
ResponseListener.onResponse(ResponseData)
:BlukiiDataItem Type
-Integer
ResponseListener.onNotify(ResponseData)
:BlukiiDataItem Type
-AccelerometerValue
- Parameters:
state
- Combination of sensor measure operating statesresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorMode
Reads the the Sensor Mode.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorMode
Writes the Sensor Mode.The Sensor Mode defines if the measurement is done continuously or after interrupt during connected or disconnected state.
Values:
SETTING_BEACON_SENSOR_MODE_CONTINUOUS_ALWAYS
: Sensor measurement is done continuously if the beacon is connected or disconnected.SETTING_BEACON_SENSOR_MODE_INTERRUPT_CONNECTED
: Sensor measurement is triggered by interrupt if the beacon is connected, continuously if disconnected.SETTING_BEACON_SENSOR_MODE_INTERRUPT_DISCONNECTED
: Sensor measurement is triggered by interrupt if the beacon is disconnected, continuously if connected.SETTING_BEACON_SENSOR_MODE_INTERRUPT_ALWAYS
: Sensor measurement is triggered by interrupt if the beacon is connected or disconnected.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
mode
- Sensor moderesponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorIntervals
Reads the Sensor Interval settings.ResponseData:
BlukiiDataItem Type
-SensorIntervals
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorIntervals
public void writeSensorIntervals(SensorIntervals intervals, @NonNull ResponseListener responseListener) Writes the Sensor Interval settings.You have to set the following interval durations:
SensorIntervals.setMeasureInterval(int)
Interval (in ms) of sensor data measurement (seewriteSensorMeasureState(int, ResponseListener)
).SensorIntervals.setTransferInterval(int)
Interval (in ms) of sensor data transfer (seewriteSensorTransferState(SensorTransferCommand, ResponseListener)
).
ResponseData:
BlukiiDataItem Type
-SensorIntervals
- Parameters:
intervals
- Sensor interval settingsresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorTransferState
Reads the Sensor Transfer State.The response contains the current running Transfer state (see
writeSensorTransferState(SensorTransferCommand, ResponseListener)
). After the action has been finished, the state automatically changes toSETTING_BEACON_SENSOR_TRANSFER_STATE_OFF
.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorTransferState
public void writeSensorTransferState(SensorTransferCommand transferParam, @NonNull ResponseListener responseListener) Writes the Sensor Transfer State.This write command starts a data transfer action:
SETTING_BEACON_SENSOR_TRANSFER_STATE_OFF
: Stops the data transfer action if running.SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_DATA
: Starts the transfer of recorded sensor data.SETTING_BEACON_SENSOR_TRANSFER_STATE_RESET_DATA
: Resets all recorded sensor data in flash memory.SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_HEADERS
: Starts the transfer of data headers only.
Note: If transfer state
SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_DATA
orSETTING_BEACON_SENSOR_TRANSFER_STATE_GET_HEADERS
is active then thenResponseListener.onNotify(ResponseData)
is called every Transfer Interval (seewriteSensorIntervals(SensorIntervals, ResponseListener)
).Sensor datasets are transferred sequentially according to the following transfer protocol.
It consists of 3 types of notification packets (
ResponseListener.onNotify(ResponseData)
):- Dataset header:
BlukiiDataItem Type
-SensorRecordingHeader
- Data value:
BlukiiDataItem Type
-AccelerometerValue
- Transfer finished:
BlukiiDataItem Type
-SensorTransferFinish
Protocol sequence:
- Dataset 1 header
- Data value 1 of dataset 1
- …
- Data value N1 of dataset 1
- Dataset 2 header
- Data value 1 of dataset 2
- …
- Data value N2 of dataset 2
- …
- Dataset M header
- Data value 1 of dataset M
- …
- Data value NM of dataset M
- Transfer finished
Note: If transfer state
SETTING_BEACON_SENSOR_TRANSFER_STATE_GET_DATA
orSETTING_BEACON_SENSOR_TRANSFER_STATE_GET_HEADERS
is active then thenResponseListener.onNotify(ResponseData)
is called every Transfer Interval (seewriteSensorIntervals(SensorIntervals, ResponseListener)
).ResponseData:
forResponseListener.onResponse(ResponseData)
:BlukiiDataItem Type
-SensorTransferCommand
- Parameters:
transferParam
- Sensor Transfer State CommandresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorAccelerometerRange
Reads the Accelerometer sensor range.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorAccelerometerRange
Writes the Accelerometer sensor range.Values:
SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_2G
: Range +2g...-2g).SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_4G
: Range +4g...-4g).SETTING_BEACON_SENSOR_ACCELEROMETER_RANGE_8G
: Range +8g...-8g).
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
range
- Accelerometer RangeresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorInterruptSettings
Reads the Sensor Interrupt settings.ResponseData:
BlukiiDataItem Type
-SensorInterrupt
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorInterruptSettings
public void writeSensorInterruptSettings(SensorInterrupt interrupt, @NonNull ResponseListener responseListener) Writes the Sensor Interrupt settings.You have to set the following values:
SensorInterrupt.setActiveThreshold(int)
: Active threshold: must be exceeded by at least one accelerometer axis (relative to the idle value) in order to trigger an interrupt.SensorInterrupt.setInactiveThreshold(int)
: Inactive threshold: must be undercut (relative to the last idle value) after an interrupt in order to allow a new interrupt.SensorInterrupt.setMeasureCount(int)
: Measure count: amount of sensor values that are measured after an interrupt.
ResponseData:
BlukiiDataItem Type
-SensorInterrupt
- Parameters:
interrupt
- Sensor interrupt settingsresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readSensorLimitedRecording
Reads the Sensor Limited Recording settings.ResponseData:
BlukiiDataItem Type
-SensorLimitedRecording
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeSensorLimitedRecording
public void writeSensorLimitedRecording(SensorLimitedRecording limitedRecording, @NonNull ResponseListener responseListener) Writes the Sensor Limited Recording settings.You have to set the following values:
SensorLimitedRecording.setMaxCount(int)
: Limited amount of recorded sensor values in defined timespan (max 511, 0: no limit).SensorLimitedRecording.setTimespan(int)
: Duration in seconds for limited amount of recorded sensor values.
ResponseData:
BlukiiDataItem Type
-SensorLimitedRecording
- Parameters:
limitedRecording
- Sensor Limited Recording settingsresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readDeviceTracingScanPeriod
Reads the Device Tracing Scan Period.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeDeviceTracingScanPeriod
Writes the Device Tracing Scan Period.Scan Period: Period (in seconds) of collecting other Device Tracing frames, until the own Device Tracing frame is updated.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
period
- Device Tracing Scan PeriodresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readDeviceTracingScanDuration
Reads the Device Tracing Scan Duration.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeDeviceTracingScanDuration
public void writeDeviceTracingScanDuration(int duration, @NonNull ResponseListener responseListener) Writes the Device Tracing Scan Duration.Scan Duration: Duration (in ms) after the internal BLE scan is restarted.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
duration
- Device Tracing Scan DurationresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readDeviceTracingScanInterval
Reads the Device Tracing Scan Interval.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeDeviceTracingScanInterval
public void writeDeviceTracingScanInterval(int interval, @NonNull ResponseListener responseListener) Writes the Device Tracing Scan Interval.Scan Interval: Interval (in ms) after the BLE channel (37, 38, 39) is alternated.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
interval
- Device Tracing Scan IntervalresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readDeviceTracingScanWindow
Reads the Device Tracing Scan Window.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeDeviceTracingScanWindow
Writes the Device Tracing Scan Window.Scan Window: Time window (in ms) as part of the Scan Interval in which the BLE unit is listening for advertising packets.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
window
- Device Tracing Scan IntervalresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
readDeviceTracingRssiThreshold
Reads the Device Tracing Rssi Threshold.ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
responseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-
writeDeviceTracingRssiThreshold
Writes the Device Tracing Rssi Threshold.Rssi Threshold: Advertising packets are only received if the RSSI value is higher than or equal to the threshold.
ResponseData:
BlukiiDataItem Type
-Integer
- Parameters:
rssi
- Device Tracing Rssi ThresholdresponseListener
-ResponseListener
on which callbacksonResponse
,onError
oronNotify
are called- See Also:
-