These are chat archives for SmingHub/Sming

Sep 2016
Piotr Dobrowolski
Sep 11 2016 00:08
Has anyone managed to use captures in lambda/closures in place of delegates? Right now only things like http.addPath("/", *[](HttpRequest &req, HttpResponse &resp) { /* code */ }); work, but proper captures sound usable. Sadly I'm not really into C++, so maybe I'm just missing something. / inb4 i should feel bad for using closures at all
Sep 11 2016 07:14

@Informatic @zhivko : There are two options for SPIFFS

  • automatic -> spiffs fs is flashed starting at the first available segment after the program code, that is the line @Informatic showed.
    I needed to update that when I converted Sming to RTOS and for sure it works there correctly. There might be bounder cases within NONOS which fail.
    Within the application you can use spiffs_mount()

  • manual -> need to flash yourself to the segment you want to have spiffs fs.
    Within application you need spiffs_mount_manual(...) and provide the correct location of spiffs.
    The basic_rboot example uses this method.

@Informatic :
I did try/use lamda/closures within smingRTOS. They worked, also for delegates but I noticed some specifics when using it. Don't remember now what/when.
Sep 11 2016 07:23
@Informatic : There is PR Sming#596 with the ssl code. Not finished that is why is it not merged. Due to the current status of sming_nonos I will not merge either. Would be great if you can port and finish that for SmingRTOS.
Sep 11 2016 07:33
@Informatic :
I now have a Wemos D1 mini powered bu usb, have no idea how I can see whether is has a CP2102. But after reset I see clear text on my putty configured for 74880.
Piotr Dobrowolski
Sep 11 2016 08:18
Actually, I'm not even using SPIFFS in my case, it was just segments stored in 0x00000 being too big.
PR - Yeah, I was using that branch. ; Wemos - well, CH340 is more rectangular-ish than CP2102, and it should be on the bottom side of Wemos D1. Maybe something is wrong with linux drivers for ch340 then.
I'll look into porting my code to RTOS soon, but just wanted to somehow get it working on nonos, to just have at least some reference.
Piotr Dobrowolski
Sep 11 2016 08:32 + ; And this is what I'm mostly working on recently. Generic NIH MQTT (+HTTP soon) appliance framework with built-in OTA and stuff... ,_,
Not even a framework. Boilerplate, I shall say.
Sep 11 2016 11:55
@/all :
Fixed Timer initialization, please retest rboot/basic_rboot using current master
Sep 11 2016 17:49
why does this occur?```
open errno -10004

write errno -10010
This message was deleted
#define SPIFFS_ERR_BAD_DESCRIPTOR       -10010
#define SPIFFS_ERR_DELETED              -10004
What does it mean?
Sep 11 2016 18:37
errors in the spiffs fs
Sep 11 2016 19:03

rBoot v1.4.0 -
Flash Size:   32 Mbit
Flash Mode:   QIO
Flash Speed:  40 MHz
rBoot Option: Big flash

Rom 0 is bad.
Rom 1 is bad.
No good rom available.
user code done
any idea why this is happening?
Sep 11 2016 19:48
rboot is checking checksum of the rom's -> both invalid.
If it is the same esp as above you might have flash issues
Sep 11 2016 20:03
@hreintke this is occuring only if I use;

    pinMode(LED_PIN, OUTPUT);
    if (AppSettings.exist()) {
        Serial.println("Settings Exits");
        if (AppSettings.state) {
            Serial.println("State it on");
        } else {
            AppSettings.state = false;
            procTimer.initializeMs(2000, turnPlugOff).startOnce();
        WifiStation.config(AppSettings.ssid, AppSettings.password);
        Serial.println("Wifi SSID"+AppSettings.ssid);
        WifiStation.enable(true, true);
        WifiAccessPoint.enable(false, false);
        WifiStation.waitConnection(connectOk, 20, connectFail);
    } else {

        Serial.println("Settings Dont Exits");
If I comment the then rboot error is gone. but file read write error keeps coming.