These are chat archives for SmingHub/Sming

1st
Mar 2016
bundabrg
@bundabrg
Mar 01 2016 03:07

Hey all, a few quick questions. I'm attempting to set up a 12-E as follows (512Kb - Rom0, 512Kb - Rom1) (3Mb Spiffy). Writing 3Mb blank SPIFFS over serial is terrible so I've gone full OTA where I've updated most of the debugging to write to a UDP multicast address that my dev machine can capture for logs.

So I've disabled SPIFFS using 'DISABLE_SPIFFS=1' in Makeful-user.mk and written my initial rom using serial. That works fine, and so does OTA for all subsequent compiles.

However I want to perform a format of SPIFFS in code. I do that (for now) just before I do an OTA by issuing: -
spiffs_format_manual(0x40200000+0x1000000, SPIFF_SIZE); // SPIFF_SIZE is supposed to be 3000000 (3Mb) but for now I have it as 500000 (512Kb)

This causes a reset as the current spiffs code unmounts spiffs, then formats it, then attempts to mount it, which finds the first sector is not written yet, which then performs a format (again), which then resets.

If I comment out the second format it seems to work but every time I write a file I get an exception 28 (LoadProhibitedCause). My mount command is: -
spiffs_mount_manual(0x40200000+0x100000, SPIFF_SIZE);

Sming V2.1.0

