Can't flash heatermeter from linkmeter


 
Thanks for the answer.

I tried the USBtiny again but the normal upload doesen´t work.

So I tried the "upload with programmer" an the output was many signs and at the end

avrdude: 22900 bytes of flash written
avrdude: verifying flash memory against C:\DOKUME~1\Lu\LOKALE~1\Temp\build7685395257386320146.tmp\heatermeter.cpp.hex:
avrdude: load data flash data from input file C:\DOKUME~1\Lu\LOKALE~1\Temp\build7685395257386320146.tmp\heatermeter.cpp.hex:
avrdude: input file C:\DOKUME~1\Lu\LOKALE~1\Temp\build7685395257386320146.tmp\heatermeter.cpp.hex contains 22900 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 27.61s

avrdude: verifying ...
avrdude: 22900 bytes of flash verified

avrdude done. Thank you.


Is this ok now?

because If I try to update the avr with the web interface it doesn´t work.

But I don´t know if I have the right wiring.

Here is a picture of that.

If this is wrong, can someone tell me how it is right? Maybe with a picture?

 
Yeah the problem is that if you flash the HeaterMeter program with the USBtinyISP, it will be installed in the "user program" area and erase the bootloader. Then the AVR won't boot because the bootloader is blank. If you flash just the bootloader, then the web interface won't work unless you release the RESET button at just the right time. This can be avoided by a cleverly crafted set of avrdude commands and the ISP programmer, but it should work with just the bootloader then reset thing:

-- Use your USBtinyISP to program the "Arduino UNO" bootloader
-- Add a debugging wire. Solder a short wire onto the lower R23 pad. The other end of this is going to be connected to pin 15 of the AVR. Don't solder it, we'll just hold it in place when needed.

-- Install the HeaterMeter board into the router and power it up. Hold the wire onto pin 15 and press and release the RESET button on HeaterMeter. The LED should blink (this is Optiboot blinking the LED). If it doesn't then odds are there is a power problem and the HeaterMeter isn't booting.
-- The LED blinks! This is good. Now try flashing the HeaterMeter
Code:
wget -O hm.hex http://capnbry.net/linkmeter/snapshots/trunk/heatermeter.cpp.hex
hmdude -v -v -v -v -U hm.hex
Don't forget you'll need to hold RESET down and release it when it says "Release RESET now"
-- Try it a few times, making sure to time the RESET release. If it doesn't work then there's most likely a serial problem. That I can't tell you how to fix because it is a magical mystery why some of these devices seem to have serial problems.
-- It uploads! If you're still not getting data, make sure you've got the baud set right.
Code:
uci set lucid.linkmeter.serial_baud=38400
uci commit lucid
/etc/init.d/lucid restart
 
Hey.
I tried the option with the debug wire and the LED was not blinking.
So I bought the parts again and soldered a new board with the debug wire.
I installed the bootloader with the USBTiny and connected the board with the router.
And when I hold the wire to pad 15 and press the reset button the LED was blinking.
Then I tried to install the HM-Software but it didn´t work.
But this time I think it worked with the avrdude and the USBTiny and the –D command.
Because next time I installed the board into the router the LED blinks 2 times.
Is this a sign for the HM-software is working?
I have no probes at the moment but a fan and a LCD.
When I install this 2 things the fan is doing nothing and the LCD backlight is on but it shows nothing.
Is this good or is there any problem again?
And if its not what do I have to do that the fan is spinning and the LCD is showing something?
 
-- If the LED blinks twice when you hold the wire to pad 15 and press reset that is good. That means the bootloader is installed
-- Does the LED blink twice when you press reset without the wire connected? If so that is good because HeaterMeter is also installed
-- For a proper installation, the LED should blink both with and without the wire held to pin 15.

-- If you have that, try adjusting the contrast on the LCD all the way one way or the other using the potentiometer and a small screwdriver.
-- The fan will not come on by default with no probe attached so that's ok.
 
Yes it blinks twice with and without the wire.
I tried now to adjust the LCD with the resistor (I use a 20K ohm because i have no 10k but this shouldn´t be a problem or is it) but i only can juice between
blank or first row with black squares and the second row blank.
I have an LCD with green background 16x2.
Could it be that I have the wrong software version of the heatermeater?
I don´t know what version of software I have because the row in the web interface with the version is empty.
 
Yeah the 20k ohm is fine for the contrast, I've even used a 50k without a problem. Basically if you turn the knob and it changes contrast, you're good to go. (Assuming you mean a 20k ohm potentiometer and not a straight resistor).

If you flashed this (no A at the end):
http://capnbry.net/linkmeter/snapshots/trunk/heatermeter.cpp.hex

Then you have flashed heatermeter for a v3.2 board. If you have a v3.1 board this will not work and you'll need the "A" version of heatermeter. It sounds like the AVR is actually running though so it is odd that you're not seeing the version number in the web interface. Did you check the baud rate in /etc/config/lucid? It should be 38400.
 
Hey.

I flashed the avr again right now and reinstalled the bootloader.

Then I connected the boerd with the router and it shows `No Pit Probe`:D

I realy don´t know what was wrong.

So I think it works. I will order some probes now and test the rest.

Thank you very very much for your support!!!

Maybe I have a little other problem.

The version is still empty and if I try this /etc/config/lucid via putty and ssh i get

-ash: /etc/config/lucid: Permission denied

Does anyone know what that means?
 
Last edited:
Sweet!

The Permission denied error, it looks like you tried to execute the config file, which isn't executable. Try `less /etc/config/lucid` instead. space bar scrolls down a page, 'b' scrolls up, 'q' to exit. Look for the serial_device and serial_baud settings and make sure they are /dev/ttyS1 and 38400.
 
I checked the baud and it was not 38400 but now it is. But the problem with the version is still here. I really do not know what i should do anymore. If you do not have any ideas anymore too i will Look for a new router. Maybe i have really a serial Problem.
 
Yes I did. I also checked it again and there was 38400. I also thought of soldered too hot the serial Port and now it is defect. Is there any Option to check the function of it or to use the second port?
 
Last edited:
Hey. I got my new router now. I bought a used one for 22€. I think that’s ok.
I flashed it with the openwrt image and pluged the HM in to it and everything works fine. I still can not flash the AVR with the router but that’s no problem because the flash with avrdude and USBTiny worked for me.
I have one last question to Bryan: Is there a mobile web interface at the moment?
 
Glad you got it working. There's no dedicated mobile website, but the regular website works in the iPhone and Android browsers just fine.
 

 

Back
Top