User Tools

Site Tools


sensorweaver:bluetooth-feeder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sensorweaver:bluetooth-feeder [2017-09-26 07:42] – created michelesensorweaver:bluetooth-feeder [2017-09-26 08:01] (current) michele
Line 1: Line 1:
 ===== Bluetooth Feeder ===== ===== Bluetooth Feeder =====
-The Bluetooth Feeder is an OSGi bundle designed to log BLE beacon messages. Specifically, the Bluetoot Feeder detects: +The Bluetooth Feeder is an OSGi bundle designed to log BLE beacon messages. Specifically, the Bluetoot Feeder provides the following functionalities 
-  * iBeacon +  * Detect iBeacon, EddyStone, EddyStone TLM 
-  * EddyStone +  * Publish the beacon messages on the middleware 
-  * EddyStone TLM+  * (optionally to test) write the beacon messages on a DB 
 +  * log on a file the beacon messages  
 +  * enable the USB dongle to send beacon messages
  
-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 protocol[[https://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 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 protocol[[https://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 and publishes it through the middleware API.
 The topic used for publishing the messages is: The topic used for publishing the messages is:
  
Line 11: Line 13:
 dataFeed/context/beaconX dataFeed/context/beaconX
 </code> </code>
-Where X is the ID of the receiving device (see below). Message sent to the middleware has +Where X is the ID of the receiving device (see below). 
  
 The data feed describing the messages is:  The data feed describing the messages is: 
Line 22: Line 24:
  
 ==== Installation ==== ==== Installation ====
-You need an BLE USB dongle plugged on the instance you are provisioning with the Bluetooth Feeder. +You need 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 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)   * On Unix OS: the USB dongle is added to the /dev dir (ex /dev/ttyACM0)
  
-Add the following feature URL:+Be sure the following MVN repositories are added on your karaf instnace 
 +<code console> 
 +    http://repository.springsource.com/maven/bundles/external@id=spring-ebr-repository@snapshots@noreleases,
 +    http://ala.isti.cnr.it:8081/nexus/content/repositories/wnlab-releases@id=wnlab-releases,
 +    http://ala.isti.cnr.it:8081/nexus/content/repositories/wnlab-snapshots@id=wnlab-snapshots@snapshots,
 +    http://maven.thingml.org/thingml-release/ 
 + 
 +</code> 
 + 
 + 
 +Add the following feature URL on the Karaf console:
 <code console> <code console>
 feature:repo-add mvn:it.cnr.isti.sensorweaver.bluetooth/bluetooth-features/1.0.0-SNAPSHOT/xml/features feature:repo-add mvn:it.cnr.isti.sensorweaver.bluetooth/bluetooth-features/1.0.0-SNAPSHOT/xml/features
 </code> </code>
 +
  
 <code console> <code console>
Line 45: Line 58:
 </code> </code>
  
 +Please not that, since the Bluetooth Feeder relies on a configuration file, such file might contain default settings not valid for you instance. If  you need to update the configuration: 
 +  - edit the file (KARAF_HOME/etc/it.cnr.isti.sensorweaver.bluetooth.bluetoothproducer.cfg 
 +  - stop the bluetooth-feeder bundle 
 +  - start the bluetooth-feeder bundle 
 + 
  
 ==== Configuration ==== ==== Configuration ====
Line 57: Line 74:
  
 #Bluetooth dongle #Bluetooth dongle
-serial_port=COM3+serial_port=COM3 (replace with the serial port bound with te USB dongle)
  
 #Logging #Logging
-id_receiver = 0 +#The ID used to build an unique topic, every instance must have a different ID) 
-logging_hour=00:00:00 +id_receiver = 0 
-hour_format=HH:mm:ss+
  
- +#DB Not used, it is possibile to enable a db writer together with the middleware publisher 
-#DB +enable_db_writer=false 
-properties +
-enable_db_writer=false+
 #jdbc_class=com.mysql.jdbc.Driver #jdbc_class=com.mysql.jdbc.Driver
 jdbc_class=com.mysql.cj.jdbc.Driver jdbc_class=com.mysql.cj.jdbc.Driver
Line 76: Line 90:
 remove_file_after_upload=true remove_file_after_upload=true
  
-#Sender properties+#Sender properties: it is possibile to enable the dongle beaconing
 sender_enabled=false 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_min=300
 adv_interval_max=340 adv_interval_max=340
 +#power of transmission
 tx_power=15 tx_power=15
  
 +#Type of beacon sent
 beacon_type=iBeacon beacon_type=iBeacon
-#Eddystone frame_type: UUID, + 
-TLM, URL+#Settings for EddyStone beacon format 
 +#Eddystone frame_type: UUID, TLM, URL
 frame_type=UUID frame_type=UUID
 # EddystoneUUID # EddystoneUUID
 namespace_id=2f234454f4911ba9ffa6 namespace_id=2f234454f4911ba9ffa6
 instance_id=15 instance_id=15
 +
 +#Settings of iBeacon format
 # iBeacon # iBeacon
-#ef977fc020c64e1c9141f6dd2eeb7e49 ibeacon di socializeME 
 uuid=ef977fc020c64e1c9141f6dd2eeb7e49 uuid=ef977fc020c64e1c9141f6dd2eeb7e49
 major=0 major=0
sensorweaver/bluetooth-feeder.1506411753.txt.gz · Last modified: 2017-09-26 07:42 by michele

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