jeenode - xap messages - state=?
I'm just starting out with the HAH and a couple of jeenodes.
I've got them setup with roomnode2 and rf12demo and can see data coming into the HAH from the remote device using microcom -
[RF12demo.7] A i1 g212 @ 433 MHz
Available commands:
<nn> i - set node ID (standard node ids are 1..26)
(or enter an uppercase 'A'..'Z' to set id)
<n> b - set MHz band (4 = 433, 8 = 868, 9 = 915)
<nnn> g - set network group (RFM12 only allows 212, 0 = any)
<n> c - set collect mode (advanced, normally 0)
t - broadcast max-size test packet, with ack
...,<nn> a - send data packet to node <nn>, with ack
...,<nn> s - send data packet to node <nn>, no ack
<n> l - turn activity LED on PB1 on or off
<n> q - set quiet mode (1 = don't report bad packets)
Remote control commands:
<hchi>,<hclo>,<addr>,<cmd> f - FS20 command (868 MHz)
<addr>,<dev>,<on> k - KAKU command (433 MHz)
Current configuration:
A i1 g212 @ 433 MHz
? 18 36 216 230 116 139 102 48 20 206 172 103 247 98 27 65 26 14 75 93 77
? 34 229 215 36 57 146 85 99 47 192 154 100 180 96 3 118 68 229 192 140 71
? 12 223 131 243 41 180 74 219 223 103 56 213 236 106 179 30 100 113 160 128 108
? 184 216 15 59 106 108 242 94 19 156 12 93 49 25 8 13 232 64 227 123 188
> 1q
OK 2 0 0 211 0
Have you enabled the xap-serial daemon? Via the web gui "Automation -> Assists -> Serial SCHEMA Service" ENABLE.
Are you seeing traffic coming in from this daemon? That is with xFxViewer(Windows) or xap-snoop (HAH) do you see the traffic from the dbzoo.livebox.serial endpoint?
# xap-snoop -s dbzoo.livebox.Serial
xAP Snoop - for xAP v1.2
Copyright (C) DBzoo 2009-2010
xap-header
{
v=12
hop=1
uid=FF00D500
class=Serial.Comms
source=dbzoo.livebox.Serial
}
Serial.Received
{
port=/dev/ttyUSB0
data=OK 2 0 0 171 0
}
Do you have ANY other USB serial devices on the HAH, ie CurrentCost? Are you 100% its /dev/ttyUSB0?
Plugboard does not support the -d switch - _DEBUG is an ON/OFF switch... the output will only be visible if you are running the plugboard from the command line. Make sure you only run one at a time if the other is running kill it before starting manually.
Also you CANNOT run both xap-serial AND any microcom session to the same serial port.
Brett
These modules are designed to work at 868MHz. Yours looks to be configured for 433MHz. '8b' will fix this.
Derek.
Enable serial on a BATTERY operated device is a bad idea as it will increase your power consumption.
OK for power and DEBUG NOT ok for production on batteries.
By enabling SERIAL and DEBUG you have added 10sec to the main loop due to the additional delays that where added to SLOW things down for debugging. This also means that the report period is no longer once per 150sec its 160sec. I've not examined how the Arduino libraries implement these delay() operations hopefully with an interrupt timer otherwise you are doing a busy spin (re: sucking power).
As I said not a good idea when you go production to leave these things enabled esp. for battery powered units.
Wait you've drop down the reporting period to be once every 1 second and you have 10 seconds worth of delay loops (as mentioned above due to SERIAL/DEBUG enablement. So really its once every 12 seconds (as you report every 2nd cycle). You are going to chew battery. Really you need to know the temp and light readings this often? I really advise NOT to use this with batteries unless you want to replace them every few weeks.
Brett
I've tried hooking on a variety of USB attached devices. I don't know of a way to 'force' a given device to a specific USB<n> port, but I do know that for any given setup, the devices always enumerate in the same order.
So, whilst this is a bit of a pain when you are in the setup phase and devices are being added/removed, once things settle down it's a solid environment.
Cheers,
Derek.
> ? 18 36 216 230 116 139 102 48 20 206 172 103 247 98 27 65 26 14 75 93 77
The above is wireless traffic from other devices and can be ignored. Your ttl looks fine The empty xAPBSC.info events occur when no valid message has been received, try moving the jeenode and basenode about 4-5 meters apart and see if that helps, we can work from there if it does. I would also suggest connecting the roomnode to the HAH and using microcom to check it's config.
Karl