bundabrg
@bundabrg
Mar 01 2016 05:11
Actually, ignore that. Found the issue and as usual its unrelated to Sming.
alon24
@alon24
Mar 01 2016 06:00
@bundabrg can I share u'r code? The full Ota, and multicuasrl and u'r rom usage seems very interesting g to me
alon24
@alon24
Mar 01 2016 08:20
I meant ofcourse can u share the code, damn auto correct
bundabrg
@bundabrg
Mar 01 2016 09:03
@alon24 I have no problem with that. I have a Update Class Singleton that I initiate that does all the work of checking for updates from my internal dev server, and a Debug Singleton (I know, I know, I'm still very C at heart) that does the multicast debugging. I'll package them up and put them somewhere.
alon24
@alon24
Mar 01 2016 09:04
Gr8 10x
slaff
@slaff
Mar 01 2016 10:04
@/all SmingRTOS debug support is here: SmingHub/SmingRTOS#79
robotiko
@robotiko
Mar 01 2016 10:16
@slaff GREAT!!!
thansk
ystrem
@ystrem
Mar 01 2016 10:25
:+1:
Patrick Jahns
@patrickjahns
Mar 01 2016 10:58
Thumbsup
Can someone have a look at PR #622
ystrem
@ystrem
Mar 01 2016 11:26
Does work debug on Windows ?
slaff
@slaff
Mar 01 2016 12:07
@ystrem Check if it compiles under Windows. If the answer is yes then read the Readme.md file in the Basic_Debug directory to get the right debugger and stuff under Windows.
robotiko
@robotiko
Mar 01 2016 13:17
@slaff I will try later today and validate teh windows implementation
thanks a lot
great addition to rtos
slaff
@slaff
Mar 01 2016 13:27
Horray! With the latest small changes also the Mqtt over SSL example works SmingHub/Sming#596 :) . Someone willing to test it on Windows or MacOS X?
Patrick Jahns
@patrickjahns
Mar 01 2016 13:43
Can try - that is actual amazing news - makes me feel more secure :-)
Guys do you know if there is already any implementation for a dns server for sming? Trying to create a catch_all dns requests to redirect to a certain page served from esp while clients are connected via esp ap mode
alonewolfx2
@alonewolfx2
Mar 01 2016 13:44
@slaff thanks. i will test it on windows tonight
@patrickjahns it isnt implemented yet
Patrick Jahns
@patrickjahns
Mar 01 2016 13:46
thanks for headsup - then I will do it for myself - is this something usefull for sming? then I`ll try to create something that can be used in general with sming
slaff
@slaff
Mar 01 2016 13:47
DNS server in Sming is non existing but you can freely use other open source projects that have captive portal features. For example this one: https://github.com/israellot/esp-ginx, or the original SpriteTM httpd server.
Patrick Jahns
@patrickjahns
Mar 01 2016 13:51
is this of interest for the project? I then would port the dnsservers from other projects over to sming
alonewolfx2
@alonewolfx2
Mar 01 2016 13:52
@patrickjahns i am intresting and propably one day i will port into the sming if anyone will not port yet. but it isnt high priority
Patrick Jahns
@patrickjahns
Mar 01 2016 13:53
btw talking about the webserver - is there any reason why sming uses it`s own implementation over porting a well know library? (just out of curious why )
@alonewolfx2 - I want to use one for a current project, so I would do the port if desired - any suggestions which library you`d favor
alonewolfx2
@alonewolfx2
Mar 01 2016 13:55
@patrickjahns for dns server?
i tried this project and its working. i am thinking to port https://github.com/israellot/esp-ginx
just dns server+redirect part and maybe cgi
Patrick Jahns
@patrickjahns
Mar 01 2016 14:00
Thanks for the info - i`ll have a look and see if I can port it already
Arduino framework seems to also have a DNS Server library here: https://github.com/esp8266/Arduino/tree/master/libraries/DNSServer/src
robotiko
@robotiko
Mar 01 2016 14:11
@patrickjahns it is interesting for sming.. Sure.
alonewolfx2
@alonewolfx2
Mar 01 2016 15:05
@patrickjahns did you try to port? it seems can be ported easly
Patrick Jahns
@patrickjahns
Mar 01 2016 17:04
@alonewolfx2 which one? esp-ginx or arduino? - I was on the go until now but will try later tonight or tomorrow
alonewolfx2
@alonewolfx2
Mar 01 2016 17:10
arduino
robotiko
@robotiko
Mar 01 2016 18:08
@slaff look like the windows build has some issues
gdbstub/gdbstub.c:12:21: fatal error: ets_sys.h: No such file or directory
alonewolfx2
@alonewolfx2
Mar 01 2016 19:28
@avr39-ripe are you here?
i am trying rtc example but it seems it didnt work for me
on rtos
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:32
@alonewolfx2 Im here.. Do you connect ds3231 module to 2,0 pins?
@alonewolfx2 or what do you mean "do not work"?
alonewolfx2
@alonewolfx2
Mar 01 2016 19:36
4,5
and i tried scanneri2c. it fined both rtc and eeprom
but here is serial log
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:37
So you need change Wire.pins..
alonewolfx2
@alonewolfx2
Mar 01 2016 19:38
i did
UDP connect to 192.36.143.130:123
UdpConnection send : #
time updated? 1
time updated? 1
Time synchronized: 01.03.2016 19:37:56
Local Time    : 01.03.2016 19:37:57
UTC Time: 01.03.2016 16:37:57
dsRTC Time: 01.01.1970 00:00:00
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:41
Dont you mismatch sda and scl?? Try to swith either pins in Wire.pins call or re-wire wires 4 to 5 and 5 to 4
alonewolfx2
@alonewolfx2
Mar 01 2016 19:41
connection is right
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:41
I think you just mismatch sdl and sca
alonewolfx2
@alonewolfx2
Mar 01 2016 19:41
i2c scanner example find rtc on right adress
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:42
What is the rtc module?
alonewolfx2
@alonewolfx2
Mar 01 2016 19:42
ds3231
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:44
Strange.. I chek the code and example before submission.. Do not have hardware just now.. Can recheck everything tomorrow morning my tz is GMT+2..
In my setup on either rtos and nonos lib and example app works on either 0,2 and 4,5 pins..
alonewolfx2
@alonewolfx2
Mar 01 2016 19:46
ds3231 or ds3232
I use this particular module..
Ds3231
alonewolfx2
@alonewolfx2
Mar 01 2016 19:48
i have same
ok i need to try manual time set
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:50
Scl - 0, sda - 2 can you check such setup?
alonewolfx2
@alonewolfx2
Mar 01 2016 19:50
yep wait a minute
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:52
And do not forget to change Wire.pins(0,2);
alonewolfx2
@alonewolfx2
Mar 01 2016 19:54
same result
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:54
Hmm.. Odd..
Will chek it on my hw and inform you..
alonewolfx2
@alonewolfx2
Mar 01 2016 19:55
ok
i will try same module on arduino hardware
Alexander V. Ribchansky
@avr39-ripe
Mar 01 2016 19:58
Ok..
What is your esp hw?