Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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?
    Peter Hoddie
    @phoddie

    Yes, it is. Socket is implemented for all the simulators on macOS, Windows, and Linux. That allows just about all the network modules to work. For example, you can run the httpget example:

    cd $MODDABLE/examples/network/http/httpget
    mcconfig -d -m

    You can run the WebSocket examples the same way. Unfortunately.... the websocketclient example currently throws an exception because the echo server it uses was recently shut down. But, the example is still correct... if you can find another echo server. ;)

    cd $MODDABLE/examples/network/websocket/websocketclient
    mcconfig -d -m
    Henrique Bacelar
    @hbacelar8
    Hey, thanks for you answer. The thing is: I have a foder called simulators to which I point in order to load the devices on mcsim. On the manifest of my main application, I point to the mcsim.exe as a SIMULATOR so it is launched at simulation.
    The problem is that when I try to import Client from websocket on the JS file inside the simulators fold, xsbug breaks at mcsim/main.js inside the reloadDevices function at the following line
    let device = compartment.importNow(info.path).default;
    throwing the error that module websocket can't be found
    Henrique Bacelar
    @hbacelar8
    Basically, my application works great as a websocket server. I can communicate to it through a local html/js as a client. The problem is using an mcsim device as a client. I'm not able to use modules such as websocket inside it since it can't find it.
    Peter Hoddie
    @phoddie
    The WebSocket client and server are both in the same module. Either you can access neither (the module isn't being built) or both. But you say that you are able to access the server, but not the client?
    Henrique Bacelar
    @hbacelar8
    The mcsim is a moddable project by itself right?
    it is built when building moddable right?
    Henrique Bacelar
    @hbacelar8
    Sorry if I wasn't very clear. Let's focus on mcsim. On mcsim.exe, we can click on load simulators and select a folder containing a JS file and some assets like PNG images to load a custom simulator, right?
    Peter Hoddie
    @phoddie
    All true.
    Henrique Bacelar
    @hbacelar8

    Great. So, in this JS file that is loaded by the mcsim (let's call it device.js), which contains code describing the interface and behavior of the simulator (making use of DeviceBehavior and DeviceWorker imported from DevicePane), I just can't import any module. In the beginning of the file, if I for example write

    import { Client } from "websocket"

    xsbug will raise an error in the mcsim/main.js file when trying to load this device.js file in the reloadDevices function saying that module websocket can't be found.

    Henrique Bacelar
    @hbacelar8

    It's like the mcsim project doesn't know the websocket module. I suppose it is that since in the manifest.json of the mcsim project, which can be found on

    $MODDABLE/tools/mcsim/

    doesn't include the manifest_net.json or anything related to the websocket module whatsoever