Help a beginner

7 replies [Last post]
magill
Offline
Joined: 27 Apr 2012

Hi
Please can someone help me getting started with Base and Room nodes. I tried following the wiki but it made reference to RF12demo, RFDdemo and HAHcentral, totally confusing. Derek kindly updated it to make it clearer.
However....when I type
# /etc/init.d/xap stop serial
# microcom -s 57600 /dev/ttyUSB0

and a couple of returns there is no response.

If I repeat the command I get about 100 lines of data starting with
Available commands:
  <ard node ids are 1..26)
    ase 'A'..'Z' to set id)
  <n433, 8 = 868, 9 = 915)
  <nnnM12 only allows 212, 0 = any)mode (advanced, normally 0)
 ize test packet, with ack
  .to node <nn>, with ack
  ...,node <nn>, no ack

seems to be corrupted.

I can hook the node up to my laptop and run "Putty" and configure the freq and node?
On HAH when I try to reflash the node I get

# stty -F /dev/ttyUSB0 hupcl
# avrdude -v -c arduino -p m328p -P /dev/ttyUSB0 -b 57600 -Uflash:w:HAHcentral_n
ocfg.cpp.hex

avrdude: Version 5.10, compiled on Jan 26 2012 at 19:51:44
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc_ro_fs/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.

Don't know where to go from here.

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
never done it

as i have a full programmer BUT do you have a current cost connected as well there is a small issue on reboots they sometimes swap usb0/1

 

if you do try doing it with just jeenode.

 

Dean

 

not much help i expect :(

magill
Offline
Joined: 27 Apr 2012
Hi DeanI have nothing else

Hi Dean

I have nothing else connected and DMESG shows

PL-2303 converter now attached to ttyUSB0

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Flashing

Hi John,

First check that you don't have any other services running that might be using the USB ports, just disable them through the web GUI before starting, you're right, the output does look corrupted.  Once flashed, you can hook-up the node to your laptop to configure it using putty, you'll need to know the serial port that your USB has been assigned though.

I think the reason for the corruption is why there is now the "nocfg" version, when the HAH boots with the normal code, it seems to send characters down the USB port to the node, it has been known to reconfigure the node without you wanting/realising it.  The nocfg version disable the configuration section.  

So the steps to flash a node put simply should be :-

1. Flash HAHcentral
2. Configure node id and MHz band, remember each node should have a unique id but the MHz band should be 868 on them all
3. Flash HAHcentral_nocfg for the base node OR roomnode2 for a room node

I'm not sure if any of this helps, I can probably find time to test here if you get really stuck.  See howq you get on, these are great devices, taking the HAH to a completely new level.

 

Karl

magill
Offline
Joined: 27 Apr 2012
flashing

Hi Karl
Firstly I bought the nodes from the shop and Derek informs me that they have been preconfigured with RFDdemo (he has updated the wiki). I have managed,using my PC to configure the ID and freq, but cannot flash HAHcentral_nocfg. I keep getting the same error which is:

User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
etc

thanks
John

magill
Offline
Joined: 27 Apr 2012
flashing as per wiki

Karl
found that SMS was running, so disabled and after a couple of reboots flashing process gets to:

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "HAHcentral_nocfg.cpp.hex"
avrdude: error opening HAHcentral_nocfg.cpp.hex: No such file or directory
avrdude: input file HAHcentral_nocfg.cpp.hex auto detected as invalid format
avrdude: can't open input file HAHcentral_nocfg.cpp.hex: No such file or directory
avrdude: write to file 'HAHcentral_nocfg.cpp.hex' failed

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done. Thank you.

Wiki says that with "shop" AVRs to go straight to configuration (ie bypass flashing HAHCentral)
but looking at the response above looks like I'll have to.

thanks in the meantime
John

andy
Offline
United Kingdom
Joined: 17 Mar 2012
CaSe Sensetive + typo

John,

 

I assume you curl'd your hex files from google - perhaps using the example commands from the wiki?

If so, check your filenames you downloaded for spellings you may not expect, and CaSe SenSetIvitY.

Here is a quick ls of my dev box:

 

# ls

HAHCentrol_nocfg.hex  IRNode.hex            roomnode2.hex

HAHcentral.hex        rf12demo.hex

#

notice the spelling AND CaSe of the nocfg file....
.... I think the wiki has been updated, but do check the avrdude commandline corresponds with the hex files downloaded.
---
ps: If you have a USB-BUB from jeelabs/modern devices, you can just download the PDE files from google and upload via IDE v1.0 (have not tried new 1.01). Choose the UNO for jeenodes and Duemilanove w/ATMega 328 for hahnodes.
I find the PL2303 cable (from shop) works flawlessly on HAH, but not on my laptop's USB hardware (except just for serial comms) :(
(I have not tried to work out why, no time!)
I am actually in process of doing this myself, just got all my nodes running yesterday, so I could probably help some more if needed.
3xJ's 2xH's, 1xCentral. I mounted 2 hah's in airwick, other in custom enclosures (will provide notes shortly).
If you ordered HAHnodes, you may have rec'd only 3 plugs, 2x3pin+1x2pin, I think in that case you desolder one of the airwick plugs (i used red) and solder onto the hahnode battery terminals. This is in the wiki, but on a different page to that which I was following. However, as you are flashing now, I assume you did this already.
--andy 
Hope this is of some help.

 

magill
Offline
Joined: 27 Apr 2012
Great support

Andy

I'm currently on hols but really appreciate the help.I eventually broke through and made some headway (working I think) I didn't realise that there were pde files available. They would have saved me some grief.

Thanks again

John

Hardware Info