The ruuvi bluetooth environment sensor tag has a myriad of uses. Unfortunately many people find it difficult to accesss the data because of the bluetooth protocol.
jakoavain
is a simple tool to distribute the data collected by a beacon to the file domain on nearly any system.
This allows people with no bluethooth or network experience to work on their favorite system with their favorite language to make useful applications.
newsyslog
or logrotate
)
to archive & compress or expire files based on size or age.
The system that initally receives the bluetooth packets can be running MS windows, Mac OS or linux.
It can receive and forward packets from any number of tags.
hcidump --timestamp --raw |\
grep --file beaconAddresses --line-buffered --after-context=1 |\
sed --unbuffered "N ;s/\n//; "| # join 2 lines together
logger -p local7.info
The file beaconAddresses
contains the MAC addresses of the beacons to proceses one per line
in the format: xx:xx:xx:xx:xx
hcidump
formats packets like:
2018-04-16 19:36:46.080953 > 04 3E 17 02 01 00 00 AE 3B 97 75 32 4C 0B 02 01 06 07 FF 4C 00 10 02 0B 00 B7
grep
selects the packets based on the MAC address. Since hcidump
outputs multiple lines for each packet,
it is neccessary to have sed
is used to put the multiple lines into a single line before sending the data to the logger
.
syslogd
is the system daemon which accepts messages from logger
./etc/syslog.conf
contains the specifications for handling all syslog messages.
Either use ftp
to retrieve the current /etc/syslog.conf
, save it , edit it to add the required line and then use ftp to put it back.
or
use ssh to log in to the system, copy the current /etc/syslog.conf
to a save version and the edit /etc/syslog.conf
local7.info @anotherHost
local7.info /media/data/beacons
/etc/logrotate.conf
Update it as with the /etc/syslog.conf
file, to include a line like:/media/data/beacons owner:staff 640 3 100 * JThis specifies that when the data file is archived a new file is inialized with the
ownerID:groupID
and permissions of 640
3
generations will be retained. 100
/media/data/beacons { rotate 3 compress size 100k }
Ingics BLE <-> wifi and iGS02E BLE <-& gt; wifi more details
iGS01 iGS01 (£69.60) gateway listens for beacons, gets their advertising data and forwards it on to your server or an IoT server via TCP, HTTP(S) or MQTT. Can be used to feed back-end systems that report on the presence or absence of iBeacon or Eddystone beacons or act on beacon sensor (e.g. accelerometer, temperature, light, humidity) data.
TimeScale time-series database.