Wifi initially connects then only timeout


 

Chris Peisher

New member
So other than the HM failing to reliably connect to the wifi these days, my HM has been a flawless performer for the last 3 years. I have a Raspberry Pi Model 3B 1GB revision 2, coupled with a HM board built by John Bostwick in November of 2016. I'd like to get the wifi connection reliably working again. Is there a firmware update i can try? How do i tell what firmware i'm currently on? If firmware won't do the trick do i need to order a wifi dongle and if so can someone link me to one that has a gauranteed compatible wifi chip? Thanks for any help!
 
There's not any real version number built into the system, which is a bit of a mistake on my part. The closest you can get is to look at the version number of the linkmeter package in System -> Software. However, both v14 release and the snapshot show up as 14. If you're on anything below 14 then there's a definite upgrade. There's nothing wrong with just installing the latest snapshot though just to be sure. Go to System -> Backup / Flash firmware and paste this link to the Pi3 snapshot firmware in the Image URL field at the bottom.

If it had been working for years then just got worse, it is unlikely that a software update is going to make it any better, since the wifi driver stays the same (apart from v14 release which had a terrible issue with wifi on the Edimax dongles). The list of adapters I've tested is in the wiki, and I don't think there's been any others tested since then. The Pi3B+ with its integrated wifi works fairly well but has a slightly lower range than an external adapter, otherwise the Edimax is the go-to I think.
 
Thanks for the response Bryan! I plugged in the heter meter inside my house and very close to the wifi AP and it's linked up ok for now. According to the linkmeter package version i'm on v14. I did try to flash that file through the URL but i get an error "The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform." Did i leave a setting incorrect in the flashing page before hitting the "Download and Flash" button? UPDATE TO THIS QUESTION: I went up a directory and clicked on file you were linking to to download it directly. I went back to linkmeter and pointed to the locally saved .gz file and got to the checksum pagebefore i decided to hit pause and come back here and check to be certain... Is this the correct checksum for the rpi3.gz file[573cf3832d0d878bbf4999f5f9652c83]?

I'm also a little confused about your recommendation of the Edimax as the go-to adapter because you also stated the v14 had "terrible issue with wifi on the Edimax dongles". Unless i should have read that as v14 release had those problems where as v14 snapshot does not?
 
Last edited:
Yeah the v14 release went through all the testing but ended up having really weird dropouts, this was the first thing I worked on for v15. The snapshot is what will actually become v15, so it can be considered v14+bugfixes and features. The snapshot is always the most current firmware.

I just tried my Pi3B test setup here and it seemed to work with pasting that url into the image URL field, so I'm not sure why that didn't work. It can fail if the url doesn't get pasted correctly (missing letter?) or if your HeaterMeter doesn't have full internet access (with DNS lookups too). You work around that by just downloading the .gz file that I linked, then using the box above it "Image file" to flash it from your computer instead of having it download and flash it itself.
 
OK i downloaded the .gz file and flashed it. It seems to be working but i get two errors when i click on certain tabs in the configuration. The first on is on the configuration page itself, and then another shows up on the credits tab. I'm not sure if these are normal?

Ey28wmf.jpg

NMWlfSI.jpg
 
Oh wow the second is actually a bug in the HTML (missing closing tag). I've fixed that for the next snapshot but it doesn't cause any issues in other pages.

The second is not a good sign since it seems like it the web service can't connect to the HeaterMeter inside. I'm not sure how that happened unless the port autodetection isn't working. Let's try the easy bit first though. Start by following that link to AVR Firmware, then select "Bundled firmware in /lib/firmware" and press the Flash button next to hm.hex. It should take about 3 seconds and dump all this garbage into the bottom text box:
Code:
Stopping LinkMeter OK

LinkMeter platform is BCM2708
Loading SPI modules...
AVR fuses ffd705 OK

                          7e6c724e887f2f58d197eff52819ade0  /lib/firmware/hm.hex
hmdude: compiled on May 20 2019 at 21:45:26
Using port: /dev/spidev0.0
Loading ihex file: "/lib/firmware/hm.hex" (23864 bytes)

    0% |                                                  |     0 (0.0s)
    0% |                                                  |     0 (0.0s)
    5% |##                                                |  1194 (0.1s)
   10% |#####                                             |  2388 (0.1s)
   15% |#######                                           |  3580 (0.2s)
   20% |##########                                        |  4774 (0.3s)
   25% |############                                      |  5966 (0.4s)
   30% |###############                                   |  7160 (0.4s)
   35% |#################                                 |  8354 (0.5s)
   40% |####################                              |  9546 (0.6s)
   45% |######################                            | 10740 (0.6s)
   50% |#########################                         | 11932 (0.7s)
   55% |###########################                       | 13126 (0.8s)
   60% |##############################                    | 14320 (0.8s)
   65% |################################                  | 15512 (0.9s)
   70% |###################################               | 16706 (1.0s)
   75% |#####################################             | 17898 (1.1s)
   80% |########################################          | 19092 (1.1s)
   85% |##########################################        | 20286 (1.2s)
   90% |#############################################     | 21478 (1.3s)
   95% |###############################################   | 22672 (1.3s)
  100% |##################################################| 23864 (1.4s)
Update successful
Starting LinkMeter OK

At that point you should be able to go back to the Configuration page and hopefully it will show a connection again. If not, then we can figure it out from there.
 
Well for some reason when I conencted to it jsut now the configuration error screen has fixed itself i guess and is back to normal. I didn't do anything different. Perhaps it just needed a hard reset?
 
The configuration screen assumes that there's no HeaterMeter connected if it gets a version number report from the HeaterMeter. It is possible that due to it being a firstboot that the normal checks that happen when it is trying to decide how to configure the microcontroller caused the line to come through corrupted it usually resolves itself because the daemon on the Pi side will actually try to reset the microcontroller. This doesn't happen if it just reset the microcontroller to do the firstboot setup, so maybe it was just the perfect storm of things. Serial bit errors very rare (like one in a million) but there's a lot of data going back and forth so it isn't uncommon to any cook session to have at least one second of data thrown out for being corrupted. If it happens on that initial negotiation, I haven't programmed enough error resilience to recover properly which could have been what you saw.

In any instance, glad it was just a temporary problem because I was worried that someone I had written code to brick the HeaterMeter board when it upgrades. (nervous face)
 
In any instance, glad it was just a temporary problem because I was worried that someone I had written code to brick the HeaterMeter board when it upgrades. (nervous face)

Me too!

So i bought the recommended wifi dongle from the wiki (Edimax EW-7811Un 150Mbps Wireless 11n Nano) and have it ready to install. If i'm already configured with the built in wifi chip on the rPi, do i just plug in the dongle and boot the HM and it figures it all out? How to i set it to use the same settings for new Dongle that it has been using for the old built-in chip?

zY7qEZx.jpg
 
Last edited:
That's actually a difficult question for me to answer, since all the quick shortcuts the HeaterMeter interface does to simplify wifi setup forces only one wifi adapter configuration at a time. You'll probably have to go into Network -> Wireless and use the full LuCI configuration tools to basically disable the builtin wireless and set up the new adapter with the same settings but without losing connectivity during the process.

It might be easiest to use the LinkMeter -> Wifi option to change the integrated wifi "Wireless mode" to "Access Point" with a "Network Name" of heatermeter or something, with no security, then connect to that wifi network with a phone or tablet to add the Edimax as a second client network (using Network -> Wireless ->Add), or plug in an ethernet cable.
 
Why not just stick to the on-board wifi of the Pi zero W? I run mine outside with my AP being inside and have no trouble maintaining a stable wifi connection.
 

 

Back
Top