livebox:hah_hahnode:bluenode

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
livebox:hah_hahnode:bluenode [2014/02/13 15:10] – [Data Flow] minerva9livebox:hah_hahnode:bluenode [2014/02/18 10:40] – [Data Flow] minerva9
Line 1: Line 1:
 ====== BlueNode ====== ====== BlueNode ======
  
-Integration of a BlueTooth sensor onto a JeeNode for the purposes of detecting devices as they come into, and go out of, range so that events can be triggered.+Integration of a Bluetooth sensor onto a JeeNode for the purpose of detecting devices as they come into, and go out of, range so that events can be triggered.
  
 {{:livebox:hah_hahnode:hc-05-top1.jpg?280|}} {{:livebox:hah_hahnode:hc-05-bottom.jpg?280|}} {{:livebox:hah_hahnode:hc-05-top1.jpg?280|}} {{:livebox:hah_hahnode:hc-05-bottom.jpg?280|}}
Line 8: Line 8:
 ===== Theory of operation ===== ===== Theory of operation =====
  
-The BlueTooth unit is connected to a JeeNode and it will perform an inquiry check for available devices every 30 seconds.  As each device reports in, its device ID will be transmitted via the RFM12B. A total of 6 bytes are needed to represent the 48 bit address, to a receiving unit.+The Bluetooth unit is connected to a JeeNode and it will perform an inquiry check for available devices every 30 seconds (adjustable).  As each device reports in, its device ID will be transmitted via the RFM12B. A total of 6 bytes are needed to represent the 48 bit address, to a receiving unit.
  
 On the receiver side the RF is decoded and transmitted as an ASCII string out the serial port for decoding. On the receiver side the RF is decoded and transmitted as an ASCII string out the serial port for decoding.
Line 14: Line 14:
 [[livebox/xap_serial]] will pickup the serial transmission from our receiver node and transmit this data as an xAP message for decoding. [[livebox/xap_serial]] will pickup the serial transmission from our receiver node and transmit this data as an xAP message for decoding.
  
-The decoder is an Lua applet that creates a BSC endpoint dynamically sending a xAPBSC ON event when the device is first registered.  As long as the device updates itself within 35 seconds, the endpoint will remain alive.  When the device moves out of range a reaper will take care of expiring the endpoint sending an xAPBSC OFF event and removing the endpoint.+The decoder is Lua applet that creates a BSC endpoint dynamically sending a xAPBSC ON event when the device is first registered.  As long as the device updates itself within 35 seconds, the endpoint will remain alive.  When the device moves out of range a reaper will take care of expiring the endpoint sending an xAPBSC OFF event and removing the endpoint.
  
 These on/off events can then be used by other scripts to drive an action. These on/off events can then be used by other scripts to drive an action.
Line 22: Line 22:
 ===== Data Flow ===== ===== Data Flow =====
  
-With Serial debugging enable on the bluenode sketch this is the sample output.+With Serial debugging enabled on the bluenode sketch this is the sample output.
 <code> <code>
 [BlueNode.1] - RF disabled [BlueNode.1] - RF disabled
Line 41: Line 41:
 OK OK
 </code> </code>
-The ERROR:(17) can be safely ignore that just means the SPP profile lib has already been initialized. +The ERROR:(17) can be safely ignored. That just means the SPP profile lib has already been initialized. 
-You will notice the RF module is disable, that due to me running the bluetooth device attached to my arduino which does not have any RF device on it so I disabled that code whilst testing.+You will notice the RF module is disabled, that'due to me running the bluetooth device attached to my Arduino which does not have any RF device on itso I disabled that code whilst testing.
  
-A packet will arrive on the Receiver.  The first byte is the sender node ID, in this case its node 18.  The remaining data is the Device ID packed into 6 bytes.+A packet will arrive on the Receiver.  The first byte is the sender node ID, in this case it'node 18.  The remaining data is the Device ID packed into 6 bytes.
 <code> <code>
 [HAHCentral.1]1 g212 @ 868Mhz [HAHCentral.1]1 g212 @ 868Mhz
Line 110: Line 110:
 </code> </code>
  
-All going well you should see an endpoint dynamically appear in xFXViewer when your Bluetooth device comes into range.+All going wellyou should see an endpoint dynamically appear in xFXViewer when your Bluetooth device comes into range.
  
 ===== Wiring / Source ===== ===== Wiring / Source =====
Line 126: Line 126:
 We don't connect the 5v pins together, 3.3v is sufficient. We don't connect the 5v pins together, 3.3v is sufficient.
  
-The source code for the SKETCH is call BlueNode there is also a useful terminal emulator that uses the Arduino as a passthrough device.+The source code for the SKETCH is called BlueNode. There is also a useful terminal emulator that uses the Arduino as a passthrough device.
   * http://livebox-hah.googlecode.com/svn/trunk/userapps/arduino/Bluetooth/   * http://livebox-hah.googlecode.com/svn/trunk/userapps/arduino/Bluetooth/
  
  • livebox/hah_hahnode/bluenode.txt
  • Last modified: 2014/02/18 10:42
  • by minerva9