Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Marcus Hoffmann
    @hoffmann-m
    Regardless of this, wakup & idle commands are working but sleep returns ATCA_TX_FAIL error.
    Deomid Ryabkov
    @rojer
    it could be because device goes to sleep without responding and might be normal
    Deomid Ryabkov
    @rojer
    double-check the datasheet for this case
    Marcus Hoffmann
    @hoffmann-m

    @rojer you're right. Sleep works if send directly after wakeup command. We need the atca only for gcp connet with jwt. My next step is to disable atca for mbedtls:

    build_vars:
      MGOS_MBEDTLS_ENABLE_ATCA: 0
    
    libs:
       - origin: https://github.com/mongoose-os-libs/mbedtls
        variant: noatca

    However, when I check the logs, I see that the ATCA is still being used:

    ATCA ECDSA verify ok, verified<\n>
    ATCA:16 ECDH gen pubkey ok<\n>
    ATCA:16 ECDH ok<\n>
    ATCA:2 ECDSA sign ok<\n>
    Deomid Ryabkov
    @rojer
    hm, GCP uses mbedtls to do ATCA stuff
    i don't think it'll work
    GCP knows nothing of ATCA, and relies on mbedtls to do the right thing when key is ATCA:x
    you can disable its use for ECDH, however
    i think setting sys.atca.ecdh_slots_mask=0 should do that
    we'll still use it for verification though, i believe
    Marcus Hoffmann
    @hoffmann-m
    @rojer okay, thanks again for the support. I will have a look at it.
    puchongv
    @puchongv
    hello some one here ?
    Deomid Ryabkov
    @rojer
    yes
    Jorge Mesquita
    @jorge4_gitlab
    Hi, I have a question I dont know if it is in the documentation, havent found it.
    When a custom config string is set to an empty string, and you get it from C/C++, it returns NULL.
    is that normal?
    Thanks.
    DrBomb
    @DrBomb
    Yep, that is normal
    Jorge Mesquita
    @jorge4_gitlab
    Ok then. Thanks.
    Sergio R. Caprile
    @scaprile

    @daadu_gitlab any anyone else who's interested, please try this branch - https://github.com/mongoose-os-libs/mqtt/tree/websocket

    Seems to be working with mqtt.eclipseprojects.io, but since it uses mosquitto that is no news.
    It doesn't work for me on HiveMQ using - ["mqtt.ws_path", "/"], there is no spec on the correct path to use and since it is TLS I can't see what goes on in port 8884. The log just shows MQTT0 TCP connect ok (0)

    Deomid Ryabkov
    @rojer
    ok, thanks, will test and make sure it works with hivemq
    Harsh Bhikadia
    @daadu_gitlab

    @rojer Thanks for the quick implementation.

    Will try with EMQX and let you know by end of this week

    Deomid Ryabkov
    @rojer

    @daadu_gitlab any anyone else who's interested, please try this branch - https://github.com/mongoose-os-libs/mqtt/tree/websocket

    Seems to be working with mqtt.eclipseprojects.io, but since it uses mosquitto that is no news.
    It doesn't work for me on HiveMQ using - ["mqtt.ws_path", "/"], there is no spec on the correct path to use and since it is TLS I can't see what goes on in port 8884. The log just shows MQTT0 TCP connect ok (0)

    just tested - you have to set ws_path to /mqtt for hive

    then it works
    with the wrong path it just goes silent and doesn't respond at all
    DrBomb
    @DrBomb
    Just looked for some mongoose stuff to do POST calls, seems like the mongoose version on mOS and the version available in cesanta/mongoose are somewhat different. Where can I find the source for the mOS mongoose lib?
    And I guess, should I expect the new mongoose to be integrated into mOS anytime soon?
    Deomid Ryabkov
    @rojer
    as far as migrating to v7 - i'm not so sure, the API changes are massive. they may make sense for the library but not mos.
    so mos will stay on 6.x for the foreseeable future
    DrBomb
    @DrBomb
    Alright, good to know, thank you
    Deomid Ryabkov
    @rojer
    @scaprile @daadu_gitlab fyi i updated the websocket branch - i added ws_enable bool config option, now you need to set ws_enable=true, and ws_path now defaults to /. need to be set to /mqtt for hive, mosquitto doesn't seem to care.
    Deomid Ryabkov
    @rojer
    actually, updated default to /mqtt, this way no change is needed for hive and mosquitto doesn't care anyway
    Sergio R. Caprile
    @scaprile
    Works like a charm! BTW, Eclipse states that the path to use is /mqtt, so using it as default looks great.
    Deomid Ryabkov
    @rojer
    ok, thanks, pushed to master.
    d4rkmen
    @d4rkmen
    @rojer i agree. the world is not ready for v7 😂
    amizer12
    @amizer12
    Hi All, Im tying to run a below example to get the MAC adress of the ESP32, i have wifi disabled but i need a MAC to have a unique device ID - code im using is taken from https://mongoose-os.com/docs/mongoose-os/howtos/get-device-info.md
    this at boot first doesn`tr return anything bu then after coulpe seconds it returns null
    any way i can get a MAC adress as an application variable instead ? Like adding this to a yaml file - "app.mac", s, "ESP-?????????" {title:"Device SN} ?
    amizer12
    @amizer12
    Nevermin - figurede it out with ???? in yaml :)
    Sergio R. Caprile
    @scaprile
    Is this safe ? I'm getting stack canary watchpoint resets so I don't think so... How can I re-trigger myself in order to perform a sort of "main loop" ? (instead of using a 10ms repeatable timer)
    #define MY_EVENT_PINGPONG_BASE MGOS_EVENT_BASE('S', 'X', '1')
    enum my_event {
      MY_EVENT_PINGPONG = MY_EVENT_PINGPONG_BASE,
    };
    
    static void rundemo(int ev, void *ev_data, void *userdata) {
      do some stuff
      mgos_event_trigger(MY_EVENT_PINGPONG, NULL);           // <-------------------------
      (void) ev;
      (void) ev_data;
      (void) userdata;
    }
    
    enum mgos_app_init_result mgos_app_init(void) {
      if(!mgos_event_register_base(MY_EVENT_PINGPONG_BASE, "Ping-pong demo")) return false;
      if(!mgos_event_add_handler(MY_EVENT_PINGPONG, rundemo, NULL))  return false;
      mgos_event_trigger(MY_EVENT_PINGPONG, NULL);
      return MGOS_APP_INIT_SUCCESS;
    }
    Deomid Ryabkov
    @rojer
    stack canary watchpoint is not about looping, it's about stack size. you are using too many or too big variables in some of the functions
    Sergio R. Caprile
    @scaprile
    I'm not actually calling anything, I've already removed the "do some stuff" part (which I was calling from a 10ms timer and it was working fine) and it still crashes. I get this, where I see the stack is full of the same addresses, but can't go further:
    [Sep  6 15:26:17.651] Guru Meditation Error: Core  1 panic'ed (Double exception). 
    [Sep  6 15:26:17.651] 
    [Sep  6 15:26:17.651] Core  1 register dump:
    [Sep  6 15:26:17.651] PC      : 0x40087757  PS      : 0x00040436  A0      : 0x800d2630  A1      : 0x3ffb2f10  
    [Sep  6 15:26:17.651] A2      : 0x53583100  A3      : 0x00000000  A4      : 0x3ffb2cb8  A5      : 0x3ffb7770  
    [Sep  6 15:26:17.673] A6      : 0x000000ff  A7      : 0x00000000  A8      : 0x40080080  A9      : 0x3ffb2ff0  
    [Sep  6 15:26:17.673] A10     : 0x00060636  A11     : 0x00040026  A12     : 0x00000000  A13     : 0x000223f0  
    [Sep  6 15:26:17.673] A14     : 0xfffffffe  A15     : 0x3ffb7e88  SAR     : 0x00000001  EXCCAUSE: 0x00000002  
    [Sep  6 15:26:17.695] EXCVADDR: 0xffffffe0  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  
    [Sep  6 15:26:17.695] 
    [Sep  6 15:26:17.695] Backtrace:0x40087754 0x400d262d 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x40087754 0x4008007d 0x400d579c 0x40087754 0x40087754 |<-CONTINUES
    [Sep  6 15:26:17.783] 
    [Sep  6 15:26:17.783] 
    [Sep  6 15:26:17.783] ELF file SHA256: 8864733d4cde5a3f
    [Sep  6 15:26:17.805] 
    [Sep  6 15:26:17.805] 
    [Sep  6 15:26:17.805] --- BEGIN CORE DUMP ---
    [Sep  6 15:26:17.805] mos: catching core dump
    [Sep  6 15:26:17.828] mos: core dump aborted
    ESP32 running 'stable'
    Sergio R. Caprile
    @scaprile
    Minimum project (just pasted text) reproducing this behavior here, tested 2.18.0 and 2.19.1 stable.
    Can't catch a core dump.
    Should I open an issue at Github ?
    Deomid Ryabkov
    @rojer
    yes please. include full app code if possible.
    Sergio R. Caprile
    @scaprile
    puchongv
    @puchongv
    hi
    is any one here :)
    Did you guys know how to get network status like MGOS_HAVE_WIFI in demo-c example from lib captive-portal-wifi-stack
    Sergio R. Caprile
    @scaprile
    IIRC, MGOS_HAVE_WIFI is not network status, it is generated by the compile system when you include the wifi library; it indicates you actually have the wifi functions available.
    Read the WiFi docs
    puchongv
    @puchongv
    ok I got it
    DrBomb
    @DrBomb
    @scaprile Checking the code on your issue, I think triggering the same event inside the event handler seems like a recipe for disaster. I would assume the function stack would get very big until it gets smashed, hence the canary. I could be wrong though