These are chat archives for SmingHub/Sming

13th
Dec 2018
cometurrata
@cometurrata
Dec 13 2018 15:49

Hello, everyone, I'm trying to make repeated Https posts (with ssl) and it seems that every time I do a request, heap decreases a little. And I run out of heap.... do you have any idea about that ?
Here is the code I run :

https://pastebin.com/WyBHnnjJ

Every time I make a request, I do a new HttpRequest but I never delete it. When I tried to do , a stackdump occurs...
slaff
@slaff
Dec 13 2018 16:00
The request object will be deleted once it is used.
You should not delete it additionally.
slaff
@slaff
Dec 13 2018 16:05
I guess you are generating faster http connections then they are released. You can change your code adding something like below and give it a try:
headers["X-Powered-By"] = "Sming";
headers["Connection"] = "close"; // << that instructs the server to close the connection and not wait for a timeout..
Mike G
@mike.greipel_gitlab
Dec 13 2018 17:00
Hello everyone, im trying to make the Basic_rBoot work on my 4MB ESP. This is how i make and flash the roms SmingHub/Sming#1552
Im always getting wdt reset or the esp didnt even starts..
slaff
@slaff
Dec 13 2018 17:02
Mike, I guess your switch to a new rom worked but the system_restart hangs which causes WDT reset.
Are you using NodeMCU ?
I would recommend you after flashing the second rom to power off the device.
Remove also communication cables, if any.
Then plug it back, power it on and try.
riban-bw
@riban-bw
Dec 13 2018 17:06
Did you try 'make flashinit' before flashing?
slaff
@slaff
Dec 13 2018 17:06
@riban-bw I think he is experiencing a known "challenge" with software reset not working when the device is still powered.
@riban-bw By the way when are you going to make the fix for the DateTime compilation under Windows?
cometurrata
@cometurrata
Dec 13 2018 17:10
@slaff Thanks for the answer, I'm looking further into the issue I am having. Closing the connection fixes the heap going down
slaff
@slaff
Dec 13 2018 17:16
@mike.greipel_gitlab A possible fix for the software reset issue would be to set GPIO-0 to HIGHT before resetting but I haven't tested this myself so cannot give you a guarantee that it will work. The hardware/manual reset with power off and then power on works for me.
Mike G
@mike.greipel_gitlab
Dec 13 2018 17:22
@slaff I am currently using the Wemos D1 mini
Mike G
@mike.greipel_gitlab
Dec 13 2018 17:40

@riban-bw @slaff yes, i tried "make flashinit" aswell. I tried it again with power off after the second rom flash. I just removed the connection cable from the esp. This is my output this time: https://pastebin.com/sZTtrRrJ

full routine here: https://pastebin.com/kU5aM4vD
thank you for responding, i really appreciate it.

riban-bw
@riban-bw
Dec 13 2018 17:54
@slaff I am tired up this week with office social events leaving me unfit to code 😀. Hope to sort it at the weekend.
riban-bw
@riban-bw
Dec 13 2018 18:16
@mike.greipel_gitlab As slaff said, you will have problems testing with it connected to computer via USB. I have found that performing a test after flashing can help.
Mike G
@mike.greipel_gitlab
Dec 13 2018 18:34
@riban-bw what do you mean with performing a test? And is there any opportunity to shutdown the ESP8266 except removing the connection cable?
I tried to perform the flash via OTA update and getting the error, that Rom 1 is bad
Swapping from rom 0 to rom 1.
Restarting...

state: 5 -> 0 (0)
rm 0
pm close 7
del if0
usl

 ets Jan  8 2013,rst cause:2, boot mode:(3,0)

load 0x40100000, len 1344, room 16 
tail 0
chksum 0x9c
load 0x3ffe8000, len 660, room 8 
tail 12
chksum 0xbd
csum 0xbd

rBoot v1.4.2 - richardaburton@gmail.com
Flash Size:   32 Mbit
Flash Mode:   DIO
Flash Speed:  40 MHz
rBoot Option: Big flash

Rom 1 is bad.
Booting rom 0.
riban-bw
@riban-bw
Dec 13 2018 22:49
Sorry, typo. Performing a power reset after flashing a rom usually fixes the issue that devices with onboard USB serial interface have, e.g. NodeMCU.