Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    abhibhatia98
    @abhibhatia98
    How can I set UDP listen address from program ??Till now I am doing it like below :
    mos config-set rpc.udp.listen_addr=udp://0.0.0.0:1234
    second Do I can enable or disable UDP listening like mqtt enable or disable ??
    gadget-man
    @gadget-man
    @abhibhatia98 just set it to the IP address and port, e.g. 0.0.0.0:1993. Set the IP to that of the device you want to monitor from. Then on the target device, call mos console --port udp://:1993/
    abhibhatia98
    @abhibhatia98
    @gadget-man Thanks for your response. My question is how can I set udp listen addr from program ?
    DrBomb
    @DrBomb
    abhibhatia98
    @abhibhatia98

    @DrBomb

    mgos_sys_config_set_rpc_udp_listen_addr("udp://0.0.0.0:1234"); 
    char *err = NULL;
    save_cfg(&mgos_sys_config, &err); 
    printf("Saving configuration: %s\n", err ? err : "no error");
    free(err);

    I have done this way and in logs it prints saved to conf9.json and no error
    But when I ran this mos call --port udp://192.168.43.107:1234/ Sys.GetInfo command it doesn't work.
    After I set it using mos config-set , and call the rpc over udp that works. Am I missing something here ??

    gadget-man
    @gadget-man
    @abhibhatia98 rpc.udp.listen_addr is for listening to the debug output of a mos device FROM a remote machine without serial connection. It sounds like what you are doing is send RPC command TO a mos device? In which case you need the RPC libs
    @cpq it looks as though the server certificate has expired at mongoose-os.com??
    zkauker
    @zkauker
    Hi Guys, is there a way to disable the CA cert verifications in mongoose OS? Sorry if it's documented somewhere, I cannot find it
    abhibhatia98
    @abhibhatia98

    @abhibhatia98 rpc.udp.listen_addr is for listening to the debug output of a mos device FROM a remote machine without serial connection. It sounds like what you are doing is send RPC command TO a mos device? In which case you need the RPC libs

    @gadget-man, Actually I didn't get your Comment, so explaining issue I am facing again:-
    So I am trying to setup rpc.udp.listen_addr To do so 2 approaches are here

    1. By mos config-set rpc.udp.listen_addr=udp://0.0.0.0:1234
      After this I call mos call --port udp://IP:1234/ Sys.GetInfo get the response back with device packet.
    2. By Program save_cfg method(Code used shared in previous comment)
      After this I call mos call --port udp://IP:1234/ Sys.GetInfo,it get fails with Error: context deadline exceeded. After that I reboot the device try same it gives response. So is it like that save_cfg method requires reboot or something else I am missing ?
    gadget-man
    @gadget-man
    Sorry, my bad. I totally misread your email and thought you were referring to debug.udp_log_addr!!
    After saving the config, what happens if you call mos config-get rpc.udp.listen_addr?
    abhibhatia98
    @abhibhatia98
    It return udp://0.0.0.0:1234, but rpc over udp is not worked
    DrBomb
    @DrBomb
    @abhibhatia98 The device will need to be rebooted after the setting is changed. The address is bound to the URI at boot time, so changing the config value will not take effect until you restart the device
    Oh, but I see you did reboot it, my bad
    Then, I would suggest checking the value back with mos config-get
    abhibhatia98
    @abhibhatia98
    Thanks @DrBomb , it works after restart.
    Jan
    @janko.valiska:matrix.org
    [m]
    Hi, is there some documentation how to implement OTA over BT SPP? Or particulary how to use ota-common mongoose module to flash data to next partition and set next partition as boot partition. Thanks.
    DrBomb
    @DrBomb
    Hi @janko.valiska:matrix.org I don't know if you're aware. But while most mongoose-os is open source. The OTA sections of it is cesanta's paid product. Their OTA package is only distributed as binaries with restrictions on where the updates can be applied from unless you have the paid versions
    So using the ota-common libraries I think might be a moot point for you
    That said. I believe the method OTA.Write is not locked on the binaries, and you could potentially use it to write into the second partition with the loopback RPC
    Deomid Ryabkov
    @rojer
    yes, OTA.* methods are provided by rpc-service-ota and are not limited
    you can use them over BLE GATTS through rpc-gatts library
    the approach is simple - OTA.Begin, OTA.Write the zip data (in chunks, of course), OTA.End
    Jan
    @janko.valiska:matrix.org
    [m]
    Thanks for reply and useful information. I'm curious... is it possible to invoke RPC call directly from code? I want use BT SPP protocol to transfer FW image/zip. So i need somehow execute rpc-service-otas serice calls (OTA.Begin/Write/End) when the data is received from SPP serial interface.
    Aaa, probably I should use: rpc-loopback. Am I right?
    abhibhatia98
    @abhibhatia98

    @DrBomb

    @abhibhatia98 The device will need to be rebooted after the setting is changed. The address is bound to the URI at boot time, so changing the config value will not take effect until you restart the device

    I have doing something to overcome manual reboot

    -  ["restart.pending", "b", true, {"title": "First time restart done or not"}]
    if(mgos_sys_config_get_restart_pending())
    {    
        mgos_sys_config_set_restart_pending(false);
        mgos_system_restart();    
    }

    this cause device continuously rebooting. Do you have ideawhats the issue. I have checked condition works fine when I comment restart method

    DrBomb
    @DrBomb
    you're not saving the config
    abhibhatia98
    @abhibhatia98
    Oops ,thanks for response
    Jan
    @janko.valiska:matrix.org
    [m]
    @rojer: Hi, I'm trying to use rpc-service-ota to perform OTA over BT. After couple of chunks I receive Request queue overflow from mg_rpc_callf handler. I'm sending chunks of size 256bytes every 2 seconds. What can be the problem?
    Jan
    @janko.valiska:matrix.org
    [m]
    Problem solved... we called RPC methods from ISR. Somehow it didn't work... :)
    cnhyades
    @cnhyades

    @rojer , We facing a crash issue after running for many hours. Hardware is ESP32 and OS version 2.19

    Test Setup:

    1. Receiving Bluetooth Notifications every 5seconds and posting them to an HTTP end point via "mgos_invoke_cb"
    2. RPC Methods(over http) are invoked from 3/4 different clients every 5seconds.

    Coredump pastebin link: https://pastebin.com/SViMe0RM

    Do you think it is related to dynamic memory (de)allocation?
    Harsh Bhikadia
    @daadu_gitlab

    Some of our field ESP32 were not working(radnomly disconnecting and not connecting back - even after reboot) with Deco WIfi-Mesh system, turns out that Deco uses "Fast Roaming" feature (IEEE 802.11k and v)

    ESP-IDF have already implemented it and released in v4.3 (commit - espressif/esp-idf@27101f9 and example - https://github.com/espressif/esp-idf/tree/master/examples/wifi/roaming)

    These is behind a flag (CONFIG_WPA_11KV_SUPPORT, CONFIG_WPA_SCAN_CACHE)- which is off by default. Looks like experimental as of now.

    I want this "fast roaming" support in Mongoose.
    Is it trivial to upgrade to ESP-IDFv4.3? as of now mongoose (master) is pointing to v4.2 ?
    @rojer @cpq Any plan for having this in mongoose as well? or will wait for proper (i am assuming it is not because it is behind a flag in menuconfig) implementation?
    abhibhatia98
    @abhibhatia98
    Hi All, I am just trying to research around mongoose-os usability in production like how much percentage devices are running on mongoose os . something related to statistics. I found many of report but doesn't found any thing about mongoose os. Do any one can share thoughts or relevant info/resource like where does it stand in below graph?
    image.png
    Deomid Ryabkov
    @rojer
    @daadu_gitlab i do plan to update the IDF
    unfortunately, it is not trivial to upgrade yourself, as there are a number of patches on top of the upstream that need to be rebased
    @abhibhatia98 i don't think we'd make that graph, our usage is certainly below 1%
    Harsh Bhikadia
    @daadu_gitlab
    @rojer any expected date/month for the upgrade?
    David Cruchon
    @Enophi
    Hi! Do you know if it is possible to customize the provisioning command mos aws-iot-setup? Have a nice day
    Deomid Ryabkov
    @rojer

    @rojer any expected date/month for the upgrade?

    "soon". no ETA, though

    Hi! Do you know if it is possible to customize the provisioning command mos aws-iot-setup? Have a nice day

    https://github.com/mongoose-os/mos/blob/master/cli/aws/aws.go

    gadget-man
    @gadget-man

    Hi! Do you know if it is possible to customize the provisioning command mos aws-iot-setup? Have a nice day

    https://github.com/mongoose-os/mos/blob/master/cli/aws/aws.go

    This reminded me that whenever I provision using aws-iot-setup it returns a AttachPrincipalPolicy is deprecated error. I’ve forked an update and am ready to post a proposed PR to migrate to AttachPolicy, but not sure how to test it locally first?

    1 reply
    Deomid Ryabkov
    @rojer
    run make on a machine that has Go toolchain, you'll get a mos binary
    then use ./mos to test