Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By Tom_83
#67664 Hi

i noticed that my two new NodeMCU Ver 0.1 modules which i bought at different time behave in a different way - older one proccess the code correctly while newer one has issues with heap and stack showing unexpected values in variables and crashing from time to time.
After checking it thanks to sketch 'TestEspApi' i found out that older one has bigger heap and newer has smaller - how can it be possible ? can i somehow update newer one to have bigger heap ? this difference is just causing these bad issues:

newer one with bad issues:
ESP starting.
system_get_time(): 242766
system_get_rst_info() reset reason: REASON_EXT_SYS_RST
system_get_free_heap_size(): 46592
system_get_os_print(): 0
system_get_os_print(): 1
system_get_chip_id(): 0x5EC54
system_get_sdk_version(): 1.5.2(7eee54f4)
system_get_boot_version(): 31
system_get_userbin_addr(): 0x0
system_get_boot_mode(): SYS_BOOT_NORMAL_MODE
system_get_cpu_freq(): 160
system_get_flash_size_map(): FLASH_SIZE_32M_MAP_512_512
wifi_get_opmode(): 3 - STATIONAP_MODE
wifi_get_opmode_default(): 3 - STATIONAP_MODE
wifi_get_broadcast_if(): 2

older one working fine:
ESP starting.
system_get_time(): 6306680
system_get_rst_info() reset reason: REASON_EXT_SYS_RST
system_get_free_heap_size(): 48088
system_get_os_print(): 0
system_get_os_print(): 1
system_get_chip_id(): 0x864A89
system_get_sdk_version(): 1.5.2(7eee54f4)
system_get_boot_version(): 31
system_get_userbin_addr(): 0x0
system_get_boot_mode(): SYS_BOOT_NORMAL_MODE
system_get_cpu_freq(): 160
system_get_flash_size_map(): FLASH_SIZE_32M_MAP_512_512
wifi_get_opmode(): 1 - STATION_MODE
wifi_get_opmode_default(): 1 - STATION_MODE
wifi_get_broadcast_if(): 1

Regards!
Tom
User avatar
By torntrousers
#67670 Notice that the "bad one" has:

wifi_get_opmode(): 3 - STATIONAP_MODE

whereas the "working one" has:

wifi_get_opmode(): 1 - STATION_MODE

I wonder if thats the cause? By default the ESP starts as both a Wifi Station and an Access Point. I expect being an Access Point takes extra resources. Trying setting it to be just a station with:

Code: Select allWiFi.mode(WIFI_STA);
User avatar
By Tom_83
#67674 Thanks! i will do this change and check.
second strange thing is that i never played with modes with new (and also old one module) so they should have same i guess....in theory
do we have any piece of documentation where these modes are well described ? also soft AP mode ? I cope with a problem where NodeMCU offers huge functionality but it is more :) huge effort to find how to use it or set correctly.... especially when programming via IDE like i do.

Regards!
User avatar
By Tom_83
#67711 Hi, i set WIFI_STA but heap size did not increased :(
i noticed only that is finds WIFI and login much faster that before but i still notice problems with data consistency.
i suscpect now it can be because i use String objects to send data via client.write but still it does not answer the question why two same NodeMCU behave in a different way with same sketch.

regards