-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wifi Roaming not enabled yet #2092
Comments
@Slider0007 Ich war mal so frei und habe dich assigned, da du am ehesten weist, was noch fehlt. @jomjol FYI |
No problem :-) I've already started with heap analysis, but right now it looks not really promising without having risk of instability. One chance would be to reduce heap which is used by MQTT discovery topics. This would improve the situation --> see #2091 (comment) |
As a reply to #2091 (comment): I agree that we only should send any MQTT topics at a defined point in time. Do we understand why roaming requires so much additional memory? Can we adjust this? As for HA Discovery, I still do not understand why it takes so much memory. In my understanding, MQTT publishing is a blocking task, thus it does not matter if I want to send 1 or 20 topics, the memory usage should be the same. We might also consider to go and use the upper 4 Mbytes (Hi-Mem, I think @nliaudat looked into this, but I can't find the Github issue/PR) for roaming, eg. make it a requirement to have 8 MBytes for Wifi Roaming. |
Would it not be easier to just trigger by button which is interlocked with flow finished?
An additional task is used to handle to roaming features. This alone consumes 6kB, and every beacon which needs to be saved used ca. 1kB. I assume this cannot be adjusted.
I tried to explain here: #1990 (comment)
This doesn't matter right now because models are stored in PSRAM. PSRAM is not a limitation anymore. We have with the largest model still 650kB free PSRAM. So there is no need or benefit to increase PSRAM at the moment, so HIMEM is not needed right now. In sum, it's difficult to find internal RAM and I checked different sources and biggest "variable consumer" (of DMA memory) is still HA discovery including respective DEBUG messages and here I personally see a quite easy way to get a lot memory back without having a big drawback. Other option would be not implementing wifi roaming. I agree that not everybody (me neither) needs such functionality because usually device is mounted statically. |
I think, this would be a good compromise. Because I have this problem, that the device connects not with the best, but the first found AP constantly and this is sometimes very instable. |
So you would only enable the button when the flow is finshed?
Wow, that's heavy!
Yes, I have studied that part.
Maybe we could drop support for them? We could check the revision in the next version and tell the people to report to us if they use rev. 1. And if we do not get too many notes, there is no reason to keep it. Especially as one just could do a drop-in replacement with a newer board. Personally I do not know what I have, it seems not yet be reported in the UART log.
If there is an alternative, that might be a go-able way. I also would like to have roaming. |
Setting the flag like you proposed would also be possible. That was just an quick idea, maybe there are other possiblities. Calling discovery topics with REST could just be return a message that this is only available when flow is finished. As long it's sending in a situation which is not critical.
Theory is one part which can interpret different way, but you can check it easily just by yourself. With your theory no difference in heap consumption should occur, but numbers show a different story when HA discovery is activated with DEBUG level (keep rest of config the same) --> http://IP/heap
All my boards a rev.1 boards. I do not like to replace all my boards if not really necessary. I assume there are still a lot around. With newest rolling, board revision number will be printed in logfile at boot.
@caco3, @jomjol: Maybe the simple WIFI full SCAN config could alredy help here. I haven't fully tested this option. If you want to test, I can provide the test firmware. |
I do not like that, do we expect a user has to try for several minutes until it is allowed? If the interval is tight, the next flow starts quickly, in the worst case only providing a window of some seconds! Also, if one would want to trigger it automatically, that would be annoying to handle.
I will see that I can play a bit with it myself.
ah, ok. Like said I thought they might be all sold out by now since they are on rev 4 or so.
👍
Yes, please do |
I understand your point. This is for sure a compromise. I imagine it this way (with my not existing HA knowledge): Boot the device, have HA ready, wait until device is in state "flow finished". Push the button and that's it. All results and system status will be provided round by round anyway.
No problem, maybe tomorrow :-) |
Board revision can be retrieved with esp_sys.cpp : The rev1 RAM bug workaround is enabled by default in sdkconfig.defaults by setting : Using HIMEM was discussed in #1842. It need to manually allocate RAM with esp_himem_alloc or heap_caps_malloc() I've tried with
|
Yes, the discovery only is needed once. My scenario was more generic, related to other possible REST API calls which could trigger MQTT publishing or so. |
Great! @Slider0007 Can you add this to your PR or should we add it separately? i think that might get useful in the future. |
@caco3 : As described a few posts above, board revision gets already printed to logfile at every boot with latest rolling. So it's already included. |
Is it really necessary to log this information at each boot? I would rather see that kind of information in the web interface under system > info |
For diagnostic purpose I think it could be helpful to have it in the log, because whenever user share there issues they don't share Info menu but the logfile, so all info is in one place. Nevertheless, this info can for sure added to Info page as well. But this wasn't the main goal of the PR where I modified boot part. |
I was thinking about his, using that function but activating the flag all in the file included functions get activated. Unfortunately, most of them are duplicates of functions which are already available in other files. Therefore a cleanup should be done before this is part of software is usable. |
I created a third firmware version for testing (switch APs with wifi scanning only) --> further infos #2107 |
Merged into newest rolling. This will be part of next official release 15.1 |
Support for Wifi Roaming is implemented, but it seems not enabled yet.
The text was updated successfully, but these errors were encountered: