Where did my heatmeter go?


 

Timon Cain

New member
First off, I am totally new to building electronics and don't really know what i am doing, but I can follow directions. I bought all my parts and put my heatmeter together. I plugged it in and got every thing working (after a little tweaking). The LCD works and shows the pit temp. The button works. I go to set up the wifi following this link

http://tvwbb.com/showthread.php?38671-HOWTO-Configuring-LinkMeter-WiFi

and i get the web page to show up. I configure my wifi settings and I unchecked load at boot per the last comment and reboot. Now I can't find my heatmeter on the network. Anywhere. The wifi adapter is blinking so I think that that is working. When I power it on it gives my a ip address, but when i type it in it doesn't load anything. I have reformated the SD card and reinstalled the software, but still nothing. I do have it plugged into the Ethernet port as well. Help!
 
I followed that same thread when setting up my WiFi, but I only followed the first part which explained how to connect via wired lan, from there I winged it and it worked fine. I don't recall unchecking any "load at boot" setting though. Looking through my WiFi settings I find "Bring Up On Boot" in the advanced section, it is CHECKED and my WiFi is working (never had a problem with it). In fact, I have actually set a static IP on my rPi WAN as well as WiFi, they both work fine, contrary to what it says on the thread you linked to...

So first thing first, you need to get connected again. I would first try a wired LAN connection, try to connect to the default IP 192.168.200.1 and hope you get in. If you can't get in that way then you have a few options. You can plug a monitor (or tv) into the HDMI port and a USB keyboard and boot her up and poke at the rPi via command console (hit enter after it is done loading to enter console). You could also try to go back and work from a fresh build (as you have attempted already), but beware that the HM actually backs up your config and will restore it automatically when you boot, so even a fresh install can get hosed up right after you boot if you have a bad config saved. The backup is stored on a hidden partition on the SD card (that you can not see in Windows), I'm not exactly sure how to get rid of this partition, never had to do it. I'm thinking perhaps format the SD card might work, or if you have a spare virgin SD card make a fresh build on that would be the easiest thing to do. Also, I had an issue with the AVR getting hosed up once (after attempting an upgrade to a beta release), I had to force the re-flash of the AVR (the ATMega chip on the HM board) before it started working again. So if all else fails perhaps try that. (From the console type avrupdate /lib/firmware/hm.hex )

PS when you initially connected to the LAN you had to assign an IP in the block 192.168.200.XX to your PC to connect, when you connect the rPi to the WiFi it will get an IP address from your WiFi DHCP in whatever block your WiFi is setup for, probably 192.168.1.XX (unless you set a static IP). Did you change the IP on your PC back to the proper settings to connect to your ROUTER when you were done connecting to the rPi?
 
Last edited:
OK. I deleted the backup.tar.gz file. Powered down the heatmeter. Formatted the SD Card. Re-installed the SD card. Powered it up and did and avrupdate. Changed my PC IPv4 settings to 192.168.200.2. I pull up my browser and go to 192.168.200.1, and nothing. I have it plugged in with the ethernet cable and wifi dongle. What now?
 
