HeaterMeter wireless discussion


 

Mark Workman

New member
I have built a couple of v4.1.4 HMs. One of them is for my personal use at home, and it works great. However, I have several friends clamoring to use my "spare" HM. I don't want to go over to their house, and go through the process of connecting the HM to their wireless network... and so on.... So, I spent some time this weekend playing with the OpenWrt wifi settings on the HM.

Ideally, I would like for the HM to operate as a standalone wireless AP. I also want it to provide a static IP to host the webpages. In this configuration, I could connect and monitor (with a PC or smartphone app like pitdroid) the HM without the use of separate wireless network. In effect, the HM will provide it's own wireless network.

All I would have to do is provide my friends with the wifi SSID, password and IP address. Then they could use the HM without it being configured on their specific network.

As of now, I have not found the proper wifi settings in the HM software configuration to do this. Has anyone solved this puzzle? (I don't want to recreate the wheel)

If not, I will investigate the hardware capabilities of the Edimax wifi device, and crack open the OpenWrt code to investigate...

Thx,
mw
 
The rtl8192cu driver is kinda craptastic. It does sort of work in AP mode sometimes and in ways I can't completely nail down when it doesn't work. I've had much better luck with the RT5370-based adapter I bought for testing. However, it was the "cheapest adapter I can find" and of course now Amazon doesn't carry them any more.

In any case, I also find using the webui to be a pain in the butt to switch between STA mode and AP mode. LinkMeter package v11 has a script for switching them easily:
wifi-ap MYSSID PASSWORD

And then once you're on that network the HeaterMeter is http://192.168.201.1 the default firmware that will include v11 also sets the wifi adapter in this mode (with no encryption) by default. This should be available for beta testing within a week.
 
Well, "craptastic" is certainly one word for it. :) I'll be interested in looking at the v11 release. Thanks for the heads-up.
 
It's a bummer that Amazon isn't carrying that RT5370 based wifi adapter any more... I think I am going to give this ComFast unit a try... Easier/better Access Point mode would be nice...
 
For what it's worth, that looks exactly like the adapter I have, down to the holes on the side and wifi led on top. The model I have has no writing on the connector and is black though. I ordered another one of the generic models from Amazon with an antenna which you can also find on eBay and supposedly has RT5370 chip in it. It's so generic though it might be hard to reproducibly get the same adapter. There are a bunch of adapters but not many are still made because it was a "Draft-N" chip it seems. The one listed as "Panda Wireless" on Amazon might be RT5370...

If there is another chip that I can get support for I'd be willing to try but there doesn't seem to be many options.
 
I just got my RT5370 based wifi adapter today, this WU715N that I purchased from Ebay....
I pulled the Edimax and plugged in this new unit and much to my surprise it worked right out of the gate without even changing any settings. It came up with the same static IP I had assigned to the Edimax unit and seems to be working just fine so far.

I haven't tried AP mode yet, or taken it outside to see how good the range is, but I will report back when I have some feedback on those topics. Physically it is a slight bit begger than the Edimax, the plastic part is a tiny bit larger and the USB connector is a tad longer so it sticks out of the socket a little more, but it's still very small so I find those differences to be negligible....
 
I used the RT570 wifi for a cook last night and had no problems with range, it covers at least as much distance as the Edimax wifi for me....

I also got the RT5370 to work in Access Point mode, with it's DHCP assigning an IP address to devices that connect, which I was excited about...

I'm wondering if this device could possibly function as an Access Point and also connect to my WiFi at the same time? I've been trying all sorts of variation but so far haven't been able to get them both working, it's either one or the other... This means that I would have to change the device over to AP mode before I leave my WiFi network or have a wired lan available to make that change. It would be nice to have an easy way to enable AP mode (maybe in the HM menu?) so you can connect to it easily from wireless devices for remote cooks... Looking for input from anyone on this topic...
 
I also got the RT5370 to work in Access Point mode, with it's DHCP assigning an IP address to devices that connect, which I was excited about...

I'm wondering if this device could possibly function as an Access Point and also connect to my WiFi at the same time?
Told ya it worked great as AP, right? It should be able to function as both AP and STA simultaneously by using the kernel vintf mac. However, I think it is darn near impossible to do from the webui because of how it modifies the config and you can get stuck in limbo really easily by making a configuration that both doesn't connect to a BSSID and DHCP and address as a client nor host an AP with hostapd/security enabled and DHCP service.

I haven't put more than 10 minutes into getting them both working at the same time, so if someone works out a AP and STA configuration, I'd like to see their /etc/config directory.
 
When I swapped in this adapter to replace the Edimax it worked right off the bat. When I tried to use AP mode I first added another connection for AP mode (in addition to the existing Client Mode connection) but it didn't work. After I deleted all the connections in the WIFI tab, then I clicked ADD to add a connection, selected Access Point mode, clicked CREATE under Network and created a network config for this AP. In the Network Config I was able to set a Static IP and setup a DHCP server to pass out IP address's to clients that connect. After I did this my laptop found and connected to the HM AP very easily and the HM webpage loaded from the Static IP address...
I tried a number of configurations with connections for both AP and Client mode but couldn't work it out so both functioned at the same time, but hope we are able to work this out in the future. It would be nice to have the HM configured so it will connect to your home WiFi AND function as an AP that you can connect to with devices when you are not connected to your home WiFi.
 
