Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Myles McNamara
    @tripflex
    actually nvm
    yeah was just about to say that after looking at the code
    docs only say that mbuf_insert will grow it lol
    DrBomb
    @DrBomb
    Yeah, that's a weird one
    Myles McNamara
    @tripflex
    Returns the number of bytes appended or 0 if out of memory.
    DrBomb
    @DrBomb
    but I've been using append for awhile now and I've never seen it not grow it
    Myles McNamara
    @tripflex
    yeah should be fine ;-)
    building new fw to test with :)
    needlerp
    @needlerp
    My plan is flawed: conf_acl in conf5.json is preventing me from setting a more relaxed conf_acl in a newly uploaded conf6.json. I can’t overwrite conf5.json as it also contains device-specific settings. Any other ideas? @rojer, is there a seperate way to ignore extra_http_headers when using ota-shadow?
    I was thinking I could just modify a local ota_http_client to ignore extra_http_headers, but it’s now a restricted lib so I can’t do that either...
    Myles McNamara
    @tripflex
    so i’m trying to do an OTA on a remote device, and it keeps getting stuck around 78% and i can’t figure out why — any thoughts?
    Myles McNamara
    @tripflex
    morel ike 90%
    tried using debug.stderr_topic to send to MQTT but it doesn’t give me any useful information
    except 218 1576111014.843 2|mgos_ota_core.c:506 79.28% total, fogirfw.bin 1049088 of 1124208 as the last line i see
    looks like this may be the issue as i’m seeing esp32_ota_backend.c:262 Skip writing app (digest matches)
    mos tool starts a UDP listener on port 1993. Therefore, if you set debug.udp_log_addr to YOUR_MACHINE_IP:1993, mos tool will start showing your device logs.
    so is this not true anymore
    i have mos tool running and nothing is open on port 1993
    Myles McNamara
    @tripflex
    and of course OTA is closed source so i’m kind of stuck at what i can do to troubleshoot this …. now i have to drive 2+ hours to get to the device just because the OTA does not work
    another dissapointed night due to mongoose os :-\
    Ryan Truer
    @rtrue983
    @needlerp I can easily explain how to change code via c but I don't know if that will help?
    @tripflex is this on a 8266? Are you running out of space on that specific device and it aborts?
    needlerp
    @needlerp
    @tripflex I was recently using debug via the undo listener and it worked well.
    mos console --port udp://:1993/
    @rtrue983 that would be very helpful- I might be able to work out how to call it from MJS using FFI if you can hel with the c part?
    needlerp
    @needlerp
    @tripflex I just checked debug over UDP on a remote device and it works fine.
    Have you got 1993 open and redirecting to your local machine on your router?
    needlerp
    @needlerp
    @rtrue983 Looking into it further, I’m not sure the c code will help - I’ve got conf_acl settings in the same layer as the setting I’m trying to change - so even using rpc commands it won’t let me change the setting as I’ve locked myself out of it! The only thing I can think of is to manually remotely download conf5.json, make the changes then re-upload it to each individual device. Laborious!
    Myles McNamara
    @tripflex
    @rtrue983 nah it’s an esp32 and no it has plenty of space, have two identical devices and one upgraded fine (same fw version, same schedules, etc)
    ahh so you have to explicity set the udp port when running mos
    and actually — the problem device has more free space and free ram than the other one that worked perfectly fine on
    *that i was locally testing to see if i could find an issue with fw or something else
    Myles McNamara
    @tripflex
    heyyy that did work though, thank you @needlerp
    Myles McNamara
    @tripflex
    ahh i’m getting much better debug logging now using UDP whereas the MQTT debug stderr and stdout seem to omit a ton of log lines for some reason
    needlerp
    @needlerp
    Yeah I find it really helpful. Like being locally connected.
    Myles McNamara
    @tripflex
    yeah this is huge for sure thank you — i was dreading having to drive out to location today was going to setup my own udp server to test but you just saved me a ton of time in having to do that :) thank you
    i should have dug more into the cli commands instead of “assuming” it would start the port itself based on the documentation pages
    i should have known better :-\
    heyyyy i got it to boot into new firmware! seems for some reason there was mbed_tls errors saying certificate not signed by authority or something … which is weird because i upgraded the same exact prev firmware on a local device and it worked fine, but didn’t work on this one
    looks like it may have been due to trying to “complete” the download from firebase HTTPS server or something
    Myles McNamara
    @tripflex
    doesn’t make much sense but i did a clean fw build with latest ca-bundle and mbedtls and it seems to have got rid of that error somehow
    only thing i can assume is that since the device is in a different location on a different network, maybe google has some load balancing or something where it’s connecting to a different server than it would here locally on my network … dunno .. but it works and that’s all that matters right now lol
    needlerp
    @needlerp
    Glad you got it working without the drive!
    Ryan Truer
    @rtrue983
    @needlerp
        struct mgos_config *cfg = NULL;
        cfg = (struct mgos_config *) calloc(1, sizeof(*cfg));
        if (cfg != NULL) {
    
            if (mgos_sys_config_load_level(cfg, MGOS_CONFIG_LEVEL_VENDOR_3))
            {
                mgos_config_set_wifi_sta_ssid( cfg, ssid );
    
                if (mgos_sys_config_save_level(cfg, MGOS_CONFIG_LEVEL_VENDOR_3, false, NULL)) {
                    // success
                    ret = true;
                }
                else {
                    LOG( LL_ERROR, ("failed to save config (level 3)") );
                }
            }
            else {
                LOG( LL_ERROR, ("failed to load config (level 3)") );
            }
        }
        else {
            LOG( LL_INFO, ("failed to allocate space for config (level 3)") );
        }
    
        free(cfg);
    where ssid is a string of course
    needlerp
    @needlerp
    OK great thanks.
    Ryan Truer
    @rtrue983
    YW