Problem getting thing the HAH to work

15 replies [Last post]
ozbob
Offline
Joined: 21 Nov 2011

Hi, I recently received my semi new Livebox and HAH PCB. The kit looks good, all packed and labeled very well. The PCB however was of a new design, so it now fits a 1 wire and has the 15v relocated next to the RJ11 gain.
I have been soldering the components on the PCB, the 1 wire on board has not been updated on the wiki. So when done I even restrained my self from hooking it up and truning it on directly, instead I followed the instructios. Hooked up the HAH and measured 5.0 volt no ATMega inserted. When inserted the voltage drops to 4.90V which I guess would be ok.
So now having my HAH board seamingly ok I wanted to test it from the webpage and toggle the relay. So turning it on it takes approx 10 minutes before it becomes online. As I don't have any experience with Liveboxes or HAH I am not sure if this is normal or not. It also does not matter having the HAH board plugged in or left out.
When turning the power on the middle led lights up, than the power led starts blinking while the middle led now and than lights up. By the time the middle led is on almost continuelsy the box goes online. So when I got the box online I toggled the relays, heard clicking sound so this was looking good. At least the Livebox is talking to my HAH board. The 1Wire did show ? no reading. Since the relays were working I assumed the HAH was working ok. Next hooking up the LCD. The LCD does show booting v3.4 but then nothing happens and it remains showing this line. Trying to set the LCD using the Web interface also doesn't change this.
So it looks like parts work and some don't. I did review all the soldered connections they all look ok, the 1 wire does not have a resistor like in the wiki, this might be the reason that it does not read. I did notice there is a diode depicted behind it, not sure what this is for.
Given the fact that the relay clicks it would look like the HAH works, however the clicking sound is not allways following the web interface, at least it does not always click when toggled. The LCD getting stuck in booting rahter than showing an IP indicates that something is wrong. Currently I have checked everthing and I am not sure what the problem is. The long booting time seems odd, did see in the middle of the board it is slightly discolored and getting pretty warm. I don't know if this is common for Liveboxes. It just an observation. However it appears to be working as expected and comes up with a web interface. Than the other component in the quotation is the ATMega 328. it would appear to work gets powered and seems to trigger relays. The hooked up LCD get information from it and show booting v3.4 could it be getting stuck after this?
I hope anyone with hands on experience can let me know if my observations are normal and hopefully point me in the right direction to get it up and running normally.

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Get the Livebox running first

>So turning it on it takes approx 10 minutes before it becomes online. As I don't have any experience with Liveboxes or HAH I am not sure if this is normal or not. It also does not matter having the HAH board plugged in or left out.

The Livebox should bootup in around 40secs or so. As it boots, it goes looking on your network for a DHCP server (normally just your internet wifi router) and gets assigned an address. This, and the fact that the LCD doesn't show the IP address makes me wonder if there is perhaps an issue with DHCP.

So, I'd recommend that you unplug the PCB for now and work to get the HAH on your LAN and booting up in under a minute. If you install xFx viewer on a PC that is on the same subnet as your Livebox, you will be able to see the xAP traffic from the HAH.

Give this a try & let us know how it goes.

Derek.


ozbob
Offline
Joined: 21 Nov 2011
Hi Derek, Thanks for your

Hi Derek,

 

Thanks for your response, I did have set the HAH to have a static address, so it should not attempt to get one from DHCP, I did have XFX already up and running on a PC and I do see traffic/heartbeat comming from the box once it is up and running. So it all looks ok but it takes a long time. I recall that initially when I first truned on the box till on DHCP it also took a long time. At first I thought the box was not working. So it would not make a difference having it on DHCP or Static when booting times are concerned.

Regards,

Robert

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
A sample timing

Hmm, I'd assumed DHCP as that's what I ship out. However, static is fine. I've just set my HAH to static and timed from a power-cycle to the first xAP traffic appearing on xFx. 26 seconds.

Connecting up my HAH PCB and power-cycling again has the LCD initially showing 'Booting V3.4' and then changing to show the Static IP address after 25secs.

Changing back to 'Automatic - DHCP' mode, I get the 'Booting V3.4' as before for 25 secs, then 'Acquiring IP' until around 40secs, then the IP address. 