What are you connecting the LAN cables TO? A router? A switch?
I have connected direct from a PC to the rPi with a crossover network cable, and come to think of it, I am pretty sure I tried a regular CAT5 cable and it worked too (figured there's gotta be auto sensing ports)

So maybe power down, remove WiFi dongle, connect a CAT5 cable direct from PC to rPi, set PC IP to 192.168.200.2, SM 255.255.255.0, then boot the HM, wait a minute for it to do its thing, and then try to connect to 192.168.200.1 and hope it works. If that doesn't work then try to match any custom network settings you had saved in your rPi on the pc instead of using 192.168.200.XX...

I'm not a Linux guy so I don't have a guru answer, but I am sure there must be a command you can enter in the rPi console to tell you what IP address is assigned to your LAN port.... come to think of it, doesn't that display on the screen at some point during the boot if you view the rPi on a monitor?

Just throwing out thoughts, hope you get it figured out...
 
see if you can plug in tv or monitor so you can see whats happening with the bootup.... make sure that it is initializing everything and you see a ip address.... next i would plug the pi and the laptop into the same router and try again. if you have a crossover cable that could be usefull... my laptop autosenses the connection and does not require a crossover. btw when you boot pull the wifi dongle out and just boot off the lan cable...
 
Mine did the same thing. Seems that I didn't wait long enough on the wifi and when I formatted, updated, etc. I wasn't able to see the web page either. Watch your heatermeter. If the wifi is working, the meter will show you an IP addy. Mine was 192.168.1.86, so I set my puter to 192.168.1.7, and then typed in 192.168.1.86. and it worked over the wifi. But for some odd reason, my lan line is now disabled on the heatermeter side. So if I take the dongle out, and type 192.168.200.1, nothing will show. Try watching your meter for a while and see if it shows you the ip address.
 
Update time. After wiping out the backup.tar.gz file and reformating the sd card a few times I was able to log into the heatmeter with the 192.168.200.1 address. I followed the directions in the "How to set up wireless" link and did not uncheck the load at boot box. I get an ip address from the heatmeter, but I can't log into it. The wireless dongle lights up and I know it is working because it get an ip address without the Ethernet plugged in. What am i missing? I can change my computeds ipv4 settings and log into it when the Ethernet plug is in. I can't access it through the wireless, which is the whole point.
 
At first you need to set the IP on your PC to match the format 192.168.200.XX to connect the the wired LAN under default settings. When the wifi in your rPi connects to your router it is going to be assigned an IP by the router, which may be in a different group. Watch the HM at boot, note the IP that shows up on screen (the wireless IP), then change the IP on your PC to match that group (prob 192.168.1.xx), and plug your PC into your wireless router (or connect the PC via wifi). At this point you should be able to let your router assign your IP's via DHCP, but I always assign static IP's to my devices 'cause I want to KNOW what their IP is...
Once your PC is connected to the wireless router and assigned an IP in its group you should be able to connect to the rPi over the wireless using the IP that shows on the HM display about 1 minute after boot...
 
Last edited:
Update. It lives! Ralph thanks for the help. One last question, can I give it a static IP address, or do bad things happen? I noticed under interfaces WWAN there is an option to give it a static IP.
 
You can give it a static IP no problem, you just have to make sure the ethernet and the wifi are on different subnets. That is, don't try to assign static IPs on your home network to both "lan" and "wwan" at the same time.
 
Update. It lives! Ralph thanks for the help. One last question, can I give it a static IP address, or do bad things happen? I noticed under interfaces WWAN there is an option to give it a static IP.

Congrats on your success...
I assigned a static IP to my WiFi and my LAN on my rPi. I have read other people say you can't assign static IP to them both, but I did and never had a problem....
If you lose your network connection for some reason after trying to set a static IP there is another active thread near the top of the list where Bryan just detailed the commands you would type in the console to set the IP back to the original. But again, I didn't have any problems setting up and using static IP's.....
 
Bryan,
I assigned 192.168.1.99 to my WiFi and 192.168.1.98 to my LAN (on the rPi) and didn't seem to have a problem?
Thinking back I'm not sure I had them both connected at the same time, so I just powered up my HM with the LAN cable connected and WiFi plugged in. At first it didn't seem to work, the WiFi IP did not show up on the display in a timely manner like usual, the display would go blank briefly every so often. Funny thing is, eventually (within a minute or two) the WiFi IP DID show up and does work, and I WAS able to connect to the HM web page on BOTH 192.168.1.99(WiFi) AND 192.168.1.98(LAN).
IDK why it works for me, or more accurately, IDK why it wouldn't work to use two IP's from the same block? It seems to work for me....
 
Last edited:
Having both on your same subnet does not work, that's why! And here's why:

The ethernet interface is considered "up" by the kernel when assigned a static IP address even when the cable isn't plugged in. Here's the routing table for a system with both lan and wwan set to be on the same 192.168.2.x network:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
Now when the kernel wants to send a packet to 192.168.2.x it uses the adapter with the lowest metric, using the first interface on the list when there's a tie. In the above case, eth0. When you try to ping both addresses with the ethernet plugged in it works great! Success right? Nope, look at who you're actually talking to when you ping both addresses:
Code:
#arp -a

Interface: 192.168.2.8 --- 0xa
  Internet Address      Physical Address      Type
  192.168.2.3           b8-27-eb-a9-bf-c3     dynamic
  192.168.2.100         b8-27-eb-a9-bf-c3     dynamic
The same physical address for both IPs? Sacre bleu! Our network is under attack! Nope, wait it is just that eth0/lan handled both requests
Code:
root@OpenWrt:~# ifconfig
eth0      Link encap:Ethernet  HWaddr B8:27:EB:A9:BF:C3
          inet addr:192.168.2.100  Bcast:192.168.2.255  Mask:255.255.255.0
Now unplug the ethernet cable and try to ping again
Code:
Pinging 192.168.2.3 with 32 bytes of data:
Request timed out.
Request timed out.

Ping statistics for 192.168.2.3:
    Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),

