LinkMeter v2 Homebrew BBQ Controller - Part 1


 
Status
Not open for further replies.
Originally posted by Ben Lawson:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Dave S (GeoDave):
Yes it works on wrt54g v3.

should i be using the TRX or the BIN? </div></BLOCKQUOTE>

Flash the Trx from the command line using Putty. Wait a while then unplug and plug back in. Works everytime.
 
Originally posted by Dave S (GeoDave):
Flash the Trx from the command line using Putty. Wait a while then unplug and plug back in. Works everytime.

Hrm, I think I killed it by using the BIN. I am used to DD-WRT and they are all bin files. I'm gonna have to find another wrt54g
icon_frown.gif
 
Originally posted by Ben Lawson:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Dave S (GeoDave):
Flash the Trx from the command line using Putty. Wait a while then unplug and plug back in. Works everytime.

Hrm, I think I killed it by using the BIN. I am used to DD-WRT and they are all bin files. I'm gonna have to find another wrt54g
icon_frown.gif
</div></BLOCKQUOTE>


No there is really no such thing a bricking your router in my experience. You will need to do some very specific things to get it back. I posted detailed steps a while back...I will let you know which pages when I get home on the big PC.
 
Originally posted by Dave S (GeoDave):
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Dave S (GeoDave):
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Ben Lawson:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Dave S (GeoDave):
Flash the Trx from the command line using Putty. Wait a while then unplug and plug back in. Works everytime.

Hrm, I think I killed it by using the BIN. I am used to DD-WRT and they are all bin files. I'm gonna have to find another wrt54g
icon_frown.gif
</div></BLOCKQUOTE>


No there is really no such thing a bricking your router in my experience. You will need to do some very specific things to get it back. I posted detailed steps a while back...I will let you know which pages
the steps are on when I get home on the big PC. </div></BLOCKQUOTE> </div></BLOCKQUOTE>

Use the instructions on page 6. Use the link to Bryan's Trx instead of the openwrt Trx.

You can do this!
 
Originally posted by Dave S (GeoDave):

Use the instructions on page 6. Use the link to Bryan's Trx instead of the openwrt Trx.

You can do this!

Thanks, I'll check it out but I'm not too hopeful. I am not able to ping the router at all anymore. The first time I hosed it up I had to do the pin16/17 short on the flash chip to get it to respond to a ping. Even after eventually getting it to take a stock linksys flash last night it wasnt acting right. Before i realized the TRX was maybe what i should be using I tried to flash the BIN again
icon_frown.gif


Now I'm back to no ping at all, shorting pin 16/17 seems to have no effect.

I'm afraid I'm at the point where I need a jtag to get this router functional again.
 
So I realized that I hadn't hooked up a 12v line from my router's barrel connector to my board when I was testing the other day, so that's what I did tonight.

So my router boots and I see the board blink twice and initialize.

When it's all booted, if I log in and stop lucid and cat /dev/ttyS1, I get no output.

If I've jumpered the ttyS1 tx -> rx and cat in one terminal and echo "xxxx" > /dev/ttyS1 in the other, I can see xxxx amongst the scroll.

Any ideas? My pololu order is supposed to ship early next week, so soon I'll actually have everything hooked up so I can see what's going on with the LCD, etc. I was just hoping I could get some serial output to verify that everything was on track.
 
Originally posted by Ben Lawson:
Thanks, I'll check it out but I'm not too hopeful. I am not able to ping the router at all anymore. The first time I hosed it up I had to do the pin16/17 short on the flash chip to get it to respond to a ping. Even after eventually getting it to take a stock linksys flash last night it wasnt acting right. Before i realized the TRX was maybe what i should be using I tried to flash the BIN again
icon_frown.gif


Now I'm back to no ping at all, shorting pin 16/17 seems to have no effect.
For posterity I'd like to make it clear to others DO NOT SHORT YOUR FLASH PINS. Is there merit to the concept? Yes. However this is not your go-to solution every time your router doesn't boot. You have to really work hard to flash something in such a wrong way that this dangerous procedure is warranted. If you are completely at your wits end and considering shorting flash pins, throw your router in the garbage. Look at it. Maybe even haul it out to the curb. Shorting the pins on your flash chip is something you do now, now that you're comfortable with the fact that the router is garbage.

