Comments (25)
Try to disable power saving. When i switched off it i got clean output:
Address EEPROM option 58: 1497
Address EEPROM option 59: 1498
Address EEPROM option 60: 1499
Address EEPROM option 61: 1501
Address EEPROM option 62: 1503
Address EEPROM option 63: 1504
Address EEPROM option 64: 1505
Address EEPROM option 65: 1506
Address EEPROM option 66: 1507
Logging output to Telnet
Size of cmdtbl: 126644
from bsb-lan.
Sorry, my bad, this is just a problem of the serial port output when using ESP32 power saving. The switch from 240 to 80 MHz results in a short confusion in the serial port transmission speed and therefore characters are garbled up.
from bsb-lan.
If the problem with the output of garbage content when switching the frequency occurs only in the serial port, and the output to the http connection or file is not affected, then I think it will be enough to mention this feature in the documentation. From a perfectionist's point of view, it's worth thinking about stopping the serial port before switching frequencies, but is there any need for this?
from bsb-lan.
Disabling serial output prior to switching CPU frequency solves the issue, so no more confusion now :)...
from bsb-lan.
Just fyi: espressif/arduino-esp32#6032 sounds related and may contain some useful information.
from bsb-lan.
It should be CF_CONFIG_LEVEL. I looking for suspicious things but found nothing for first sight. But i fix something|: 4d6eeec
from bsb-lan.
Does this show in your startup messages, too? Or is it just me?
from bsb-lan.
Yep i got same problem at startup
from bsb-lan.
But it looks little bit different:
Address EEPROM option 55: 1463
Address EEPROM option 56: 1464
Address EEPROM option 57: 1496
Address EEPROM option 58: 1497
Address EEPROM option 59: 1498
Address EEPROM option 60: 1499
Address EEPROM option 61: 1501
Address EEPROM option 62: 1503
Addres⸮�*�AI=5⸮option 63: 1504
Address EEPROM option 64: 1505
Address EEPROM option 65: 1506
Address EEPROM option 66: 1507
Can it be issue with buffer size/cleanup?
from bsb-lan.
BTW: line
printFmtToWebClient("\r\n%s\r\n",cleanupDatalog(nDays));
can cause unpredicable behavior because cleanupDatalog() and printFmtToWebClient() functions use same buffer: bigBuff
from bsb-lan.
Hm, changing OUTBUF_LEN which is used for DebugBuffer from 450 to 550 leaves the error on the same position. As each line is ca. 30 Bytes, 450 Bytes would have been "hit" after 15 lines already. It rather seems to me as if some other part of the code overwrites DebugBuffer during this process because after these strange characters, the text continues unchanged. If it was a buffer problem of DebugBuffer, there should be unreadable text after the end of the buffer, shouldn't it?
from bsb-lan.
I tried to add a direct Serial.println of getEEPROMaddress to the code part where it outputs the addresses, so it looks like this:
for (uint8_t i = 0; i < CF_LAST_OPTION; i++) {
Serial.println(getEEPROMaddress(i));
printFmtToDebug(PSTR("Address EEPROM option %d: %d\r\n"), i, getEEPROMaddress(i));
}
Now it looks like this:
Address EEPROM option 59: 2077
2078
Address EEPROM option 60: 2078
2080
Address EEPROM option 61: 2080
2082
Address EEPROM option 62: 2082
2083
Address EEPROM option 63: 2083
2p??j
Address EEPROM option 64: 2084
That's really strange, because now the DebugBuffer output seems to be fine, but the direct output to serial of getEEPROMaddress(i) results in strange characters for EEPROM option 64. This is really strange to me because getEEPROMaddress(i) really just returns the value of options[id].eeprom_address. And how can this return some strange characters in one line and then the correct value in the next?
from bsb-lan.
Even more strange: I changed the above code snippet to output the length of DebugBuffer as well as the value in HEX and then both the hex value as well as the decimal value are correct for all addresses and the length of DebugBuffer is always correctly 32 bytes, but somehow strange characters still get added.
81E
32
Address EEPROM option 60: 2078
820
32
Address EEPROM option 61: 2080
822
32
Address f`PROM option 62: 2082
823
32
Address EEPROM option 63: 2083
824
32
Address EEPROM option 64: 2084
from bsb-lan.
Great minds think alike at the same time ;)...
from bsb-lan.
@DE-cr, can you please have a look at this: #580 (comment)
Thanks!
from bsb-lan.
from bsb-lan.
Oh, I see @dukess is already fixing it:
3c97200
from bsb-lan.
@1coderookie we should mentioned in documentation about strange symbols in serial output when power saving mode activated.
from bsb-lan.
@1coderookie we should mentioned in documentation about strange symbols in serial output when power saving mode activated.
...which happens repeatedly in case of boolean esp32_save_energy = true;
in BSB_LAN_config.h
, unless there's also #define WIFI
configured.
from bsb-lan.
Why would it happen repeatedly? The only times it runs is during startup and when downloading the log data (e.g. for displaying the graph), so the occasions are clearly defined.
from bsb-lan.
Exactly: whenever (i.e. repeatedly) log data gets sent to the client.
from bsb-lan.
Sorry for the (now deleted) rant.
But do you really think that it's the same if we write:
"The log output will repeatedly display a 'Ping' message containing the uptime in microseconds"
and
"The log output will repeatedly display garbled characters"?
I would find it much more helpful to idenfity the conditions under which this takes place. Your above statement is wrong because while it does occur repeatedly every time there is a reboot and power saving is enabled, it is however not tied to #define WIFI
. It will happen also when using Ethernet at that point.
However, the only other time I can see this happening is only if the following conditions are met:
- Network connection is Ethernet (i.e. WIFI definement is commented out)
- Logging is activated
- Log data is downloaded
So my question above was not to start a discussion about the meaning of "repeatedly" where we seem to have different understandings about its commonly used form, but I seriously wanted to know if you have spotted other parts in the code where this will (repetedly or not) affect serial output. Since I know you are a good programmer, I'm honestly interested in your input in these matters, but these repeated ;) semantic discussions are simply not helping at all.
from bsb-lan.
I'm sorry for having caused confusion here (again - and not even having clarified it with my "Exactly" above).
The only places I'm aware of where setCpuFrequencyMhz()
gets called is at startup and at the beginning and at the end of handling urls that start with /D
, and even there only under the conditions given: esp32_save_energy == true
, and for the /D
commands additionally required defined(ESP32) && !defined(WIFI)
.
As for your question: The answer is "no", but the question confuses me. :)
from bsb-lan.
👍
from bsb-lan.
Haven't thought about stopping and starting the serial port, will try this out. Otherwise: Yes, it only affects serial output, and only when CPU speed is switched, nothing else.
from bsb-lan.
Related Issues (20)
- [BUG] "/JS" POST request unexpected behavior HOT 8
- [BUG] Web Server Stopped Working HOT 4
- [FEATURE] Heating-Engineer Additional Parameters Access HOT 3
- [BUG] Constat reconnection to mqtt broker HOT 3
- [FEATURE REQUEST] Send BSB-LAN version to MQTT HOT 2
- [BUG] PPS Errors with BSB-LAN Versions > 2.0.16 HOT 117
- [FEATURE REQUEST] No wifi if started after wifi access point HOT 1
- [FEATURE REQUEST] Set date and time HOT 1
- [BUG] Set date and time reset after a while HOT 45
- [BUG] MQTT connection fails HOT 27
- [FEATURE REQUEST] Add support for WT32-ETH1 board HOT 4
- [BUG] SD card vs. flash memory HOT 5
- [BUG] Device hangs for some seconds on socket error with MQTT HOT 2
- [BUG] Heater function list disappeared in version 3.4.3 HOT 9
- [BUG] Set button is not working on parameter that require /I in the we interface HOT 4
- [BUG] BSB-LAN does not compile HOT 1
- [BUG]?: calculation of free space in filesystem HOT 1
- [BUG] v3.4.7 crashes ESP32/Wifi/BSB when submitting room temperature HOT 3
- Migrating BSB-LAN to ESP32 framework 3.0.0 HOT 4
- [BUG] Sketch too big HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bsb-lan.