Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jan
    @janko.valiska:matrix.org
    [m]
    If I set oneshot timer, for example mgos_set_timer(1000, 0, &timer_cb, NULL) should i store timer_id and call mgos_clear_timer(id) to release internally allocated memory of this timer?
    Jan
    @janko.valiska:matrix.org
    [m]
    What is meaning of bool return value of mgos_mqtt_global_connect?
    Sergio R. Caprile
    @scaprile
    I've found that if you hold a timer handler and later you cancel the timer as you suggest, you have to also invalidate your handler (timer_id = MGOS_INVALID_TIMER_ID). If you setup and cancel several timers you may get repeated ids because they are reused (iirc).
    If you don't need to cancel the timer, it will clear itself when it fires (unless it repeats, of course...)
    Clearing an already cleared (automatically or cancelled) timer is safe, but since ids are reused and you started another timer in between... you end up cancelling the new timer and not the old one (iirc, again)
    Jim Archer
    @jimarcher

    Hi Everyone, I have been fighting an issue with Little FS and the Winbond W25Nxxx device driver / VFS driver for some time now. Using an ESP32-WROOM-32U with a W25N 2 Gbit device (I have not tried the 2 Gbit) I am able to start Mongoose and create the file system. But if I open a file using fopen() and start appending data, after just a few hundred bytes LFS reports the device is fill. Also, if I create a number of small files, after about 18 or so, it reports that the superblock is full.

    Does this ring any bells?

    55 replies
    Oops.. I'm using the 1 Gbit device, have not tried the 2 Gbit
    Deomid Ryabkov
    @rojer
    hm, that definitely shouldn't happen.
    Anshu694
    @Anshu694
    can someon help me out with cron task in mongoose ?
    Any examples??
    Liviu
    @nliviu
    @Anshu694 Assuming you have added the cron library in your mos.yml
    #include "mgos.h"
    #include "mgos_cron.h"
    
    static void cron_1min_cb(void *user_data, mgos_cron_id_t id) {
      time_t now = time(0);
      struct tm *tm = localtime(&now);
      char t[32];
      strftime(t, sizeof(t), "%T", tm);
      LOG(LL_INFO,
          ("Uptime: %.2lf, time: %s, free_heap_size: %lu, min_free_heap_size: %lu",
           mgos_uptime(), t, (unsigned long) mgos_get_free_heap_size(),
           (unsigned long) mgos_get_min_free_heap_size()));
      (void) user_data;
      (void) id;
    }
    
    enum mgos_app_init_result mgos_app_init(void) {
      /*
       * Add a cron job at every 5 seconds of a minute.
       */
      mgos_cron_add("5 */1 * * * *", cron_1min_cb, NULL);
    
      return MGOS_APP_INIT_SUCCESS;
    }
    Anshu694
    @Anshu694
    Thanks @nliviu
    Jan Knieling
    @janknieling
    Supports Mongoose OS secure boot on ESP32?
    gadget-man
    @gadget-man
    Moa doesn’t yet support secure boot. I think it’s on @rojer list but no timescales unfortunately.
    David Cruchon
    @Enophi
    Hello! I'm trying to configure a ATEC608A (a barebone and the Qiic by Sparkfun) and get this error back : "No handler for ATCA.GetConfig". I dont find any good results on google. Any ideas ?
    And the error occurs when i try to pass the atca-set-config command : mos atca-set-config proto-config.yaml --dry-run=true
    DrBomb
    @DrBomb
    Means that the firmware you're using does not contain the RPC command it is trying to call
    You will have to add the lib to your app
    The latter is most likely the one that registers the methods you're missing
    David Cruchon
    @Enophi
    @DrBomb Thx a lot :) I was totally missing the libs :/
    DrBomb
    @DrBomb
    :+1:
    Ivan Polchenko
    @i5okie
    Hi, dumb question... how do I interpolate a string into a variable? do something with that variable and then make sure that variable does not take up any buffer / ram space?? "key: value, key:value2, key:value3" ?
    DrBomb
    @DrBomb
    There are many ways. but it depends on the format you're using. If it is json you could use cesanta's json parser, frozen, but it really depends on what you have to work with
    and regarding the question of memory, that's something for you to figure out
    Ivan Polchenko
    @i5okie
    I can't figure out how to use frozen.
    Ivan Polchenko
    @i5okie
    or rather, I got it working. But my esp32 keeps doing core dumps after a few seconds.
    maqilin6753123
    @maqilin6753123
    Hi ,boss, when I finished installed the Mongoose OS IDE in visual studio ,there is an error indication "command 'mos.showPanel' not found"? What should I do?
    image.png
    DrBomb
    @DrBomb
    As far as I know @maqilin6753123 The Visual Studio extension is outdated and doesn't work
    Jan
    @janko.valiska:matrix.org
    [m]
    Hello, is there in mongoose os option to set AP advertising beacon timeout? Like send beacon every 500ms or every 1s.
    d4rkmen
    @d4rkmen

    As far as I know @maqilin6753123 The Visual Studio extension is outdated and doesn't work

    It works fine :) All you need to do is to add mos.exe to PATH variable

    David Cruchon
    @Enophi
    Hello everyone. I'm stuck with an ATECC608A. I set the sample config file and lock the config/data zone. I re-provisionned the chip with the command : mos aws-iot-setup --use-atca .... The process succeed but when i check the log, there is a invalid SSL key error. When I check the config device for the mqtt section, there is "ssl_key": "ATCA:0" as it suppose to be. Do you have any ideas ? Maybe it's because of the re-provision. Thank you in advance for your help.
    15 replies
    DrBomb
    @DrBomb
    Sorry @d4rkmen I stand corrected :)
    d4rkmen
    @d4rkmen
    :hand:
    maqilin6753123
    @maqilin6753123
    Hello ,can any boss send me a demo code about PPPOS using ?
    I want to communicate with quectel MC60 module .
    maqilin6753123
    @maqilin6753123
    image.png
    Sometimes ,I call the Temp read which was denied. What's up?
    maqilin6753123
    @maqilin6753123
    Where could I find this definition mgos_config_pppos?
    maqilin6753123
    @maqilin6753123
    image.png
    Where should I insert this ?
    Sergio R. Caprile
    @scaprile
    Did you try "converting" that to YAML and putting it in mos.yml ?
    Sergio R. Caprile
    @scaprile
    maqilin6753123
    @maqilin6753123
    Thanks ,that's helpful.
    maqilin6753123
    @maqilin6753123
    image.png
    Hi, boss,What should I do with these.
    maqilin6753123
    @maqilin6753123
    image.png
    There is dead circle...why...
    Sergio R. Caprile
    @scaprile
    Your +COPS=0 command is failing, either the module does not support that syntax or whatever, including hardware issues. I commented on a similar thread on the forum, and there are perhaps others, search for them.
    Sergio R. Caprile
    @scaprile
    Syntax seems to be correct, and the other messages inform the module is auto selecting the operator; it could be hw issues or just the module sending unexpected result codes.
    The PPP handshake may or may not be initiating, you are not connecting within the expected time frame and so there is a retry. Check the forum for debugging tips.