It is always a better solution to hook a TTL serial cable to it and see why it isn't booting and fix it (maybe boot_wait needs to be set? maybe your computer just doesn't activate the ethernet link before boot_wait times out?). An FTDI cable, which you may have already, is a TTL serial cable (you'll need 2 resistors to get it down to 3.3V though). Your Arduino is a TTL serial cable (same 2 resistor, and pop the ATmega chip out). Your old cell phone cable you have in a box in the closet may very well be a TTL serial cable. A $3 TTL serial cable off eBay is a TTL serial cable.

To clarify what Dave S said:
-- If you're flashing via TFTP, use the BIN file.
-- If you're flashing from anywhere else you almost certainly want the TRX file.

You can't mess up your router by using the wrong image. You can write 3MB of random data to a file and flash that and your router won't boot into Linux, but it isn't bricked at all. If boot_wait is on, your router listens for 3 seconds on TFTP then starts executing whatever is stored in the linux partition. If you used the wrong image, your router will lock up here. If you messed up your root partition it will lock up a few seconds later. If you messed up your overlay partition, it will lock up a few seconds after that. All of these are indistinguishable because the router just never arrives at point D. What always remains the same is that the bootloader will wait 3 seconds for new firmware, regardless of what you've flashed into the other partitions.

The one big if here is "if boot_wait is on". By default, my WRT54GL's bootloader has boot_wait set to off. This is overridden by `nvram set boot_wait=on && nvram commit` which stores the updated value in the nvram partition. If you somehow miraculously are able to overwrite your nvram by flashing like a 8MB firmware image, you can set it back to "on" by using a serial cable you may already have somewhere.

So in short: if your router doesn't boot and you can't get it to TFTP, either get a serial cable or throw the router in the garbage.
 
Originally posted by Kyle Christensen:
So I realized that I hadn't hooked up a 12v line from my router's barrel connector to my board when I was testing the other day, so that's what I did tonight.
Doh! Yeah power is important.
icon_smile.gif


It should be set properly but go ahead and check the serial baud rate with `stty -F /dev/ttyS1`. It should be 115200.

Next try running hmdude (note: requires hmdude from Jan 28). When you run `hmdude` (no command line options) it may say Sync: OK or ERROR but more importantly watch the LED and see if it blinks twice again, indicating it rebooted.
 
Well, I hosed this atmega chip pretty badly, can't seem to figure out how to rescue it. Might be time to get a new one. At some point I set some fuses improperly, or something. Any attempts to set them back to the defaults fail.

avrdude -C etc/avrdude.conf -P /dev/tty.usbserial-A9007Wrk -c stk500v1 -b 9600 -p m328p -U lfuse:w:0xFF:m -U hfuse:w:0xDA:m -U efuse:w:0x05:m -U unlock:w:0x3F:m -U lock:w:0x0F:m -F

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.11s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.32s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.05s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x00
avrdude: verification error; content mismatch

avrdude: safemode: lfuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] n
 
Originally posted by Kyle Christensen:
Well, I hosed this atmega chip pretty badly, can't seem to figure out how to rescue it. Might be time to get a new one. At some point I set some fuses improperly, or something. Any attempts to set them back to the defaults fail.
Some of the fuses are one-way in that once they are set, you can't change them back. For some of them, you can use the chip erase command to reset them back to default. Try the -e command with avrdude (instead of all the -U).

If that doesn't work, you can always just do a high voltage flash. It sounds like it might be something technical or complicated but really it is just pulling reset up to 12V through a transistor and running a bunch of wires from one ATmega to the target.
 
It might be the web server crashing on account of some garbage coming in on serial from the HeaterMeter board if it isn't powered. Does it still crash if the HeaterMeter board isn't plugged in? When it seems to crash, can you still SSH or telnet to it? The stok garbage is annoying, but it is your session ID used in conjunction with your login cookie. If there was no stok, I could make a link on this page that would be able to control your LinkMeter just by visiting this page in a vulerability known as cross-site request forgery.