#arp -a

Interface: 192.168.2.8 --- 0xa
  Internet Address      Physical Address      Type
  192.168.2.3           00-08-54-a2-12-c0     dynamic
Well we got the right hardware address this time but our ping doesn't come back. The RaspberryPi is actually getting our packet but when it responds it looks at the routing table, sees that it should be using the eth0/lan interface to respond, aaaaaaaand the packet goes nowhere. If you were to look from the RaspberryPi side you'd see it trying to send arp requests out eth0 to find your computer to send the packet back to.

So that's why it doesn't work and you should NEVER PUT LAN AND WWAN ON THE SAME SUBNET because there are actually situations where it can appear to work but it isn't actually doing what you think it is and will not work when you unplug the ethernet cable, or the wifi gets disconnected. All your eggs are actually in one basket.
 
Ok, so you are saying even though the HM web page seems to work when I call to the static IP on either the LAN or WiFi, the same adapter is responding to both requests as per the rPi routing table... And so they both may appear to be working but actually are not....

I do get your explanation, however, from day one I assigned 192.168.1.98 to the LAN and 192.168.1.99 to the WiFi, and have never had a problem at all. Generally when in use there is no LAN cable connected, the WiFi always works flawlessly. If I plug in the LAN cable and boot I am able to connect to the static LAN IP as well. I like this because I dont have to jump through a hoop to set a PC to the 192.168.200.X block to connect via cable if need be. (cause one time I had an issue with the HM and my fire was blazing, had no time to waste configuring a network)

So, in my experience, setting a static IP's in the same block seems to work out OK, if you connect one adapter at a time and boot they definately work. Even when I do connect them both at least it APPEARS to work (on both), but as you say there is some confusion going on in the rPi routing. So I don't seem to have a problem. BUT, if I ever do have a network problem I will keep this info in mind, cause I am sure you know what you are talking about.....

In that case I would reset the wired lan to the default IP, as per your instructions I will paste in below for reference in this thread
------------------------------------
The easiest way to get setup is to make sure that the ethernet port is back on the 192.168.200.x subnet:
Code:
uci set network.lan.proto=static
uci set network.lan.ipaddr=192.168.200.1
uci commit network
And then set the wifi dongle to be a client on your network:
Code:
wifi-client yournetworkname yournetworkpassword
(This assumes your wifi network is set up for WPA2-Personal encryption, if not let me know and I can adjust the command line)

Unplug the ethernet cable and reboot and wait about 30-45 seconds and the Pi should be on your wifi network
---------------------------------------
 
Last edited:

 

Back
Top