-
Notifications
You must be signed in to change notification settings - Fork 186
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
Problem in start page configuration mqttRSSI_NA.ino #451
Comments
@Hieromon |
@Bighoneypot The Just to be sure, I have now tested again with the following combination and cannot reproduce the posted phenomenon. In both cases based on AutoConnect 1.3.2 For ESP8266: For ESP32: |
@Hieromon |
@Bighoneypot Well you mean that initial values is not set. I knew this, and thought it wouldn't be a big problem, so I left it at that. But as you've encountered, it may destroy the HTML. |
@Hieromon |
@Bighoneypot I fixed the issue and commit to the master. Can you please verify in your environment that the fix is correct? |
@Hieromon I'm try it... |
@Hieromon ADD: |
@Bighoneypot Thank you for your testing. I will try to reproduce the phenomenon on my end, so please tell me more about your procedure. I have confirmed that the following steps work fine. What is the difference between your procedure and mine?
The |
@Bighoneypot I don't think deep sleep is relevant. Reading from EEPROM is performed before the AutoConnect/examples/mqttRSSI_NA/mqttRSSI_NA.ino Lines 289 to 293 in 87e510a
|
|
I did not understand how to use in this sketch AutoConnectConfig::boundaryOffset |
@Bighoneypot Did you test mqttRSSI_NA without modification from the library example? If the problem reappears without modification, it may be that something is lurking in your environment. We first need to isolate the problem.
The serial monitor will show the IP address of the ESP8266 after WiFi connection. Can you use that to access it?
There may be a library conflict. The correct dependencies are as follows:
First, I recommend you check whether the data has been written correctly in the EEPROM area. Dumping the EEPROM may give you clues. You can easily dump the EEPROM area using ESPShaker.
As you can read from the dump above, the channel settings for Thingspeak start at the beginning of the EEPROM area. AutoConnect credentials are followed. AutoConnectConfig::boundaryOffset notifies AutoConnect of this offset.
Used in combination with AutoConnect::getEEPROMUsedSize. See the snippet below. AutoConnect portal;
AutoConnectConfig config;
// Defines the custom data should be stored in EEPROM.
typedef struct {
char data1[8];
char data2[8];
char data3[8];
} EEPROM_CONFIG_t;
EEPROM_CONFIG_t eepromConfig;
...
// Declares to reserve the EEPROM_CONFIG_t area for a Sketch using.
config.boundaryOffset = sizeof(eepromConfig);
portal.config(config);
...
strcpy(eepromComfig.data1, "data1");
strcpy(eepromComfig.data2, "data2");
strcpy(eepromComfig.data3, "data3");
// Use getEEPROMUsedSize to access the EEPROM with the appropriate region size.
EEPROM.begin(portal.getEEPROMUsedSize());
EEPROM.put<EEPROM_CONFIG_t>(0, eepromConfig);
EEPROM.commit();
EEPROM.end();
... |
@Hieromon I'm Captive portal is non present because because at the second restart it has the wifi connection data in memory so it is connected to the internet. Why don't you do a function for captive portal open mode when writeapikey, user apikey or publish interval are Zero. |
@Bighoneypot
Which sketch you used? Have you encountered this phenomenon with mqttRSSI_NA.ino? Or is it your sketch with some kind of modification?
I can not see its usefulness. User data is stored in the EEPROM area whether it is under the Captive Portal or not. This is what the AutoConnectConfig::boundaryOffset w/AutoConnect::getEEPROMUsedSize API is for. And you said,
What is this? The captive portal is not opened by AutoConnect, but by the OS of the client device. AutoConnect simply triggers the client device to launch the captive portal. It will not work if the client device has internet transparency. And I say again, I recommend you check whether the data has been written correctly in the EEPROM area. |
The initial value leak in mqttRSSI_NA.ino seems to have been fixed, so I consider this problem to be fixed. v1.3.3 will be released. |
ESPshaker:
Dependencies:
Sorry I don't understand how to implement and configure AutoConnect :: getEEPROMUsedSize in the sketch |
@Bighoneypot First of all, please answer the following questions so that I can capture the phenomenon you are encountering.
So, see the code snippet that I posted above. If a user sketch uses its own EEPROM area, that procedure is usually the norm. The |
@Hieromon |
I find other problem, but I open other Issue. |
@Hieromon bug is fixed, thank you. I close this Issue |
Gday, I try to use mqttRSSI_FS.ino, but in configuration page there is a error.
Mqtt settings page have a problem.
The text was updated successfully, but these errors were encountered: