Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Daniel Ashcraft
    @dashcraft
    i think i figured it out, there's a notifyValue argument for specific types
    Peter Hoddie
    @phoddie
    The code above looks reasonable. FWIW - the first argument to setInt8 is putting the value into the second byte of the buffer, not the first (but that may be intentional).
    Daniel Ashcraft
    @dashcraft

    What was actually happening, was i had set the wrong value in the bleservices json file, and I naively was trying to do what it had already done. I've finally got a working example of implementing improv-wifi (esphomes/hassio's new 'standard' for ble onboarding)

    This is going to be a pita to write tests for.
    https://github.com/dashcraft/improv-wifi-mod

    Peter Hoddie
    @phoddie
    Understanding what a framework does and doesn't do can sometimes be an adventure. Cool that you got it working. The code like clean and straightforward.
    It looks like you created TypeScript declarations for some of the Moddable SDK BLE APIs. Should we think about rolling those into the Moddable SDK for more general use?
    John M. Wargo
    @johnwargo
    @dashcraft so if I understand you correctly, you want have external code, not part of your Moddable 'project' and you want to be able to deploy them as well with mddbl or are you talking about copying the files into your project? I'm assuming the latter since you mentioned package manager. Hmmm, that's a really interesting idea. What I'd really like, in order for me to understand exactly what you mean, is if you'd walk me through the process you invision for this.
    8qohse
    @8qohse:matrix.org
    [m]
    He must be talking about something like pip install improv-wifi-mod or npm install express-moddable copying the external files in their project folder; and possibly making the appropriate adjustment in manifest.json?
    Daniel Ashcraft
    @dashcraft
    @johnwargo exactly what @8qohse said
    Daniel Ashcraft
    @dashcraft
    @phoddie hmmm type declaration files are low hanging fruit, i can create them and issue prs as I come across them.
    John M. Wargo
    @johnwargo
    @dashcraft OK, let me noodle on that.
    Peter Hoddie
    @phoddie
    I recall someone asked about Docker here a little while back. It looks like @meganetaaan is using that as a build option in one of his projects. https://github.com/meganetaaan/stack-chan/blob/main/firmware/README.md#optional-using-docker-image
    Frida854
    @Frida854

    When trying examples/pins/monitor/main.js an error occurs.

    Projects/moddable/modules/pins/digital/monitor/esp/modMonitor.c (165) # Break: Monitor.prototype.rises: not configured!

    In egde: there is only edge: Monitor.Falling
    by adding edge: Monitor.Falling | Monitor.Rising
    the error disappears.

    '''
    if (undefined != config.button1_pin) {
    if (config.button1_port)
    monitor1 = new Monitor({pin: config.button1_pin, port: config.button1_port, mode: Digital.InputPullUp, edge: Monitor.Falling | Monitor.Rising});
    else
    monitor1 = new Monitor({pin: config.button1_pin, mode: Digital.InputPullUp, edge: Monitor.Falling | Monitor.Rising});
    monitor1.onChanged = function() {
    trace(Button 1: state: ${this.read()}, changed ${this.rises + this.falls} times\n);
    }
    }
    '''

    Peter Hoddie
    @phoddie
    Hey, @Frida854 , thanks for the report. That looks like a mistake in the example. Your fix is just right. We'll fix that in our next push.
    Daniel Ashcraft
    @dashcraft
    Are there any performance tips for https certs? If I set a 30 second interval on sending data, works fine, but 5s and lower it will sporadically say it couldn’t load the certificate.
    Peter Hoddie
    @phoddie
    Not quite sure I understand the problem you are seeing. Can you share more about the scenario?
    Daniel Ashcraft
    @dashcraft
    Let me find some time this up coming week to repro and if I come across it again I'll share the error.
    Peter Hoddie
    @phoddie
    :thumbsup:
    bradleymeck
    @bradleymeck:matrix.org
    [m]
    Has anyone looked at getting https://github.com/espressif/esptool-js running to have a full web based deploy system for people to share apps?
    Peter Hoddie
    @phoddie
    Kind of.
    bradleymeck
    @bradleymeck:matrix.org
    [m]
    if i could figure out how to go from elf -> what it uses it should be possible to run clang from inside a browser
    absolute insanity to do so though
    Peter Hoddie
    @phoddie
    I'll sent you an email later today. Some things to discuss that aren't perfectly suited to gitter. ;)
    Daniel Ashcraft
    @dashcraft
    finally got our boards in!
    Peter Hoddie
    @phoddie
    Woo-hoo! Congrats.
    Daniel Ashcraft
    @dashcraft
    @phoddie am i correct in assuming that the platform for the esp32-wroom-32d is esp32 for the cli?
    Daniel Ashcraft
    @dashcraft
    Answered my own question, esp32/nodemcu
    Peter Hoddie
    @phoddie
    That is the correct answer. Depending on exactly what your project needs, you can sometimes just use "esp32" without any subplatform. That is totally bare bones. The "esp32/nodemcu" just adds the drivers for the LED and Flash button.
    Daniel Ashcraft
    @dashcraft

    I have a timer sending some sensor readings, if i set the timer for 5 seconds, i'm getting this error Intermittently (once every 20-30 seconds):
    throw new Error("SSL: alert: " + session.alert.level + ", " + session.alert.description);

    If i set the timer to 7 seconds or more, this error does not occur.

    Probably just not enough memory, that ssl handshake is such a memory burden
    Peter Hoddie
    @phoddie
    It is unexpected to get that error from an out of memory on the client. The alert is sent by the server. Is it possible that you have overlapping requests and the server is unhappy about that?
    Daniel Ashcraft
    @dashcraft
    It seems to be only on response from the server, this is an aws api gateway endpoint with tls 1.2 I want to say. I’m using ca222.der certificate, server receives data fine but it’ll crash on response
    Peter Hoddie
    @phoddie
    Can you reproduce the problem in a standalone app I could run? It may be easier to diagnose that way.
    Daniel Ashcraft
    @dashcraft
    Let me get a minimal reproducible on this aws instance going, i'll get back to you with a repo
    I've isolated it to definetly something with the ssl cert either going in or coming back, using http, i can send 1 second requests without issue indefinetly (since yesterday morning on another device)
    Shinya Ishikawa
    @meganetaaan
    Hello. I just wanna let you know I've published my personal robot project.
    with ModdableSDK embedded!
    https://hackaday.io/project/181344/
    Shinya Ishikawa
    @meganetaaan
    This is kind of open source hardware. Over 20 enthusiasts started building the robot.
    Some of them just uses the case/schematics and Arduino libraries. And some others successfully built their application with Moddable.
    A tweet list below shows their unique works based on my robot.
    https://togetter.com/li/1759098
    I'll keep providing the firmware in JavaScript for scalability and ease of robot application development.
    Peter Hoddie
    @phoddie
    @meganetaaan - that's a big project! Nice work on bringing all that together. it is particularly cool that are you are using mods to quickly install new behaviors. Do you plan to publish documentation on the APIs available to developers creating their own mod?
    Daniel Ashcraft
    @dashcraft

    I've been digging through docs and i am stumped although I'm sure the answer is in there somewhere.

    Is it possible to write configs/preferences to a partition at flash time? If I compiled a moddable program that accepts preferences, I may make it easier
    to do fleet provisioning if I can flash configs when I flash the compiled moddable program.

    Peter Hoddie
    @phoddie
    You can use serial2xsbug to write preferences from the command line. Writing preferences relies on support in the host, which is available in debug builds.
    serial2xsbug /dev/cu.SLAB_USBtoUART 460800 8N1 -pref config.wifi="Moddable Guest"
    If you know the partition address,. you can write directly to it using esptool.py.
    Daniel Ashcraft
    @dashcraft
    Is it possible to set aside the exact partition for preferences? So as to always "know" where that partition address is to write to?

    I'm basically attempting to recreate this flow:
    https://www.youtube.com/watch?v=ZsD59Tg2oCQ

    for multiple devices, they're using esptool-js I believe

    Peter Hoddie
    @phoddie
    Your project controls the partition map.
    Daniel Ashcraft
    @dashcraft
    Is it just the main.bin file that's needed for ota's?
    Peter Hoddie
    @phoddie
    Yes.
    The OTA can't change the partition map or boot loader, so just the one file is needed.
    Daniel Ashcraft
    @dashcraft
    Sweet, thanks!
    Henrique Bacelar
    @hbacelar8
    Hey everyone. I've been trying to find information on mcsim but it seems it is a bit scarce. Is it possible to use websocket on a mcsim device?