Does your LCD ever show the IP address? Also, do power-cycle the Livebox (rather than use 'reboot' at the telnet prompt or pressing the web UI reboot button).

One thought, I'm running Beta release 298.5 . It might be worth upping your Livebox to this. Just telnet in, and at the # prompt, enter
/etc_ro_fs/update-dev hah-beta.dbzoo.com

As for some spots on the Livebox board running a little 'hot' ... this is normal. The voltage reg that gives 5V is working hard, but is within spec. 

Hang in there ... we'll WILL get you up and running.

Derek.

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Response Time

Hi Robert,

Have you tried pinging you HAH when you boot it.  What I would do is make sure your network cable is inserted into the yellow socket properly, then from a command prompt type ping -t <hah ip>, so my ip is 192.168.1.8, I'd use ping -t 192.168.1.8

This starts to check the network interface on the HAH, and should get a response when the network interface comes up, it might give you a better indication of how long it take to boot.

The beta the Derek recommend is quite stable, so don't be worried about trying it.

Karl

brett
Offline
Providence, United States
Joined: 9 Jan 2010
About Beta's

I would not be upgrading to beta whilst you are trying to also sort out your system.  Please stick to a known production release until you get your system running then you can consider moving to a beta (if you so desire).   I make no promise that you can migrate from one beta to the next nor from a beta to a production release without manual changes, or by having to do a full firmware "clean" install first.  I can think of a few occasions where this has been true.

Brett

ozbob
Offline
Joined: 21 Nov 2011
Did some testing

Hi Derek, you are correct that I received the box in DHCP modues when I got it. I did some testing in regards of boot times. The box was shipped with FW296, I had already upgraded to 2.98 so this is the current firmware on the box giving the following bootup times: No HAH board only Livebox between switching it on and shwqoing up in XFX takes 11 minutes, doing the same with the HAH baord connected it is 13 minutes. I did notice that this time (something I never had seen before) when the HAH PCB is connected it displays the IP address that was assigend to the box. Trying to change this using the web if does not make it change. Also I tested the relays again and they seem to respond inconsistently to changes from the web interface, sometimes the do work and sometimes they don't change. Doing a ps shows the following running on the box right after reboot:

# ps
  PID USER       VSZ STAT COMMAND
    1 root      2124 S    init
    2 root         0 SW   [keventd]
    3 root         0 SWN  [ksoftirqd_CPU0]
    4 root         0 SW   [kswapd]
    5 root         0 SW   [bdflush]
    6 root         0 SW   [kupdated]
    7 root         0 SW   [mtdblockd]
    8 root         0 SW   [khubd]
   32 root         0 SWN  [jffs2_gcd_mtd2]
  108 root      1668 S    dropbear -p 22
  114 root      2108 S    telnetd -p 23
  124 root      1248 S    pure-ftpd (SERVER)
  131 root      2108 S    inetd
  142 root      1028 S    /usr/bin/xap-hub -i br0
  146 root      1076 S    /usr/bin/xap-livebox -s /dev/ttyS0 -i br0
  148 root      1416 S    /usr/bin/iServer -i br0
  154 root      4028 S    /usr/bin/kloned
  155 root      1044 S    /usr/bin/xap-serial -i br0
  160 root      3672 S    lua /etc_ro_fs/plugboard/plugboard.lua
  170 root      2140 S    -ash
  171 root      2112 R    ps
#

I think this looks as expected.

I just upgraded to the latest firmware you are using, it does not seem to alter anything, it takes again around 10 minutes before showing up in XFX, what is interesting is that the IP address reponds to ping after just 20-30 seconds when turned on. So it is the web interface and xap software that takes 10 minutes to come up after turning on the power. These last times where done not having the HAH connected, only the livebox.

Robert

ozbob
Offline
Joined: 21 Nov 2011
To late

Brett, I read your notice to late, I already upgraded to the beta firmware as was suggested by Derek. I am not to keen of having other issues on top of getting the box up and running.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Debugging

To minimize things that could be causing problems disable ALL non essential services: telnetd, iserver, serial, plugboard, ftp.  There is no point in running all this stuff on startup if you are having issues its just more chaff to try to unravel.

If the network start is coming up in 20-30 seconds buts its taking longer for the processes to start up then perhaps you have some sort of strange, dns resolution issue.  Check /etc/resolv.conf see what is in there as it will have remnants of when you where setup for DHCP.

