Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Terry Ellison
    @TerryE
    Why not just use docker? Even if the container is natively hosted on FreeBSD, it should still work fine.
    mehulddj
    @mehulddj

    @mehulddj
    Hi
    I am currently making an AC light dimmer. I have used an arduino example and change it to esp idf c code. As per dimming the code is working fine but my light is showing some flickering. I am not able to verify whether I have missed any thing in the code or not.

    The link for the code is below:
    https://www.dropbox.com/s/kdw0v0vifg8xqra/arduino_code.txt?dl=0
    https://www.dropbox.com/s/ipjmsfsp5n3nhxj/esp32_code.txt?dl=0

    Please check both the files and let me know if there is anything missing or anything that is only specific to arduino and that can not work in esp32.
    The arduino code is working fine without any flickering.

    Marcel Stör
    @marcelstoer

    @mehulddj
    I am currently making an AC light dimmer.

    Wrong channel - this is the NodeMCU Lua firmware group here.

    vidalouiswang
    @vidalouiswang
    Hi everyone
    Could anyone teach me how to enable Lua 5.3 support?
    vidalouiswang
    @vidalouiswang
    I did it.
    vidalouiswang
    @vidalouiswang
    Thanks to all NodeMCU developers
    For this great masterpiece
    Marcel Stör
    @marcelstoer
    :+1: if you think better/more/different documentation would have helped you then please write down what you would have liked to read and raise a PR. Thanks.
    Terri Prifti
    @tprifti

    Has anyone tried to use sjson library in nested JSON? I am not sure if this is the desired behaviour but I expect nested JSON to be converted into a nested Lua table. So here is my JSON:

    {
        "method": "POST",
        "methodIsValid": true,
        "request": "/devices",
        "uri": {
            "path": "/devices",
            "isScript": false,
            "args": []
        },
        "getRequestData": {
            "config": {
                "wifi": {
                    "ssid": "wifi name",
                    "password": "wifi password"
                },
                "device": {
                    "id": "random string"
                }
            }
        }
    }

    getRequestData value type is a function, should It be a table instead? Below I printed the key and value type of the decoded json.

    key: method, type: string
    key: methodIsValid, type: boolean
    key: request, type: string
    key: uri, type: table
    key: getRequestData, type: function
    Also, If I call decodedTable.getRequestData(), it prints out the expected table.
    Thomas Jakober
    @tjakober
    I use many conversions with sjson, encode as well as decode, I never had problems with nested tables. I tested yours and it worked well. However I used ESPLORER to test. Using direct input I had problems declaring the JSON string. When I uploaded it as a lua script it worked well. What script produced the output your key and value pairs?
    Terri Prifti
    @tprifti

    I am using nodemcu http server and the request payload is parsed on this line. In my example, I am using http server that I mentioned above, and I send POST request in my device, here is my example with curl:

    curl --location --request POST 'http://192.168.0.240/config' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "config": {
            "wifi": {
                "ssid": "wifi name",
                "password": "wifi passw"
            },
            "device": {
                "id": "this is a token"
            }
        }
    }'

    To produce key value pairs output, I am using the code below:

    for k,v in pairs(req) do
        print("key: "..k..", type: "..type(v))
     end
    Patrick Dorion
    @poorandunlucky
    does anyone know if you can build on FreeBSD>
    ?
    I'm having the worst time of my life trying to only have one home folder on my FreeBSD server, and I manage to mount the smb share in Ubuntu WSL2, but it would be so much easier if I could just ssh to my FreeBSD box and make from there...
    Patrick Dorion
    @poorandunlucky
    so i managed to get it half-working by installing gmake, wget, and making a link from shasum to sha1sum that have compatible outputs...
    now i get this, and idk...
    extracting: ESP8266_NONOS_SDK-e4434aa730e78c63040ace360493aef420ec267c/third_party/include/user_config.h PRUNE libmain.a libc.a /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/tyler/bin:/jails/plex/usr/home/tyler/buildtest/nodemcu/tools/toolchains/esp8266-linux-x86_64-20190731.0/bin ELF binary type "3" not known. /jails/plex/usr/home/tyler/buildtest/nodemcu/tools/toolchains/esp8266-linux-x86_64-20190731.0/bin/xtensa-lx106-elf-ar: 1: Syntax error: "(" unexpected gmake: *** [Makefile:337: /jails/plex/usr/home/tyler/buildtest/nodemcu/sdk/.pruned-3.0-e4434aa] Error 2 gmake: Leaving directory '/jails/plex/usr/home/tyler/buildtest/nodemcu'
    Patrick Dorion
    @poorandunlucky
    oh wait, might be able to install ubantoo in fbsd (12.2+) https://wiki.freebsd.org/LinuxJails
    Patrick Dorion
    @poorandunlucky
    didn't work, some things can't install on it, that was a dead-end... maybe with bhyve or something...
    i almost want to buy another laptop just to run linux fuck... no place on desk though...
    what about rasbian?
    there's x86 sbc too... maybe one of those, or just put the linux machine under the freebsd one...
    fml
    Thomas Jakober
    @tjakober
    @tprifti
    Thomas Jakober
    @tjakober
    @tprifti I get table as printout, not function. Might be you have a function in your program with the same name and since in LUA functions are also tables you got some confusion with locals and globals.
    OnurNP
    @K0rkunc
    hi
    im using esp32 s2
    i can connect wifi and enter https sites
    but i cant enter https sites
    google sheets or etc..
    how to fix that
    Patrick Dorion
    @poorandunlucky
    what's this mean?
    ESPTOOL app/.output/eagle/debug/image/eagle.app.v6.out ../bin/ Pyserial is not installed for /usr/bin/python. Check the README for installation instructions. Traceback (most recent call last): File "/home/tyler2/repos/nodemcu/tools/toolchains/esptool.py", line 37, in <module> import serial ImportError: No module named serial make[1]: *** [../Makefile:268: .output/eagle/debug/bin/eagle.app.v6.bin] Error 1
    Patrick Dorion
    @poorandunlucky
    nevermind i figured out how to install python2 esptool and nodemcu-uploader on Ubunty 20.whatevr
    pos python
    OnurNP
    @K0rkunc

    Backtrace: 0x4000c3f0:0x3ffd1380 0x400db076:0x3ffd13a0 0x400db192:0x3ffd13c0 0x400d7ad1:0x3ffd13e0 0x400d6192:0x3ffd1450 0x400d60f5:0x3ffd1490 0x400d145d:0x3ffd14b0 0x4015188f:0x3ffd14f0 0x400d9309:0x3ffd1510 0x400d6df1:0x3ffd1560 0x400d6eb5:0x3ffd15a0 0x400d7105:0x3ffd15f0 0x4014b7b1:0x3ffd1610 0x4014b82d:0x3ffd1650 0x4014bed6:0x3ffd1670 0x4008a286:0x3ffd16a0

    #0 0x4000c3f0:0x3ffd1380 in ?? ??:0

    #1 0x400db076:0x3ffd13a0 in String::move(String&) at C:\Users\OnurNP.platformio\packages\framework-arduinoespressif32\cores\esp32/WString.cpp:857

    #2 0x400db192:0x3ffd13c0 in String::operator=(String&&) at C:\Users\OnurNP.platformio\packages\framework-arduinoespressif32\cores\esp32/WString.cpp:857

    #3 0x400d7ad1:0x3ffd13e0 in AsyncBasicResponse::_respond(AsyncWebServerRequest) at lib\ESPAsyncWebServer\src/WebResponses.cpp:699

    #4 0x400d6192:0x3ffd1450 in AsyncWebServerRequest::send(AsyncWebServerResponse
    ) at lib\ESPAsyncWebServer\src/WebRequest.cpp:797

    #5 0x400d60f5:0x3ffd1490 in AsyncWebServerRequest::send(int, String const&, String const&) at lib\ESPAsyncWebServer\src/WebRequest.cpp:797

    #6 0x400d145d:0x3ffd14b0 in handleRoot(AsyncWebServerRequest) at src/main.cpp:289

    #7 0x4015188f:0x3ffd14f0 in std::_Function_handler<void (AsyncWebServerRequest
    ), void ()(AsyncWebServerRequest)>::_M_invoke(std::_Any_data const&,

    AsyncWebServerRequest*&&) at c:\users\onurnp.platformio\packages\toolchain-xtensa32@2.50200.97\xtensa-esp32-elf\include\c++\5.2.0/functional:1871

    #8 0x400d9309:0x3ffd1510 in std::function<void (AsyncWebServerRequest*)>::operator()(AsyncWebServerRequest*) const at lib\ESPAsyncWebServer\src/StringArray.h:73

      (inlined by) AsyncCallbackWebHandler::handleRequest(AsyncWebServerRequest*) at lib\ESPAsyncWebServer\src/WebHandlerImpl.h:132

    #9 0x400d6df1:0x3ffd1560 in AsyncWebServerRequest::_parseLine() at lib\ESPAsyncWebServer\src/WebRequest.cpp:797

    #10 0x400d6eb5:0x3ffd15a0 in AsyncWebServerRequest::_onData(void, unsigned int) at lib\ESPAsyncWebServer\src/WebRequest.cpp:797

    #11 0x400d7105:0x3ffd15f0 in std::_Function_handler<void (void
    , AsyncClient, void, unsigned int), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer, AsyncClient)::{lambda(void, AsyncClient, void, unsigned int)#8}>::_M_invoke(std::_Any_data const&, void&&, AsyncClient*&&, std::_Any_data const&, unsigned int&&) at lib\ESPAsyncWebServer\src/WebRequest.cpp:797

      (inlined by) _M_invoke at c:\users\onurnp\.platformio\packages\toolchain-xtensa32@2.50200.97\xtensa-esp32-elf\include\c++\5.2.0/functional:1871    

    #12 0x4014b7b1:0x3ffd1610 in std::function<void (void*, AsyncClient*, void*, unsigned int)>::operator()(void, AsyncClient, void*, unsigned int) const at lib\AsyncTCP\src/AsyncTCP.cpp:1039

      (inlined by) AsyncClient::_recv(tcp_pcb*, pbuf*, signed char) at lib\AsyncTCP\src/AsyncTCP.cpp:934

    #13 0x4014b82d:0x3ffd1650 in AsyncClient::_s_recv(void, tcp_pcb, pbuf, signed char) at lib\AsyncTCP\src/AsyncTCP.cpp:1039

    #14 0x4014bed6:0x3ffd1670 in _async_service_task(void
    ) at lib\AsyncTCP\src/AsyncTCP.cpp:1039

      (inlined by) _async_service_task at lib\AsyncTCP\src/AsyncTCP.cpp:197

    #15 0x4008a286:0x3ffd16a0 in vPortTaskWrapper at

    /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

    hi im getting this error
    refreshing page
    Gregor Hartmann
    @HHHartmann
    @K0rkunc this is the wrong channel. See description above
    Patrick Dorion
    @poorandunlucky
    I'm having this problem, can't flash my LFS image on my ESP-01S...

    `print ( node.LFS.reload ( 'LFS.img' ) )
    LFS Image too big for configured LFS region

    print("The LFS size is " .. node.getpartitiontable().lfs_size)
    The LFS size is 65536
    print("Image size is " .. file.stat ( 'LFS.img' ).size)
    Image size is 32265
    print ( node.flashsize() )
    1048576`

    Patrick Dorion
    @poorandunlucky
    the firmware is compiled as a 1M flash size, and the LFS size in user_config.h is 0x10000 (64K)... I know this is deprecated, but I don't know what to do... It works fine on a ESP-12E, but it's my first time with a ESP-01(S) so... I'm really unsure what to do...
    Patrick Dorion
    @poorandunlucky
    ok got it, idk why, i ran node.getpartitiontable() and it gave me the start address, so the end address of the FW, so from there I could add 0x10000 to the LFS size, and it worked... idk why isn't 0x10000 65K?
    I'm so happy though, I could almost hug Terry 😊
    Patrick Dorion
    @poorandunlucky
    uh... wasn't expecting that... used to say "out of memory"...
    pinches lips and looks at screen a bit sideways to the left
    Patrick Dorion
    @poorandunlucky
    the only math i could come-up with is the
    4 K blocks, 0x10000 / 4 = 16000-something, * 2 = 32768 which is just over my LFS size on disk, 32265...
    which would explain why it doesn't fit in 0x10000 but does in 0x20000... but is 0x10000 was 4 K blocks, it would be * 4, not / 4...
    Patrick Dorion
    @poorandunlucky
    is there a way to access stuff in LFS, or is the module loader the only way to search the LFS for "file"?
    Patrick Dorion
    @poorandunlucky
    like unless i set the searchers to search the LFS from _init.lua, autoloaded at boot from a compile option in user_config.h, can i read, files from it