Programming / Configuring Nodes

7 replies [Last post]
AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012

Hi All,

Following the Livebox wiki regarding the config of the Base / Room nodes but running into some issues..

these were both sold via the shop so should come with the RFDemo pre flashed

after i enter "# microcom -s 57600 /dev/ttyUSB0"

i get [RF12demo.7] A i1 g212 @ 433 MHz

sometimes it will hang after that, occasionally it may show the below

any text entry after that seems to do weird things after

What am i doing wrong?

thanks

Current configuration:
 @ i0 g0 @ 433 MHz
> 0d
> 0i
 @ i0 g0 @ 433 MHz
config save failed
> 0o

***********************************************

# microcom -s 57600 /dev/ttyUSB0

[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
Current configuration:
 @ i0 g0 @ 433 MHz
> 0d
> 0i
 @ i0 g0 @ 433 MHz
config save failed
> 0o

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Question

How are you connecting to the HAH ? Is it PC? Telnet?

Also, can you connect the node to a PC and try via  serial monitor on arduino IDE or similar. 

What happens then?

Sorry I have no other immediate answers

 

ps did you kill xap-serial?  Not sure what happens if you don't, just a thought. 

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
setting up nodes

As Gary says check you have killed xapserial or better still connect to a PC (or MAC :-)

after you have got the current config displayed enter....

1i<return> to set address 1 for basenode or 2 etc for roomnode

8b<return> for 868Mhz

212g<return> to set group ID (212 is teh only option for RFM12 units)

This should then give you

A i1 g212 @ 868MHz

I'm not familiar with the other options for remote control and KAKU.

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Hi Garry,I connecting via

Hi Garry,

I connecting via Telnet or Putty to the HAH

Im just attempting it over Serial also using Putty - looking for a USB-Serial controller driver?

i did disable anything that was using the serial port but i will try killing the process

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Thanks Mark, That seems to

Thanks Mark,

 

That seems to have done it, rather than type i1, 8b etc i simply copied and pasted it and thats taken - possibly some strange terminal emulation going on

 

Andrew

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
After applying the

Update - after a little workaround configuring via putty i was able to get a bit further

i have however noticed that with the HAHCentral.hex the output looks fairly normal as below

[HAHCentral.1] A i2 g212 @ 868 MHz
OK 2 134 0 10 3
OK 2 133 0 10 3
OK 2 131 0 10 3
OK 2 113 0 10 3
OK 2 114 0 10 3
OK 2 135 0 10 3
OK 2 112 0 10 3

however after applying the "HAHcentral_nocfg.cpp.hex" i will receive a few OKs followed by some random bytes

whats strange is if i power off the room node, i still receive the random bytes....i thought possibly RF interference, but it doesnt explain why i only see this with the nocfg code

OK 2 14 0 10 3
OK 2 9 0 10 3
OK 2 12 0 10 3
OK 2 8 0 10 3
OK 2 9 0 10 3
OK 2 13 0 10 3
OK 2 12 0 10 3
OK 2 10 0 10 3
 ? 32 81 31 243 211 95 224 45 47 138 91 127 245 137 93 1 31 160 255 54 175
OK 2 213 0 10 3
OK 2 229 0 10 3
OK 2 217 0 10 3
OK 2 214 0 10 3
 ? 62 196 152 52 122 99 104 221 193 85 47 16 243 171 156 80 19 179 132 47 174
 ? 20 223 13 178 172 192 87 189 123 4 59 81 127 254 190 230 18 226 159 77 91
 ? 61 200 167 84 247 3 56 0 40 1 92 9 149 24 123 11 38 3 233 151 45
 ? 17 230 146 42 138 191 99 151 119 51

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Quiet mode

The HAHCentral code is based on the the rf12demo code from jeelabs. This has a command that toggles the reporting of 'bad packets'. 

case 'q': // turn quiet mode on or off (don't report bad packets)
                quiet = value;
                break;

Importantly, and unlike many other config commands, this option isn't persisted to EEPROM and the 'quiet' variable isn't initialised by the rfdemo12 code, but is set to 1 (quiet mode) in the HAHCentral code.

A bad packet is just random noise. If 'quiet' mode is selected, this doesn't get printed

if (quiet)
                return;
            Serial.print(" ?");
            if (n > 20) // print at most 20 bytes if crc is wrong

                n = 20;

I think that the 'noconfig' version of the HAHCentral was prepared by Karl (BoxingOrange), I can't recall exactly. However, if you re-hack the HAHCentral code to remove the config & the printing of 'bad' packets, you will be able to get rid of those '?' lines.

Alternatively, just ignore any lines that start with a '?'.

Cheers,
Derek.

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
thanks Derek, that certainly

thanks Derek,

 

that certainly clears that up.

 

Andrew

Hardware Info