This is an old revision of the document!
Table of Contents
Bluetooth Feeder
The Bluetooth Feeder is an OSGi bundle designed to log BLE beacon messages. Specifically, the Bluetoot Feeder detects:
- iBeacon
- EddyStone
- EddyStone TLM
The bundle requires to interact with a BLE USB dongle (detected via RXTX serial lib) through which the Bluetooth Feeder can listen for BLE messages. The Bluetooth Feeder interacts with the USB dongle by means of the bglib protocolhttps://github.com/SINTEF-9012/bglib/tree/master/bglib-protocol-1.0.3-43 (provided by SINTEF). As soon as new message is received, the Bluetooth Feeder parses publishes it through the middleware API. The topic used for publishing the messages is:
dataFeed/context/beaconX
Where X is the ID of the receiving device (see below). Message sent to the middleware has
The data feed describing the messages is:
sender rssi packet_type
Installation
You need an BLE USB dongle plugged on the instance you are provisioning with the Bluetooth Feeder.
- On windows OS: the USB dongle is usually recognized as COM port (ex: COM3)
- On Unix OS: the USB dongle is added to the /dev dir (ex /dev/ttyACM0)
Add the following feature URL:
feature:repo-add mvn:it.cnr.isti.sensorweaver.bluetooth/bluetooth-features/1.0.0-SNAPSHOT/xml/features
karaf@root()> feature:list | grep bluetooth bluetooth-feeder | 1.0.0.SNAPSHOT | x | Started | bluetooth1.0.0-SNAPSHOT | karaf@root()>
Install the bluetooth-feeder feature:
karaf@root()>feature:install bluetooth-feeder karaf@root()> WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre2 native lib Version = RXTX-2.2pre3
Configuration
The installation of the Bluetooth Feeder deploys the following configuration file on the KARAF_HOME/etc folder
it.cnr.isti.sensorweaver.bluetooth.bluetoothproducer.cfg
With the following default settings:
#Bluetooth dongle serial_port=COM3 #Logging id_receiver = 0 logging_hour=00:00:00 hour_format=HH:mm:ss #DB properties enable_db_writer=false #jdbc_class=com.mysql.jdbc.Driver jdbc_class=com.mysql.cj.jdbc.Driver db_connection=jdbc:mysql://gallina.isti.cnr.it/sniffer db_user=sniffer_user db_passwd=fyQ3V8tpoaMmImrl batch_size=1000 remove_file_after_upload=true #Sender properties sender_enabled=false adv_interval_min=300 adv_interval_max=340 tx_power=15 beacon_type=iBeacon #Eddystone frame_type: UUID, TLM, URL frame_type=UUID # EddystoneUUID namespace_id=2f234454f4911ba9ffa6 instance_id=15 # iBeacon #ef977fc020c64e1c9141f6dd2eeb7e49 ibeacon di socializeME uuid=ef977fc020c64e1c9141f6dd2eeb7e49 major=0 minor=10