Also if you are running static IP then its up to you to setup /etc/hosts FAILURE to do this will result in strangeness as the hosts local IP won't be known AND/OR may be incorrect as was left over from DHCP as well.

This all sounds like some sort of networking issue to me.

One more thing: I'm betting its jamming on the NTPCLIENT as you have not got something setup incorrect for static ip mode. This process does take AGES to timeout if you have incorrect setting in your system.   You can rety blanking out the NTP host setting via the webgui and see if it comes up quicker. This will effectively disable this feature.... although you want to get your network sorted so it can be enabled later on.   This makes sense becasue util the TIME is synced the IP address of the unit is not displayed.   I'll make a firmware tweak to display syncing NTP in the future to makethis easier to diagnose.

Brett

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
I have flashed a few boxes before

But never had anything like this. As Derek says always boot up within a minute.

Is it worth forcing a clean reintall back to the current Production version?

I think ths command is

# /etc/init.d/update clean

EDIT: Forget this..Sounds like Brett's got it nailed
ozbob
Offline
Joined: 21 Nov 2011
Brett, the last remark

Brett, the last remark explains the long boot time, removing the ntp entry made it reboot within 30 seconds. That mistery is now solved, I think next is to focus on the HAH board.

Last time I rebooted I saw the ip address on the lcd for the first time. When I took the power of and rebooted it was gone.... (this was also after the fw upgrade). What would be the best approach to troubleshoot the HAH board?

By the way the hosts file exists and has the localhost entry and one for the livebox with the static ip I assigned, that looks ok.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Then the issue is DNS resolution

In that case the NTP timeout is being caused by one of two things

a) an incorrect /etc/resolv.conf
b) invalid default GW

Trying doing an NSLOOKUP from the command line now of "uk.pool.ntp.org" I bet is baulks.   This is what you need to fix so you can put back NTP..... btw NTP is mandatory for anything that uses SSL that is; googlecal and twitter and SSH

SSL requries that you have no more then 2min of drift between clocks so that a key negotiation can occur.

Brett

brett
Offline
Providence, United States
Joined: 9 Jan 2010
1wire on the board

This PCB is a newer revision from the one I have which does not have a PCB mounted 1-wire sensor.   Do make sure that its correctly orientated and that the pullup resistor is inserted.  Also did you SETUP the 1wire sensor on the Automation>Configure TAB?   You must map a ROMID for it be correctly detected and used by the system.

I can see the documentation on the wiki around this area is a little fuzzy.

Brett

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Clicking relays

Note that when testing out the relays, it's a good idea to use a multimeter. Listening for 'clicks' isn't ideal as (for some strange reason) turning the relay on usually makes little or no 'click', yet turning it off again makes a noticeable 'click'.

This might lead to confusion.

Derek

ozbob
Offline
Joined: 21 Nov 2011
1wire on board
Hi Brett, so far things have been improved, now the ntp issue has been resolved the box boots in a jiffy. Since I did the firmware upgrade to version 300 it seems to have triggered the 1wire to start reading values. It now lists a romid and reads a temperature on the config page. Hwoever there is still something not right as I get bad endpoint on some of the pages. I guess this will sort it self when I hook up more 1wire devices and get the pull up resistor added. Now for my next challange I am about to see if I can get the rf to work. I currently only have access to the dutch brand klik aan klik uit KAKU for short. This is equivalent to Inter techno, not sure if it is similar to Lidle switches. I have been looking around a bit to see how rf codes are created. Seems a bit of a challange, on the other hand I found a Arduino shiled called Nodo from a Dutch guy called Paul Tonkes. This board has RF in and Out and should be able to egenerate the various coes easily. In addition the board could be hooked up to the HAH via ethernet events, which would also provide an additional node that can send 433Mhz signals. Anyway I first need to get an ATMega 328 to upgrade my Arduino before I can test this.
derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Pullup the 1-wire data line

Hi Robert,

Do fit R7 (the 1-wire bus pullup resistor). The bus operation may well be intermittent without this pullup in place.

The URF may seem challenging, but it is very flexible. It's worth taking the time to read the wiki and understand how the codes are formed.

Cheers,
Derek.

Hardware Info