Yeah it would be nice to have client when it can and AP when it can't or something like that too.

I find it a lot quicker to use the command line tools (wifi-ap / wifi-client) to switch between client and AP and there can't be any mistakes like the webui can cause.
 
But you have to be connected to the HM in order to use the command line (or the webui)... What about a script that could be triggered by the HM menu on the display that would switch back and forth, is that possible?
 
What about a script that could be triggered by the HM menu on the display that would switch back and forth, is that possible?
No. You still need to get into the device with a browser, keyboard, or ssh session to change the configuration. I was just saying that the command like is far less error-prone than the webui for switching between them, especially because if you don't disable the DHCP server in webui before switching to client mode using webui, the DHCP server stays running and the option to disable it is removed from the webui.
 
OK, was just trying to brainstorm any way to make the HM go into AP mode without already having a network connection. If there was some way you could make it default to AP mode if the local WiFi network is not available that would be awesome...
 
Yeah that's easy enough to do, the problem is that if you lose wifi signal for any reason and it switches to AP mode... it can't ever tell if it is time to go back. It would be super-frustrating for HeaterMeter to switch to AP mode in the middle of a cook because the wifi signal dropped off for X seconds and then would need to be rebooted to go back. It would become a complicated system that would never work the way you expect (because everyone has different expectations) so it is better for now to just not muck with what the user sets up for themselves.
 
Could you code it so when the HM first boots up if the local WiFi was not available it would switch to AP mode, but not after boot? This way the mode would be set at boot only and not changed afterword during a cook? Don't mean to beat what might be a dead horse, just trying to brainstorm a way to make it work easier...
 
Well what if the power flickers for a second and both the HeaterMeter and AP reboot, the HeaterMeter comes up before the AP and it switches to AP mode. Or if you have to reboot the HM because something stops working right and your body blocks the wifi signal enough to delay it connecting and you get locked into AP mode again which is ironic because you'd have to reboot it again and it will stay in AP mode because every time you reboot it it blocks the signal forcing you to reboot it!

It would be much better with a second virtual interface that I can just bring up any time the client interface isn't connected (which I will also point out isn't foolproof to detect either).

I can't put it into this release anyway so there's plenty of time to work out a good solution.
 
Gentlemen, I like the direction this thread is going! I think the key is, "What does the HM do when it detects a wifi dongle?" This detection could be caused by a HM reboot or a wifi dongle being inserted. I would imagine this operation:
1) A dongle is detected.
2) HM searches 30 secs for wifi in Client mode.
3) HM switches to AP mode and stays in AP mode.
4) If the dongle is removed and reinserted, the cycle starts over again.

If a HM inadvertently slips into AP mode, a user can switch back to client mode by removing and reinserting the wifi dongle.

As an alternative, at $7 - $12 each, I would not mind having two wifi dongles, and use their mac address to detect if the HM operates in Client or AP modes. If I am taking my HM to a friends house, I could remove my "client" dongle, and insert my "AP" dongle. When the HM boots up, it automatically goes into the respective client or AP mode.

Just my 2 cents...
 
As an alternative, at $7 - $12 each, I would not mind having two wifi dongles, and use their mac address to detect if the HM operates in Client or AP modes. If I am taking my HM to a friends house, I could remove my "client" dongle, and insert my "AP" dongle. When the HM boots up, it automatically goes into the respective client or AP mode.
Whoa now that's a good idea right there. I think you can actually do this currently if you bind the adapter by mac and not by iw phy. That doesn't help if you already get to your friend's house and you forgot your AP adapter which would be tragic.

Unfortunately you can't usually remove and reinsert the 8192cu-based adapters because the driver is garbage and will crash the kernel. I just don't like the idea of ever automatically switching to a mode that requires manual interaction to go back either. A whole "don't automatically do that which you don't automatically undo" mantra.
 
Well what if the power flickers for a second and both the HeaterMeter and AP reboot, the HeaterMeter comes up before the AP and it switches to AP mode. Or if you have to reboot the HM because something stops working right and your body blocks the wifi signal enough to delay it connecting and you get locked into AP mode again which is ironic because you'd have to reboot it again and it will stay in AP mode because every time you reboot it it blocks the signal forcing you to reboot it!

It would be much better with a second virtual interface that I can just bring up any time the client interface isn't connected (which I will also point out isn't foolproof to detect either).

I can't put it into this release anyway so there's plenty of time to work out a good solution.

Well, my WiFi comes up much faster than the HM (rPi) boots, so I don't see an issue connecting back after a power glitch. If your HM power glitches and you are somehow standing where you block the WiFi signal then power cycle it again and move the hell out of the way! LOL Personally I haven't experienced my HM dropping connection to my WiFi at all, so I don't see any of those things to be an issue....

I understand this is not something for the current release, just trying to keep pushing forward and improving the HM functionality, adding easy AP mode would be a nice improvement. I still prefer the idea of being able to select Client or AP mode in the HM (display) menu, but I guess that idea is a non-starter...

I had thought of using two WiFi dongles (at the same time) with one set to connect in client mode to my WiFi and the other set to AP mode, but not sure how the HM would deal with that either?
 
Last edited:

 

Back
Top