I got the power run to the heatermeter still getting crashes on the web interface. I tried without the heatermeter connected and got same results. SSH and TFTP still connect; just web interface is down. I was able to reflash the router this time over ssh with the trx file. Same results after reflash.
 
Originally posted by Brandon Sungur:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">It might be the web server crashing on account of some garbage coming in on serial from the HeaterMeter board if it isn't powered. Does it still crash if the HeaterMeter board isn't plugged in? When it seems to crash, can you still SSH or telnet to it? The stok garbage is annoying, but it is your session ID used in conjunction with your login cookie. If there was no stok, I could make a link on this page that would be able to control your LinkMeter just by visiting this page in a vulerability known as cross-site request forgery.

I got the power run to the heatermeter still getting crashes on the web interface. I tried without the heatermeter connected and got same results. SSH and TFTP still connect; just web interface is down. I was able to reflash the router this time over ssh with the trx file. Same results after reflash. </div></BLOCKQUOTE>

I am having the same issue one on my routers as well...haven't had time to try and figure it out.
 
FWIW, earlier when I was messing around with the current trunk build of Linkmeter, hitting the config page would cause lucid to crash. Once I got my heatermeter board working properly, the crashes stopped.
 
Bryan, I've found a bug in the latest iteration of the configuration page. When you've clicked the presets link on a probe, your javascript creates the presets dialog box (via showCoeffPopup()) with the probeId of the probe you just clicked on. The links in that dialog call coeffClick(probeId, idx), but you're not destroying pcplist when you're done with it, so the next time a preset link is clicked, the links are still pointing to the probeId and idx of the previously clicked probe.

To see what I'm talking about, go into the config page, and click on presets for Probe 1, change to a different preset than what was previously selected. Then move to Probe 0, click presets and select another probe. The values for Probe 1 will be updated because the links in the coefficient element you created are still pointed at 1,idx instead of 0,idx.

I'm not much use in the electronics department, but I am fairly handy with jQuery if you need any help.
 
Made some progress. Finally got my 328 chip programmed so my linkmeter board is complete. Powered up the router and it recognizes the heatermeter. My problem now is my display only shows blocks on the top row of the display. Anyone have any ideas what might be going on with my board?
 
Hey, new poster here...

I had a working heatermeter with the wishield and have recently completed building my linkmeter. The work Bryan has put in and the collaboration that goes on in this forum is great. It is nice to see everyone help everyone.

I have an offset smoker which admittedly isn't sealed perfectly and on one of my cooks, the fan was at 100% non stop. I have since purchased a larger fan:

http://search.digikey.com/scri...KeyWords=603-1571-ND

I was slightly worried about the current draw with the larger fan, but with the 12v 1A supply and everything running (Fan @ 100%, Wifi on) I measured around 380mA. I don't think I measured wrong since I wired the power input through my multimeter.

I really like the 4-way switch used to control the interface and I have thought of an upgrade. Sparkfun sells the Nintendo DS touch panel for around 10 bucks and also sells a breakout board for easy connection.

http://www.sparkfun.com/products/8977

The current switch schematic only uses 1 analog input for button control and the touch screen uses 2 (X and Y position). I was wondering what everyone thought of using this little touch panel for control. You can create a background with painted or etched "buttons" that are mapped to call the normal presses (up, down, left, right) or use other methods like swipes to toggle.

This isn't really an improvement over the 4-way switch since the touch panel is no where near as rugged (as shown by the cracks in 1 of the 2 I purchased) and it is a much more complicated install since the panel has to be securely mounted.

Bryan mentioned an Android app and whether it would be worth while building since the web page performs the same functions that an app can do.

Here is an image of the app layout I have been working on. It uses two tabs which now need to be redesigned using the new ICS style.

BBQApp.png
 
Originally posted by Dave S (GeoDave):
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Brian J Wilson:

Looks cool but does it work
icon_smile.gif
</div></BLOCKQUOTE>

This iteration isn't functional yet. The first version I had was built with a similar look, but harcoded for the heatermeter network address 192.168.1.252. It worked great, but lacked functionality because I built it in the Android App Inventor.

Since I am a pretty terrible and slow programmer it will be a while before I get this version going.
 
Status
Not open for further replies.

 

Back
Top