Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
livebox:hah_hahnode:bluenode [2014/01/07 00:27] – [Observations] brett | livebox:hah_hahnode:bluenode [2014/02/18 10:36] – [BlueNode] minerva9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== BlueNode ====== | ====== BlueNode ====== | ||
- | Integration of a BlueTooth | + | Integration of a Bluetooth |
- | {{: | + | {{: |
===== 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. | + | The BlueTooth unit is connected to a JeeNode and it will perform an inquiry check for available devices every 30 seconds. |
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 22: | Line 22: | ||
===== Data Flow ===== | ===== Data Flow ===== | ||
- | A packet will arrive on the Receiver. | + | With Serial debugging enable on the bluenode sketch this is the sample output. |
+ | < | ||
+ | [BlueNode.1] - RF disabled | ||
+ | SYNC> AT | ||
+ | OK | ||
+ | SYNC> AT+NAME=blueNode | ||
+ | OK | ||
+ | SYNC> AT+ROLE=1 | ||
+ | OK | ||
+ | SYNC> AT+INIT | ||
+ | ERROR: | ||
+ | SYNC> AT+INQM=0, | ||
+ | OK | ||
+ | ASYNC> AT+INQ | ||
+ | OK | ||
+ | +INQ: | ||
+ | device=12: | ||
+ | OK | ||
+ | </ | ||
+ | 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 disabled, that's 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. | ||
+ | |||
+ | A packet will arrive on the Receiver. | ||
< | < | ||
[HAHCentral.1]1 g212 @ 868Mhz | [HAHCentral.1]1 g212 @ 868Mhz | ||
Line 45: | Line 67: | ||
</ | </ | ||
- | That something doing the decoding is an applet running inside [[livebox/ | + | That 'something' |
We are running the Lua decoder in debug mode so the lifecycle of an endpoint can be seen. | We are running the Lua decoder in debug mode so the lifecycle of an endpoint can be seen. | ||
Line 88: | Line 110: | ||
</ | </ | ||
- | All going well you should see an endpoint dynamically appear in xFXViewer when your Bluetooth device comes into range. | + | All going well, you should see an endpoint dynamically appear in xFXViewer when your Bluetooth device comes into range. |
===== Wiring / Source ===== | ===== Wiring / Source ===== | ||
Line 104: | 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 | + | The source code for the SKETCH is called |
* http:// | * http:// | ||
- | The LUA decoder logic is found in bluenode.lua or on your HAH system in / | + | The Lua decoder logic is found in bluenode.lua or on your HAH system in / |
* http:// | * http:// | ||
Line 118: | Line 140: | ||
module(..., | module(..., | ||
local monitor = require(" | local monitor = require(" | ||
- | RoomNode = require(" | + | RoomNode = require(" |
- | BlueNode = require(" | + | BlueNode = require(" |
</ | </ | ||