-->
Page 11 of 34

Re: node.dsleep() reliability - zombie mode

PostPosted: Thu Feb 05, 2015 11:58 am
by manawyrm
Have a look over into this thread: viewtopic.php?f=18&t=1180&start=10

Could that be the source of the issues? I will try to setup the build environment now.

Re: node.dsleep() reliability - zombie mode

PostPosted: Thu Feb 05, 2015 2:14 pm
by manawyrm
Very interesting :)

I just setup the build environment on my machine and build the current GIT version of nodeMCU on my machine.
Strangely enough, I can't seem to reproduce the bug anymore :)

Code: Select all#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__

#define NODE_VERSION_MAJOR      0U
#define NODE_VERSION_MINOR      9U
#define NODE_VERSION_REVISION   5U
#define NODE_VERSION_INTERNAL   0U

#define NODE_VERSION   "NodeMCU 0.9.5"
#define BUILD_DATE       "build 20150127"

#define FLASH_512K
// #define FLASH_1M
// #define FLASH_2M
// #define FLASH_4M
//#define FLASH_AUTOSIZE
// #define DEVELOP_VERSION
#define FULL_VERSION_FOR_USER

#define USE_OPTIMIZE_PRINTF

#ifdef DEVELOP_VERSION
#define NODE_DEBUG
#endif   /* DEVELOP_VERSION */

#define NODE_ERROR

#ifdef NODE_DEBUG
#define NODE_DBG c_printf
#else
#define NODE_DBG
#endif   /* NODE_DEBUG */

#ifdef NODE_ERROR
#define NODE_ERR c_printf
#else
#define NODE_ERR
#endif   /* NODE_ERROR */

#define ICACHE_STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
#define ICACHE_STORE_ATTR __attribute__((aligned(4)))
#define ICACHE_RAM_ATTR __attribute__((section(".iram0.text")))
// #define ICACHE_RODATA_ATTR __attribute__((section(".rodata2.text")))

#define CLIENT_SSL_ENABLE
#define GPIO_INTERRUPT_ENABLE

// #define BUILD_WOFS      1
#define BUILD_SPIFFS   1

#define LUA_USE_MODULES
#ifdef LUA_USE_MODULES
#define LUA_USE_MODULES_NODE
#define LUA_USE_MODULES_FILE
#define LUA_USE_MODULES_GPIO
#define LUA_USE_MODULES_WIFI
#define LUA_USE_MODULES_NET
#define LUA_USE_MODULES_PWM
#define LUA_USE_MODULES_I2C
#define LUA_USE_MODULES_SPI
#define LUA_USE_MODULES_TMR
#define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_UART
#define LUA_USE_MODULES_OW
#define LUA_USE_MODULES_BIT
// #define LUA_USE_MODULES_MQTT
#endif /* LUA_USE_MODULES */

// #define LUA_NUMBER_INTEGRAL
#ifndef LUA_NUMBER_INTEGRAL
#define PRINTF_LONG_SUPPORT
#endif

#define LUA_OPTRAM
#ifdef LUA_OPTRAM
#define LUA_OPTIMIZE_MEMORY         2
#else
#define LUA_OPTIMIZE_MEMORY         0
#endif   /* LUA_OPTRAM */

#define READLINE_INTERVAL   80
#define KEY_SHORT_MS   200
#define KEY_LONG_MS      3000
#define KEY_SHORT_COUNT (KEY_SHORT_MS / READLINE_INTERVAL)
#define KEY_LONG_COUNT (KEY_LONG_MS / READLINE_INTERVAL)

#define LED_HIGH_COUNT_DEFAULT 10
#define LED_LOW_COUNT_DEFAULT 0

#endif   /* __USER_CONFIG_H__ */


The parameter I think fixed the bug, was the fixed flash size of 512K. When I set that, it worked like a charm :D

Best regards,
Tobias

Re: node.dsleep() reliability - zombie mode

PostPosted: Thu Feb 05, 2015 2:33 pm
by GeoNomad
manawyrm wrote:When I set that, it worked like a charm


Given that it works for me for hours at a minimum and 2 days at best (so far), I wonder if that is really the same problem as mine.

I think you were seeing the problem in minutes.

Re: node.dsleep() reliability - zombie mode

PostPosted: Thu Feb 05, 2015 2:47 pm
by manawyrm
Well, i just went to take a shower and the modules are still running, thats over 1 hour at the moment, which is far more than the default firmware does. I will leave it running over night.

I attached you the firmware as a .tar.gz file so you can try it out for yourself.

So long,
Tobias