https://www.lairdconnect.com/iot-devices/iot-
sensors/bt510-bluetooth-5-long-range-ip67-multi-sensor
13
© Copyright 2020 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
All sensor events are recorded in a non-volatile log. The log can store seven days of measurements with a temperature sample
rate of 15 minutes. Each event has a timestamp and a sample ID. These values are the same as those found in the
advertisements.
The log can be read in FIFO mode or LIFO mode. In FIFO mode, the oldest event is retrieved first. In LIFO mode, the last event
is retrieved first.
Many systems do not require the traceability that the event log provides. When the log is full, the oldest event is overwritten.
The JSON format used for sensor configuration has too much overhead for large amounts of data. Therefore, the event log data
is transferred with a size in bytes and a Base64 encoded array of event structures.
Table 8: Event structure
Name
Size in Bytes
Description
timestamp
4
See epoch <tbd cross ref>
event data
2
The type of data depends on the event type.
Signed temperature in hundredths of degrees C, unsigned voltage in millivolts,
or Magnet State.
type
1
See Event Type <tbd cross ref>
salt
1
A counter used by sensor to differentiate events with the same timestamp
(simultaneous events).
1.
Connect to sensor.
2.
Tell the sensor to get ready to send logs in FIFO mode.
>> {"jsonrpc": "2.0", "method": "prepareLog", "params": [0], "id": 1}
<< {"jsonrpc": "2.0", "id": 1, "result": 9}
3.
Ask for 500 events. Sensor returns nine events (72/8). The sensor does not return more than 128 events per read.
>> {"jsonrpc": "2.0", "method": "readLog", "params": [500], "id": 2}
<< {"jsonrpc": "2.0", "id": 2, "result": [72,
"Ob/mXZZdLgsMAXDA5l0BAAMAdsDmXXELDACRweZdLAkBAJHB5l1HCwwB0MLmXQEAAwDowuZdAQADAOjC5l0BAAMB
"]}
4.
Acknowledge events.
>> {"jsonrpc": "2.0", "method": "ackLog", "params": [9], "id": 3}
<< {"jsonrpc": "2.0", "id": 3, "result": 9}
Note:
The sensor allows any number of events to be acknowledged
even if they haven’t been read. If more events are
acknowledged than were read and another read is issued, then blank entries are returned.
5.
Update the time (after all events have been read).
>> {"jsonrpc": "2.0", "method": "setEpoch", "params": [1575404269], "id": 4}
<< {"jsonrpc": "2.0", "id": 4, "result": "ok"}
Summary of Contents for Sentrius BT510
Page 1: ...A Version 1 3 ...