Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    it won't get freed until next sta_setup
    so - should be fine
    virtuefu
    @virtuefu
    大家好
    harold-martin
    @harold-martin
    @rojer Thanks,
    Have you already test EAP-TLS with the new mos version?
    gadget-man
    @gadget-man
    I keep getting CORRUPTED FRAME errors in my log when trying to send commands such as mos config-get from a Raspberry Pi over a custom cable. It’s worked find on other devices of the same hardware so I’m assuming it’s noise on the cable. Is there a way to slow down the baud rate for mos commands to improve things?
    Deomid Ryabkov
    @rojer

    @rojer Thanks,
    Have you already test EAP-TLS with the new mos version?

    tbh, no, it's been a while since i've tested EAP. but i will.

    I keep getting CORRUPTED FRAME errors in my log when trying to send commands such as mos config-get from a Raspberry Pi over a custom cable. It’s worked find on other devices of the same hardware so I’m assuming it’s noise on the cable. Is there a way to slow down the baud rate for mos commands to improve things?

    --baud-rate

    amizer12
    @amizer12
    Hi All, Quick question - i'm trying to build my project using this library -> https://github.com/wolfeidau/mgos-sgp30 Library itself builds fine, but when i reference it in my project and want to build with it it throws an error - undefined reference to mgos_mgos_sgp-30_init. I have removed all i instances to this function from the code but the error still shows up so my guess is that it`s not referring to the actual function in the code but something different.
    amizer12
    @amizer12
    The only thing i can think of is that Mongoose is trying to verify this library somehow and cannot do it so it fails ? Any clues ?
    d4rkmen
    @d4rkmen
    hi. how u reference it in your app?
    amizer12
    @amizer12
    in my mos.yml i have - - origin: https://github.com/wolfeidau/mgos-sgp30
    and nothing in the app code that uses it
    amizer12
    @amizer12
    Generating esp32.project.ld
    LD /var/tmp/fwbuild-volumes/2.19.1/apps/demo-js/esp32/build_contexts/build_ctx_834202601/build/objs/demo-js.elf
    /opt/Espressif/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /var/tmp/fwbuild-volumes/2.19.1/apps/demo-js/esp32/build_contexts/build_ctx_834202601/build/objs/mosapp/libmosapp.a(mgos_deps_init.c.o):(.rodata.mgos_libs_info+0x26c): undefined reference to `mgos_mgos_sgp30_init'
    collect2: error: ld returned 1 exit status
    make: * [/var/tmp/fwbuild-volumes/2.19.1/apps/demo-js/esp32/build_contexts/build_ctx_834202601/build/objs/demo-js.elf] Error 1
    /opt/Espressif/esp-idf/make/project.mk:563: recipe for target '/var/tmp/fwbuild-volumes/2.19.1/apps/demo-js/esp32/build_contexts/build_ctx_834202601/build/objs/demo-js.elf' failed
    make: Leaving directory '/app'
    i`m not even sure where to look for this undefined reference
    d4rkmen
    @d4rkmen
    yep, this looks like mos compiling issue. may be you should try other mos / libs version?
    amizer12
    @amizer12
    Is there aw ay to specify what version to use or install ( i`m on Mac so via brew )
    DrBomb
    @DrBomb
    @amizer12
    That error that you're encountering is because the lib init method is not found. When you write a lib, the repo name becomes the lib name, and it expects mgos_LIBNAME_init which gets called upon boot. Your lib must not have that function defined
    The lib name is mgos-sgp30, the init method gets translated into mgos_sgp30_init
    Check the lib sources and look for its init function to see why it is not being found
    amizer12
    @amizer12
    @DrBomb thanks !! I’ll put the init function back in and see why it cannot find it
    Liviu
    @nliviu
    @amizer12 You have 2 options:
    • rename mgos_sgp30_init in your local copy to mgos_mgos_sgp30_init
    • or use this in your mos.yml
      - location: https://github.com/wolfeidau/mgos-sgp30
        name: sgp30
    Steve Jacot-Guillarmod
    @piziwate:matrix.org
    [m]
    Hello... I'm really lost with SPI on ESP32. Pins are configured, SPI started... I get no error, SPI is well initialized :
    SPI2 init ok (MISO: -1, MOSI: 2, SCLK: 4; CS0/1/2: -1/-1/-1; native? no)
    But no clock and no data when I use mgos_spi_run_txn(spi, false, &txn).
    DrBomb
    @DrBomb
    SPI needs two lines for communications
    MISO is Master In Slave Out
    You have set as -1. So the esp32 does not receive any data from the slave
    Piziwate
    @piziwate:matrix.org
    [m]
    @DrBomb: In this case I use SPI in only one direction (TX)
      txn.hd.rx_len = 0;
      txn.hd.rx_data = NULL;
    DrBomb
    @DrBomb
    hmm, alright. Then no idea lol
    Liviu
    @nliviu
    @piziwate:matrix.org I'm driving APA102 leds without any problem with these settings
    {
      "cs0_gpio": -1,
      "cs1_gpio": -1,
      "cs2_gpio": -1,
      "debug": false,
      "enable": true,
      "miso_gpio": -1,
      "mosi_gpio": 23,
      "sclk_gpio": 18,
      "unit_no": 3
    }
    Piziwate
    @piziwate:matrix.org
    [m]
    @nliviu: Thank you for your help... The only difference I see is the gpio id, but I'm limited with my board, I need to use gpio2&4. By the way, my board works well with an Arduino program and Fastled with the same GPIO.
    Piziwate
    @piziwate:matrix.org
    [m]
    I finally found the problem! The output connector was not soldered properly! Sorry for the inconvenience...
    amizer12
    @amizer12
    Hi All - is there a way to simply convert hex that i receive from UART into MJS in Mongoose OS into Decimal values ? I have a snesor sending hex valuse and need to make some calcuations based on it prior pushign this to a cloud. is there a way to do it without creatign a function in C and FFI it in the MJS context ? Anything simplier than this for someone that have no idea about C :) ?
    Sergio R. Caprile
    @scaprile
    What do you mean for "hex from a UART", do you actually get two ASCII chars for every data byte ? Like a 'C' and a '0' for 0xC0=192 ?
    Sergio R. Caprile
    @scaprile
    @amizer12
    amizer12
    @amizer12
    Hi, it is more like /xC0/x86/xff something like this
    Sergio R. Caprile
    @scaprile
    @amizer12 Aren't you just observing your bytes as string characters... aren't you ? If you read your data at 'data', then data.at(index) will return a numeric byte value but data.slice(index, index+1)will return a string...
    If you actually receive 4 chars (a slash, an 'x', and two chars holding the hex value) you need to sync to the start of the transmission somehow, then get groups of 4 chars, discard the first two chars and then process the other two. If a char is a number, then it is a number; if it is a letter, make sure it is uppercase, subtract 'A' (0x41=65) and add 10 (cause 'A'=10, so subtract 55). The first one gets multiplied by 16, then add it to the second. So: \xC0 --> C0 --> ('C' - 55)x16 + 0 --> 192. That you can do in mJS
    harold-martin
    @harold-martin

    @rojer Thanks,
    Have you already test EAP-TLS with the new mos version?

    tbh, no, it's been a while since i've tested EAP. but i will.

    Ok rojer, just found the error, by the past when mos read the certificate file in pem format the trailling 0 should be integrated to the buffer, but with the new one it seems that this 0 is not part of the buffer, or esp implementation changed...
    Anyway to make EAP-TLS work without brick the device you need to add a trailling 0 at the end of each pem files, just checked now the error disappear and the device connected correctly to my radius server.

    Deomid Ryabkov
    @rojer
    interesting! we should modify the wifi driver to add trailing zero, it seems.
    amizer12
    @amizer12
    @scaprile data.at(index) did it for me - Many thanks !!
    Subhankar Mahapatra
    @Subh-Embedex
    How to find actual size of firmware to be written on app partition?
    Florian Geiselhart
    @fg-uulm
    Are there any mJS experts who could direct me how to work around the limitations of not having closures, and functions also not being objects? I'm trying to implement a generic state machine, where there's a set of transition functions being "generated" at init time, with the states and possible transitions being completely dynamic (=defined at object creation). Now I'd need to supply those transition functions with some data, which normally would happen through closures, or alternatively could be hacked by adding props to the respective function object. Obviously, neither way works - is there any other chance to accomplish this, or should I resort to coding that part in Cpp and just create a mJS wrapper?
    Deomid Ryabkov
    @rojer

    How to find actual size of firmware to be written on app partition?

    at the end of the build there's a message "app size: xxx", and it alsio gives you the percentage. after the build you can checl build/objs/ directory, the .bin file there is the app

    1 reply
    pun10340
    @pun10340
    Hi All, Why I cannot build firmware in mos tools.
    This's Log $ mos build --platform esp32
    Connecting to https://build.mongoose-os.com, user test
    Uploading sources (258759 bytes)
    Error: Post https://build.mongoose-os.com/api/fwbuild/latest/build: dial tcp 88.198.37.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
    /src/cli/build_remote.go:329:
    /src/cli/build.go:278:
    /src/cli/build.go:221:
    /src/cli/main.go:194: build failed
    exit status 1
    Command completed.
    Joshua Gardynik
    @jgardynik
    I'm getting the same thing. Looks like they broke the build server again.
    Eugene
    @xebit-fenix
    I get the same thing. Does anyone know how long it usually takes to fix a build server?
    DrBomb
    @DrBomb
    It is ran free AFAIK, so you might want to look at local solutions or spinning up your own
    raj-priyanshu
    @raj-priyanshu
    Hi is there any plan of camera implementation??
    Deomid Ryabkov
    @rojer
    build server is fine