Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Deomid Ryabkov
    @rojer
    at least no existing way. possible in theory, if you have enough space to move things arounf
    johndevereux
    @johndevereux
    OK thanks - what about when its in front of me (sorry if it is stupid question)
    Deomid Ryabkov
    @rojer
    then you can reflash it over serial
    assuming you saved the encryption key when setting up encryption, you will always be able to reflash the device
    johndevereux
    @johndevereux
    OK great, thank you very much!
    Jan
    @janko.valiska:matrix.org
    [m]
    Hi! Please is there a way how to use "vanilla" mbedtls with mongoose os? I need to use ssl client certificate authentication and also to configure MBEDTLS_SSL_RENEGOTIATION, but when i define it in cdefs section, the firmware will crash on every call to mg_use_cert() function. Every call fail with: heap integrity broken: free links don't match: 788 -> 868, but 868 -> 0.
    Jan
    @janko.valiska:matrix.org
    [m]
    I tought that this memory issue can be somehow related to "mongoose" changes that are made to vanilla mbedtls library... but i'm no 100% sure.
    Deomid Ryabkov
    @rojer
    renegotiation is not supported in order to save ram
    Jan
    @janko.valiska:matrix.org
    [m]
    Hi, thank you for answer. It makes sense to turn off memory hungry features. But then, how can we connect to application service that is hosted for example on azure cloud, where there is application gateway in the front of the service? The first hanshake is made with application gateway, and then final service is making renegotiation request, since it requires client certification. But second handshake is definitelly rejected by device with alert message.
    Deomid Ryabkov
    @rojer
    i think we can make it possible to enable renegotiation, please file an issue against https://github.com/mongoose-os/mbedtls
    please provide setup to test it (host name, etc)
    Krishna
    @Krishna02788879_twitter
    i am facing a issue while flashing mongoose os to ESP8266-01 Wifi Module
    DrBomb
    @DrBomb
    As far as I understand, the ESP-01 module has 1MB of flash and that is too little for mongoose os
    Liviu
    @nliviu
    Firmware for a ESP8266 with 1MB of flash can be built with the flag --build-var BOARD=esp8266-1M (no OTA update).
    Mike
    @MikeKovarik

    Hello, can anyone help me with converting number to string in mjs?
    I'm concatenating a list of key=val properties for dns-sd but one of my properties is a number. Js automatically converts the type but not in MOS so I tried .toString() or equivalent but I couldn't find anything.

    let mdnsTxt = 'name=' + Cfg.get('ghome.name') + ','
                + 'type=' + Cfg.get('ghome.type') + ','
                + 'heartBeatMillis=' + heartBeatMillis.toString() + ','
                + 'traits=' + JSON.stringify(traits);
    Cfg.set({dns_sd: {txt: mdnsTxt}});

    Thanks

    btw, before anyone asks: yes i tried making object out of all the variables and then JSON.stringify all that, would've been much simpler, but it makes the code crash with Exception 29
    Liviu
    @nliviu
    JSON.stringify(heartBeatMillis) should do.
    Mike
    @MikeKovarik
    Wow :D I didn't even think about it since it's illegal in real javascript. Only objects and arrays. Anyway, it worked. Thank you
    Liviu
    @nliviu
    Did you read this?
    David Cruchon
    @Enophi
    Hello everyone. This is my first time here. I have a question about rpc over uart. Every time I send a command, I get an answer but the device restarts. I have in the log "read err EOF". Maybe it's because of this ? Thanks in advance for your help :)
    David Cruchon
    @Enophi
    It seems to be a hardware reset (from esp8266 doc) :/ >> "esp_exc.c:235 Reset cause: 6 (sys reset)"
    gadget-man
    @gadget-man
    What device are you using? I’ve recently had issued with Mac Big Sur where the serial port works fine but as soon as I use MOS to send a command over UART it reboots
    David Cruchon
    @Enophi
    @gadget-man Its a ESP8266. I'm on linux (manjaro). Did you find a solution/workaround ?
    Liviu
    @nliviu
    Did you try to use --set-control-lines=false?
    David Cruchon
    @Enophi
    @nliviu Yes i did. Same results, the device reboot with reset cause = 6. I also test with other usb cable
    DrBomb
    @DrBomb
    If you see "read err EOF" seems like a problem with the actual USB device. That usually shows up when I jank the USB cable out while in use
    Something could be shorting out, or the cable might be bad. Try changing the cable
    David Cruchon
    @Enophi
    @DrBomb Yes. Sometimes i see the "read err EOF". I already test another USB cable but I don't have another one on hand. I'll get some more to test. Thanks a lot for your answers
    maks-davletchin
    @maks-davletchin
    Hello everybody. I try to flash module ESP-WROOM-32, but have a problem. From ESP Download Tool I see that SPI speed of this module is 40 MHz. Mos flashs my chip with 80MHz. Is there any solutions to flash it with frequency 80MHz in mos?
    maks-davletchin
    @maks-davletchin
    excuse me, made a typo: Is there any solutions to flash it with SPI frequency 40MHz in mos?
    Liviu
    @nliviu
    AFAIK, you can set the flash parameters:
          --esp-flash-params string             Flash chip params. Either a comma-separated string of mode,size,freq or a number. Mode must be one of: qio, qout, dio, dout. Valid values for size are: 2m, 4m, 8m, 16m, 32m, 16m-c1, 32m-c1, 32m-c2. If left empty, an attempt will be made to auto-detect. freq is SPI frequency and can be one of 20m, 26m, 40m, 80m
    mos help --full
    to see all the options
    alishabbir53
    @alishabbir53
    Error: /src/cli/dev/dev_conf.go:81: no config value at path "wifi.ap.enable"
    What is that error mean
    I flashed the doorsensor firmware found from mongoose os github
    when I tried to connect the module with internet so i received this error
    maks-davletchin
    @maks-davletchin

    AFAIK, you can set the flash parameters:

          --esp-flash-params string             Flash chip params. Either a comma-separated string of mode,size,freq or a number. Mode must be one of: qio, qout, dio, dout. Valid values for size are: 2m, 4m, 8m, 16m, 32m, 16m-c1, 32m-c1, 32m-c2. If left empty, an attempt will be made to auto-detect. freq is SPI frequency and can be one of 20m, 26m, 40m, 80m

    Thanks so much!!)

    Sekilsgs2
    @Sekilsgs2

    Hi. can i'm using double in this variant -

      // Set handler for the virtual pin reads / writes.
      // 
      // Example:
      // ```javascript
      // Blynk.setHandler(function(conn, cmd, pin, val, id) {
      //   print(cmd, pin, val);
      // }, null);
      // 
      setHandler: ffi('void blynk_set_handler(void (*)(void *, char *, int, double, int, userdata), userdata)'),

    and later in this -

    Blynk.setHandler(function(conn, cmd, pin, val, id) {
    Sekilsgs2
    @Sekilsgs2
    I'm try but getting error -
    [Mar 21 08:49:09.231] MJS error: failed to exec file "api_blynk.js": bad ffi signature: "void blynk_set_handler(void (*)(void *, char *, int, double, int, userdata), userdata)": bad ffi signature: "void (*)(void *, char *, int, double, int, userdata)": the callback signature is valid, but there's no existing callback implementation for it
    from mgos_blynk.h -
    /* Blynk event handler signature. */
    typedef void (*blynk_handler_t)(struct mg_connection *, const char *cmd,
                                    int pin, double val, int id, void *user_data);
    
    /* Set Blynk event handler. */
    void blynk_set_handler(blynk_handler_t func, void *user_data);
    Sekilsgs2
    @Sekilsgs2
    from ffi_exports.c -
    /* Auto-generated, do not edit. */
    
    /*
     * Symbols filtered by the following globs:
     */
    
    #include <stdbool.h>
    
    #include "mgos_dlsym.h"
    
    /* NOTE: signatures are fake */
    void  blynk_send(void *, int, int, void *, int);
    void  blynk_set_handler(void (*)(void *, char *, int, double, int, void *), void *);
    sean
    @tonetechnician

    Hi there! Very happy to have found this chat. I'm hoping someone might be able to provide some guidance, or opinion if what I want to do is even possible.

    I have a mongoose http server setup in a C++ application. Everything is working well, I can receive requests and send back responses all from my single static callback. I can interact with my application context using the user_data argument.

    Now, in my application's mongoose event handler, I'm triggering a C++ event which activates a whole event flow within my application. I'd like to have it that I can keep the mongoose connection open, append data to the connection's buffer and only once the event flow is completed, send the response and manually close the connection. Currently mongoose closes the connection immediately after the connections event handler has been executed so I'm unable to do this.

    Is it possible to prevent mongoose from closing the connection at the end of the event handler and rather manually closing it myself?

    I saw some old docs (http://ces.ap-folio.com/developers.html#_http_websocket) which had some user settable flags such as "MG_F_BUFFER_BUT_DONT_SEND " and "MG_F_FINISHED_SENDING_DATA " which seem like ones I should use. But I'm unable to find a similar flag in a more recent version of mongoose.

    Any help or guidance would be very much appreciated! Thank you!

    DrBomb
    @DrBomb
    Welcome! This is the chat for mongoose-os the IoT framework for developing applications. But it is mostly based off mongoose proper so I guess it is fine for you to post here as it might be more active
    From my experience using sockets on mongoose, the connection shouldn't be closing by itself unless you set the close connection flag
    Sergey Lyubka
    @cpq
    @tonetechnician see https://github.com/cesanta/mongoose/tree/master/examples/multi-threaded . It is an example on how you can response only when certain event happens
    sean
    @tonetechnician

    Thanks @DrBomb !

    @tonetechnician see https://github.com/cesanta/mongoose/tree/master/examples/multi-threaded . It is an example on how you can response only when certain event happens

    Amazing! This looks like it will suit my application very well.

    I attempted a workaround it by pausing polling and passing a reference to the connection along with my event flow, then appending data and start polling again. It seems to be working, but not sure how robust a solution it is. This multi threaded example is very clear

    Thanks so much @cpq !!!!
    Jan
    @janko.valiska:matrix.org
    [m]
    Hi, is it posible to receive in GET_ACCEPTED shadow event only desired shadow states? Currently i'm receiving desired but also reported states. I'm using Azure IoT Hub.
    gadget-man
    @gadget-man
    Not sure about Azure but in AWS you get the whole shadow - Desired & Reported. Can’t you just filter it on arrival and only do somethign if it’s desired?
    Jan
    @janko.valiska:matrix.org
    [m]
    Problem is that whole message has bigger size then input receive mqtt buffer. And in that case MQTT connection is dropped.