User Tools

Site Tools


sensorweaver:bluetooth-feeder

This is an old revision of the document!


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 (replace with the serial port bound with te USB dongle)
 
#Logging
#The ID used to build an unique topic, every instance must have a different ID)
id_receiver = 0 
 
#DB Not used, it is possibile to enable a db writer together with the middleware publisher
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: it is possibile to enable the dongle beaconing
sender_enabled=false
#adv frequency as range. Minimum advertisement interval in units of 625us Range: 0x20 to 0x4000
Default: 0x200 (320ms)
adv_interval_min=300
adv_interval_max=340
#power of transmission
tx_power=15
 
#Type of beacon sent
beacon_type=iBeacon
 
#Settings for EddyStone beacon format
#Eddystone frame_type: UUID, TLM, URL
frame_type=UUID
# EddystoneUUID
namespace_id=2f234454f4911ba9ffa6
instance_id=15
 
#Settings of iBeacon format
# iBeacon
uuid=ef977fc020c64e1c9141f6dd2eeb7e49
major=0
minor=10
sensorweaver/bluetooth-feeder.1506412329.txt.gz · Last modified: 2017-09-26 07:52 by michele

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki