Can't get WiFi configuration right again


 

Karl Vacek

TVWBB Member
I had my WiFi working well, though I was never able to access the HM from outside my home network (I do have an external static IP and hostname through No-IP). Used an Edimax Nano as recommended in the Wiki. Last cook I had to keep rebooting to keep the connection going, so I bought a different WiFi adapter - the TP-Link as also recommended (assumed) in the Wiki.

In all of this I've changed so many things that I can't get the WiFi working again with either adapter, though I can get each of them working just fine on my desktop (which does not otherwise have WiFi).

My biggest confusion is with the OpenWRT interface itself - I just don't unuderstand all of it yet. I get all screwed up in whether I name my WiFi connection or leave it "wwan", whether to use Client or Access Point, whether I need to specify the Netmask, etc. etc. I don't even understand when I'm inputting info about my wireless router and when I'm inputting choices for the HM side of the connection.

Is there an overall instruction page to specify the order to set things up, and the settings that I need to use?

Or someone who would help me over the phone briefly?

Thank you !!
Karl
 
The easiest way to configure the wifi is to download and flash the latest snapshot image to your SD card using the Win32DiskImager process. Then take the SD card out then put it back into your computer so it shows up as a drive. On there, there's a config.txt file. In there there's an easy way to configure your wifi network
Code:
##
## wifi configuration
##
# SSID (network name)
#wifi_ssid=heatermeter
# Password for encryption
#wifi_password=password
# Encryption mode psk2 (WPA2-PSK default), psk, wep, none
#wifi_encryption=psk2
# Mode ap (Access Point) or sta (Client mode, default). Must be lowercase!
#wifi_mode=ap
# wifi channel, only used in AP mode
#wifi_channel=6

Remove the # in front of wifi_ssid and put your network name there, then remove the # in front of wifi_password and put your wifi password there. Save the file, eject the SD card, and theoretically when heatermeter boots it will configure itself to your wifi network. Should take about 2 minutes to firstboot, reboot, then reconfigure itself.

If it still doesn't connect, there's a chance the network settings are too far from what heatermeter expects them to be so it can't undo it. It's ok, we can just reset the config and try again. Use the buttons on the heatermeter itself to navigate through the menus to "Reset config". It should say "Resetting configuration" and reboot the Pi a couple times. Now pop the SD card back into your computer and edit the config.txt again, then stick it back into the Pi and wait for it to hopefully appear on your network!
 
Thanks, Bryan...
I did that and was still just the same - there's nothing there that I haven't been setting that way. I did a "Reset Configuration" and reconfigured stuff and was still the same. Then for some reason I got the bright idea to reinstall the luci-app-ddns (I know that wasn't my problem yet) just because I was on that page. I downloaded the latest version and that hosed my system with the following error:

/usr/lib/lua/luci/dispatcher.lua:539: Invalid controller file found
The file '/usr/lib/lua/luci/controller/ddns.lua' contains an invalid module line.
Please verify whether the module name is set to 'luci.controller.ddns' - It must correspond to the file path!
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:539: in function 'createindex_plain'
/usr/lib/lua/luci/dispatcher.lua:474: in function 'createindex'
/usr/lib/lua/luci/dispatcher.lua:566: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:230: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

How can I get rid of that app for now?
Can I reflash my SD card outside of the RPi (which I cannot reach by cable or wireless now)?
Looks like I might have to cook full manual tonight...

Karl
 
Last edited:
OK - I'm back again to having WiFi and Ethernet active. Multiple resets and reflashing, and then manual configuration changes. I don't see anything I was doing differently before, and the first several iterations didn't restore the WiFi. Try, try again did work...

The config.txt in the snapshot shows up when I edit it with all lines run together, not separate lines like the older one was. No delimiters or spaces, just the numbers of one parameter followed by the letters of the next variable name. I've separated the lines with returns and it works. Normal?

Still trying to figure it all out. Can't seem to get TP-Link adapter to connect, though it's fine when I test it on a Windows 10 64-bit desktop PC.

And since I need to reboot so often to test network changes, it unplugging and replugging the best way to do that?

Thanks again!
Karl
 
Last edited:
OK - I'm back again to having WiFi and Ethernet active. Multiple resets and reflashing, and then manual configuration changes. I don't see anything I was doing differently before, and the first several iterations didn't restore the WiFi. Try, try again did work...

The config.txt in the snapshot shows up when I edit it with all lines run together, not separate lines like the older one was. No delimiters or spaces, just the numbers of one parameter followed by the letters of the next variable name. I've separated the lines with returns and it works. Normal?

Still trying to figure it all out. Can't seem to get TP-Link adapter to connect, though it's fine when I test it on a Windows 10 64-bit desktop PC.

And since I need to reboot so often to test network changes, it unplugging and replugging the best way to do that?

Thanks again!
Karl


WiFi is super finnicky on the HeaterMeter, in terms of finding the right config and hardware setup. I went through 4 adapters before settling on one. Anyway, it still struggles to work on occasion when I'm changing out configs, namely if I'm switching between AP and Client mode. The big issue isn't necessarily connecting to my AP once I've disabled HM-AP mode, it's getting the WiFi hardware interface to be recognized by the system at all. Once you get that, you're golden.

Some folks seem to have trouble getting the actual connection to the AP set up properly, and that's where I've found a pretty consistent way to get it to work. Once the interface is defined and recognized, I make sure there's no profiles for any APs --- if there are, delete them. Then I hit the Scan button at the top right, or whatever that button is that initiates a scan.

It seems to work 100% of the time when i do that. If I try to set up an AP profile for my router manually, it'll hardly ever work (less than 1/10 of the time).

Thus is the DIY nature of these projects, but once you get it all figured out, it's smooth sailing far beyond the capabilities of the commercial offerings by Guru and others.
 
Truly screwed again. I've reset the HM and reflashed the SD card many times now, editing the config.txt every time. Wireless adapter is out and lying on my desk. I can't even get it to communicate through the wired connection now. I had the Edimax running but wanted to see if the TP-Link adapter would be better. It wouldn't ever connect properly, ,and then the Edimax wouldn't either. I've wiped out and recreated the connections in Network and the WiFi tab, but never could connect on plain WiFi again. Then I reflashed yet again and the HeaterMeter Devices webpage shows two wired connections as "UP" but times out or shows a red Error box. Reflashed and reset and edited the config.txt, etc. a couple of timesmore, but no luck.

Cooking in the oven tomorrow - no overnight pork butts for us this time. Maybe I need to put this whole thing away for a week. I've been playing with it since last night - and I really need to get a job out...

Is flashing the "openwrt-brcm2708-sdcard-vfat-ext4.img" to the SD card with Win32DiskImager what I'm supposed to be doing to install the latest snapshot? Is there any more "bare metal" reset I could do to reconstruct everything?

Thanks again!
Karl
 
If you positive you have your Wifi setting correct for your network, then make sure you reboot your router. Sometimes the heatermeter will seem to be connected, but you wont be able to communicate with it, until a reboot. Also, for testing purposes, turn off your security on your home network and see if you are even able to connect without any security. If you do then you may be doing something wrong or using a security protocol not recognized by the heatermeter.

I have a router that has 2.4ghz connection and a 5ghz connection and the heatermeter wont detect the 5ghz connection at all, only the 2.4ghz.
 
One issue I've just found is that the "Reset Configuration" wasn't actually working. It is now - not sure why except maybe I'm waiting longer for it to start resetting?
I've been resetting my router (not popular with the family since it's a 5-minute process and they're offline while I'm doing it each time.
To access the HM from PitDroid and my desktop, do I want to set it as AP or Client? AP seems to work more often, but Client sounds like the right choice to me.
I don't see my available 5GHz connections in the HM WiFi scans, so I've only been connecting with 2.4GHz all along.
I'm back in with Ethernet - still playing with getting WiFi back again.
Sometimes (often) when I do "Save Changes and Apply" it takes seemingly forever to apply, with the spinning indicator staying there for many minutes. Eventually I usually just go to another page or reboot. And often when I do save changes I'll still see the red indication at the upper right that changes need to be applied, so I go up there and save and apply them again. Is this typical?
 
Last edited:
Flash the software to the sd card and then go into files and I believe is cmdline.txt and on the first line put "norestore" without the quotes at the end of the line and it should look like this

dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait norestore

That will delete everything on the SD card and revert everything back to stock


Next

if you have a laptop or phone that you can wifi access points find the heatermeter and connect to it via wifi.

Open your browser and type the Ip address 192.168.201.1 and you will see the Heatermeters webpage and configuration page, once you click on the configurations link at the bottom and type in the password of root

Navigate to Network>Wifi page and click on the Scan button

Find your network and hit the join button.

Type in your password and hit the Save and Apply button.

You will see the Heatermeter restart and you will know that the heatermeter connects by the IP address it shows on the screen. If it does not show a IP, then watch the Wifi adapters light. The light will blink really fast when its connected to your router, if its a short 3 or 4 blinks and followed by a pause and repeat, then its not connected.

If you see the rapid blinking and you can not find your heatermeter on your network, then reboot your router, that should fix the miscommunication and you will be able to connect to the heatermeter, as long as you are on the same network. A phone connected to 3g or LTe wont see the heatermeter unless you are connect to your network via Wifi, atleast until you setup forwarding on your router.
 
OK - I'm back again to having WiFi and Ethernet active. Multiple resets and reflashing, and then manual configuration changes. I don't see anything I was doing differently before, and the first several iterations didn't restore the WiFi. Try, try again did work...

The config.txt in the snapshot shows up when I edit it with all lines run together, not separate lines like the older one was. No delimiters or spaces, just the numbers of one parameter followed by the letters of the next variable name. I've separated the lines with returns and it works. Normal?

Still trying to figure it all out. Can't seem to get TP-Link adapter to connect, though it's fine when I test it on a Windows 10 64-bit desktop PC.

And since I need to reboot so often to test network changes, it unplugging and replugging the best way to do that?

Thanks again!
Karl

You should see about 13 red changes on the top right corner. You can click on them or just continue clicking the save and apply button until you see that spinning circle. That should not go away until you reconnect to the heatermeter on your home network. If you are able to reconnect after that circle, then you are missing a step
 
Thanks to all for the advice, and especially Bryan and John for their detailed instructions.

Several issues caused my problems, most of which come under the heading of SHOOTING MYSELF IN THE FOOT:

First of all, I got in a hurry and bought a beautifully assembled and configured HM rather than build and configure it myself. I lost all that learning potential. But an old guy soldering little SMD's isn't a good thing, and Christmas smoking was coming up.

Second, I'm still a little unclear how to reset the HM from the buttons - it seems to take a while to actually invoke the reset and I got confused. Holding the button longer just scrolls through the menus, but sometimes it eventually goes into Reset. I wasn't always resetting it.

Third - the "norestore" step John suggested seemed to help clear out whatever weirdness I'd put in somewhere at some time.

Fourth - I'd set up a static address for the Edimax WiFi adapter in my router months ago and was always setting the RPi to use that same IP as Static (rather than DHCP CLient) whenever I reconfigured it. Since the router is going to assign that IP whenever it sees the Edimax anyway (unless I wipe it out of the router), there's no need to also configure the RPi for Static IP. The last time I reconfigured the HM/RPi, I wiped out all the software, flashed the SD, edited the Config.txt and Cmdline.txt, connected the Ethernet, logged in etc., and then wiped out any WiFi it had already installed. I installed the connection of "Radio0" to my WiFi network through a scan as usual, but let it set it up as its defaults dictated (DHCP Client) and then just connected to that under Interfaces, without any editing. Defaults worked fine and DHCP should keep assigning that IP as long as I use the same WiFi adapter. I rebooted the wireless portion of my router again just to make sure, rebooted the HM with just the WiFi adapter in place, and voila - it worked again.

The TP-Link adapter also works - obviously with a different IP address.

Now, can I install and bridge both WiFi adapters to increase connection reliability? Connection reliability (less than 20 feet from the wireless access point, in a wooden house) was what got me to changing WiFi adapters etc. in the first place.

Thanks again to all !
 
Do either of those adapters have an external antenna? If not, it might help to get one.

After stumbling through 2-3 adapters and failing to get the HM to recognize them (despite a supported chipset), I landed on this little guy, and it performed pretty well at my last place I lived, and that was going through 4-5 walls and brick. I now live in a setup where it needs to pass through 1 brick wall and 1 indoor standard thickness wall.

Might be worth a shot.
 
Thanks, Nick.
Trying another cook tonight. If the WiFi dies again, I'll order that adapter with an external antenna. I'll need one of those for another project anyway if I find out there's enough WiFi signal where I want to use it.
 

 

Back
Top