Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    cnhyades
    @cnhyades
    @rojer I'm seeing crash with http connections mongoose-os core. This happens quite randomly between few mins to 24hours. I'm not using dynamic memory allocation for posting data. The stack trace doesn't show the application files. Finding it hard to find the root cause. Any inputs? Pastebin link below
    Arruelah
    @Arruelah
    Anyone else having problems with the MQTT library on 8266?
    Tom Sciano
    @TSciano_twitter
    here are there any esp-now android / Ios devs here
    trying to make a smart cornhole system
    if anyone is interested
    Open source esp32, there's sooo many ways to do this project and looking for some good app guys/ else I am going to run it off a main source esp32 running a webserver for updating 10+ boards with 4 buttons on each board for +- Team#
    abhibhatia98
    @abhibhatia98
    Hi I am writing an custom own RPC which uses a predefined RPC Sys.GetInfo
    I have written in this way :
    RPC.addHandler('Token_verify', function(args) { RPC.call(RPC.LOCAL, 'Sys.GetInfo', null, function(resp, ud) { deviceInfo = JSON.stringify(resp); }, null); if (typeof(args) === 'object' && typeof(args.token) === 'number') { MQTT.pub('my/topic',deviceInfo ); return deviceInfo; } else { return "Fail" } });
    But the issue in this is when I call this RPC for the first time device info is null and gives correct values when I call it second time after ~3 seconds.
    So this may be due to the rpc running in different threads. So one solution is to place a while loop for checking while(deviceInfo = null)
    But this is not grate idea. Do any one share whats can I done here to get rid from this .
    PS: I am new to JS.
    gadget-man
    @gadget-man
    Can anyone think of any reason why, after several weeks in the field, an ESP32 Wrover with external antenna would fail to be able to find any wifi networks. We’ve got it back from the customer and MOS is booting fine and responding to all normal comands, but any attempt to connect to WiFi in STA mode returns 201 AP not found, and wifi.scan also returns remote error -2: wifi scan failed. Putting the device in AP mode, it broadcasts the correct SSID but any attempt to join the network fails and there is no connection attempty shown in the logs at debug.level=3
    Sergio R. Caprile
    @scaprile
    Looks like a broken receiver. An external antenna may be more susceptible to "atmospherical attacks", particularly if charges can use it as a lower impedance way to reach ground potential (grid powered). (Just one possible reason)
    Deomid Ryabkov
    @rojer
    @gadget-man i am confused because it seem to crash in the same place and yet i don't see output by the code i added...
    what version of the idf does the firmware print at boot? (it's printed early in the init process)

    Can anyone think of any reason why, after several weeks in the field, an ESP32 Wrover with external antenna would fail to be able to find any wifi networks. We’ve got it back from the customer and MOS is booting fine and responding to all normal comands, but any attempt to connect to WiFi in STA mode returns 201 AP not found, and wifi.scan also returns remote error -2: wifi scan failed. Putting the device in AP mode, it broadcasts the correct SSID but any attempt to join the network fails and there is no connection attempty shown in the logs at debug.level=3

    can you post level 3 logs of the boot? or share privately with me

    Mark
    @markterrill

    @nliviu / @gadget-man are you using mac to do browsing? No matter what I do in terms of network adjacency or the cli dns-sd commands, it never lists the http service from the esp32.
    Relevant config:

    "dns_sd": {
        "adv_only": false,
        "enable": true,
        "host_name": "smartfire",
        "txt": ""
      },

    If you could share your config or what you're using code wise to initialise that would be very helpful. I couldn't even get the documented gizmo_txt to work without compilation errors!

    Mark
    @markterrill
    I'm interested whether you see 'SRV' records being advertised. That seems to be the service glue advertising the http service, and it's not being advertised for me. pastebin: https://pastebin.com/GBGqfUVV
    relevant lines:
    [Jun 29 12:31:42.417] mgos_mdns.c:143         Listening on udp://:5353... 0x3ffe17f0
    [Jun 29 12:31:42.433] mgos_mdns.c:115         Joining 224.0.0.251
    [Jun 29 12:31:42.433] mgos_mdns.c:285         0.0 sent advertisement 8401a8c0
    [Jun 29 12:31:43.681] mgos_dns_sd.c:141           0: smartfire.local A 120 192.168.1.132
    [Jun 29 12:31:43.681] mgos_dns_sd.c:128           1: smartfire.local NSEC 120
    [Jun 29 12:31:43.696] mgos_dns_sd.c:386       0.0 sending adv as M, size 78, goodbye 0
    [Jun 29 12:31:43.696] mgos_mdns.c:285         0.0 sent advertisement 8401a8c0
    no SRV record

    SRV record is logged via https://github.com/mongoose-os-libs/dns-sd/blob/bc5b859309a4f8cc1098c04bff8ff9c8a170847d/src/mongoose/mgos_dns_sd.c#L111

    i'm taking a wild uneducated guess that because the http server isn't going yet, dns_sd isn't advertising it

    though that doesn't quite stack up as HTTP server init is logged well before.
    [Jun 29 12:41:00.439] mgos_deps_init.c:317    Init http-server 1.0 (5b4c77fb71e151625470b09fe52a1b0dbddadc77)...
    [Jun 29 12:41:00.455] mgos_http_server.c:377  HTTP server started on [80]
    gadget-man
    @gadget-man

    what version of the idf does the firmware print at boot? (it's printed early in the init process)

    Not sure I did it properly as it’s showing as [Jun 29 07:13:22.297] esp32_main.c:65 ESP-IDF 4.2-r1. Will try again….

    gadget-man
    @gadget-man
    @rojer it doesn’t look as though it’s working. I’m doing a clean build (local), then going into my deps folder and changing modules/mongoose-os/platforms/esp32/sdk.version to docker.io/mgos/esp32-build:4.2-r1-dbg1 then building again. It builds Ok, but when I OTA the update, it still shows esp32_main.c:65 ESP-IDF 4.2-r1 in the boot. I’ll DM you the build.log to see if you can see what’s going wrong.
    Mizer
    @amizer12
    Hi All, I`m using GPIO4 in output mode to drive a simple relay on and off, relay is a NO type of relay but for some reason it always starts as closed right after app boots. When i add GPIO.write(4,0) to force it to open right after application starts it completely ignores it. And when i do GPIO.Read(4) it always shows 0. Is there anything specific i need to do in order to setup this pin properly ( set pull etc ) ?
    This is what im using to setup a relay to be off at start ->GPIO.write(4,0);
    GPIO.set_mode(4, GPIO.MODE_OUTPUT);`
    Mizer
    @amizer12
    If i want it to start as off - should i set the pull to DOWN ?
    DrBomb
    @DrBomb
    Are you able to see the GPIO changing state?
    gadget-man
    @gadget-man

    I've had mos running on a Raspberry Pi for a couple of years using the above, but I've just tried to install on a new build and I'm getting errors as below:

    go version go1.13.4 linux/arm
    GOOS= GOARCH= CC= CXX= \
    /usr/local/go/bin/go build -mod=vendor -tags '' -ldflags '-s -w ''' -o mos github.com/mongoose-os/mos/cli
    # pkg-config --cflags -- libftdi1
    Package libftdi1 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libftdi1.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libftdi1' found
    pkg-config: exit status 1
    Makefile:93: recipe for target 'build-mos' failed
    make: *** [build-mos] Error 2

    Anyone got any suggestions what might be causing this?

    I already have libftdi1 installed via sudo apt-get install libftdi1
    libftdi1 is already the newest version (0.20-4).
    libftdi1 set to manually installed.
    Sergio R. Caprile
    @scaprile
    I'm not a debian user, in my distro there are binary packages and developer packages, the headers are in the developer package. Those developer packages usually update the pkg-config database.
    When manually installing compiled code ldconfigdoes the trick of providing the needed info. I read you manually installed it, try running ldconfig as root.
    Another possibility is to search for the .pc file as suggested and if it is outside of the expected path, you can add its path to PKG_CONFIG_PATH.
    Sergio R. Caprile
    @scaprile
    In RHEL I would install a -devel package, did you try apt-get install libftdi1-dev ?
    DrBomb
    @DrBomb
    Do we have a reference of what we can do on a conds section inside a mos.yml?
    Mark
    @markterrill
    @gadget-man follow the breadcrumbs in the error report. check the value of PKG_CONFIG_PATH, then see where lifftdi1 is actually installed and if it's in the paths of the PKG_CONFIG_PATH
    ie, env | grep PKG_CONFIG_PATH to see what the paths are
    then which lifftdi1 to see where that is installed. compare and contrast the base directory of lifftdi1 to the PKG_CONFIG_PATH
    if it's not in there, add it to the environment variable. export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:[insert path to lifftdi1]"
    can make it permanent by adding it to your bashrc etc
    can you do me a favour and flick me your working dns-sd configuration / code and confirmation whether you see any log messages on bootup matching 'dns' and 'SRV' ?
    Mark
    @markterrill
    interestingly enough, i loaded up a device with an older firmware and it registers with dns-sd ! "mg_id": "20210113-015249/2.19.0-2-g576bfcd2-master-dirty",
    geezus. ok please ignore me. dns-sd is seeing (and updating) with old and new firmwares. last night i rebooted the mac as for some reason it wasn't acquiring a dhcp IP on two of our network SSIDs. I think something network related was borked on the mac.
    literally wasted about 8 hours over 2 days trying to diagnose it.
    Liviu
    @nliviu
    @gadget-man You need to install libftdi1-dev
    sudo apt install libftdi1-dev
    gadget-man
    @gadget-man
    Thanks all I’ll try that. @markterrill do you still want the dns-sd code? Sounds as though you’ve got it sorted...
    gadget-man
    @gadget-man
    OK now I’m getting a different error (having installed libftdi1-dev):
    go version go1.15.7 linux/arm
    GOOS= GOARCH= CC= CXX= \
      /usr/local/go/bin/go build -mod=vendor -tags '' -ldflags '-s -w ''' -o mos github.com/mongoose-os/mos/cli
    # runtime
    /usr/local/go/src/runtime/mgclarge.go:142:26: mheap_.treapalloc undefined (type mheap has no field or method treapalloc)
    /usr/local/go/src/runtime/mgclarge.go:193:8: mheap_.treapalloc undefined (type mheap has no field or method treapalloc)
    /usr/local/go/src/runtime/mgclarge.go:249:9: undefined: scavengeTreapNode
    /usr/local/go/src/runtime/signal_unix.go:525:5: crashing redeclared in this block
        previous declaration at /usr/local/go/src/runtime/signal_sighandler.go:15:5
    /usr/local/go/src/runtime/signal_unix.go:530:5: testSigtrap redeclared in this block
        previous declaration at /usr/local/go/src/runtime/signal_sighandler.go:20:5
    /usr/local/go/src/runtime/signal_unix.go:544:6: sighandler redeclared in this block
        previous declaration at /usr/local/go/src/runtime/signal_sighandler.go:33:69
    /usr/local/go/src/runtime/unaligned2.go:12:6: readUnaligned32 redeclared in this block
        previous declaration at /usr/local/go/src/runtime/alg.go:374:40
    /usr/local/go/src/runtime/unaligned2.go:17:6: readUnaligned64 redeclared in this block
        previous declaration at /usr/local/go/src/runtime/alg.go:382:40
    Makefile:93: recipe for target 'build-mos' failed
    make: *** [build-mos] Error 2
    (I’ve also updated go to 1.15.7)
    Liviu
    @nliviu
    I tried to upgrade in place to go 1.15.13 and got build errors.
    After sudo rm -rf /usr/local/go and installing 1.15.13 it builds ok.
    gadget-man
    @gadget-man
    Thanks @nliviu I’ll try that now.
    Mizer
    @amizer12
    @DrBomb - the thing is that i can hear relay clicking when id do a GRPIO.write (4,1) and it is going On - but the GPIO.Read(4) always read 0 - always, no matter if the gpio is o or 1. relay on or off