Confused noob here



  • Hi all,

    thanks in advance for this really interesting project.
    Actually I'm testing on my ESP32-WROVER 8MB and I'm ok with the basic tutorials and my board is connected to internet.
    Now I want to test some stuff like MQTT and I'm facing this issues:

    • When I run "lowsync install mqtt" I face this error: "Not enough space left on file system to install the module(s). Aborting." And is pretty clear but I can't understand why and how a single packet fulls my memory;
    • Sometimes I've to run this command "lowsync settings set network.dns="192.168.50.1" network.timezone="Europe/Rome"" Or lowsync tells me that my uC isn't connected to the internet. Sometimes I've to change the DNS to 8.8.8.8 or it doesn't work too.

    My final question is: how to correctly develop and test with low.js? Am I supposed to develop on my local laptop with "classic node" and then lowsync with the board or something else?
    Reading all the documentation doesn't clear my doubts, I'd like to better understand how low.js is supposed to work and trying improve the documentation.

    Thank you for reading 🙂



  • The npm modules are all for the normal version of Node.JS. It is just crazy what dependencies the modules have and how much space is wasted... So while low.js supports npm and several things run, some packages just hit the limits...

    Maybe this code will help you if you want to do MQTT:
    https://www.espruino.com/MQTT
    or directly the code (you will have to add it as file, it is not in npm): https://www.espruino.com/modules/MQTT.js

    Regarding the lowsync settings set command: I cannot reproduce it. Maybe your connection actually is problematic? If you can reproduce things and tell exactly how to reproduce them on my side, I will fix things asap.

    low.js Basic can only be programmed on your local laptop and with lowsync. low.js Professional can also be programmed on the device itself in a great browser IDE.

    Regards,

    Thomas



  • Thank you @neoniousTR for your reply.

    I'm testing MQTT but I face network issues, I think the root of my problems is in the network stack, let me explain what I did:

    • Setted up a new project from tutorial "Blink Led from Web", it works when I connect straight to the AP from the ESP32 board;
    • Executed the command from https://www.neonious.com/lowjs/documentation/flash-space.html to connect my Wi-Fi, this is the result of "lowsync settings show" after also executing "lowsync settings set network.dns="8.8.4.4" network.timezone="Europe/Rome"":
    code.auto_restart_on_fatal=true
    code.auto_start=true
    code.console_kb=100
    code.kick_watchdog_event_loop=true
    code.main="/index.js"
    code.watchdog_mode="off"
    code.watchdog_timeout_secs=60
    eth.dhcp="client"
    eth.dhcps_max="192.168.1.200"
    eth.dhcps_min="192.168.1.100"
    eth.enabled=false
    eth.static_gw="192.168.1.1"
    eth.static_ip="192.168.1.1"
    eth.static_net="255.255.255.0"
    network.dns="8.8.4.4"
    network.hostname="lowjs-C44F33567759"
    network.time="time.google.com"
    network.timezone="Europe/Rome"
    sdcard.clock_speed=10000000
    sdcard.enabled=false
    sdcard.mode="spi"
    sdcard.mount="/sd"
    sdcard.pin_cs=13
    sdcard.pin_miso=2
    sdcard.pin_mosi=15
    sdcard.pin_sclk=14
    web.cert_and_key_path_enabled=false
    web.cert_ca_path=""
    web.cert_ca_path_enabled=false
    web.cert_key_path=""
    web.cert_path=""
    web.http=8000
    web.http_enabled=true
    web.https=8443
    web.https_enabled=true
    web.redirect_to_https=false
    wifi.dhcp="client"
    wifi.dhcps_max="192.168.0.200"
    wifi.dhcps_min="192.168.0.100"
    wifi.enabled=true
    wifi.mode="station"
    wifi.password="password"
    wifi.ssid="TIM-123456789"
    wifi.static_gw="192.168.1.1"
    wifi.static_ip="192.168.1.190"
    wifi.static_net="255.255.255.0"
    

    This is the code for connecting to the broker:

    var mqtt = require("./MQTT.js").connect({
        host: "5.196.95.208",
      });
    

    And this is the error I get:

    Error: Software caused connection abort (at connect)
        at [anon] internal
    Fatal error, restarting program...
    

    Finally I want to say that if I run just the command for setting just network.dns I get this error:"

    Input>lowsync settings set network.dns="8.8.4.4"
    Output>Reminder: No password set! Please set one via the lowsync settings set web.password="..." command. Continuing...
    Error: Cannot set settings
    network.timezone: The input is invalid
    

    Thank you and I'm at disposal for more testing.



  • This: "Error: Software caused connection abort (at connect)"
    is not an error of lowsync, but of your program on your device. It cannot connect to the host / port you gave to the MQTT module. I cannot see that that is an error.

    This however is:

    Input>lowsync settings set network.dns="8.8.4.4"
    Output>Reminder: No password set! Please set one via the lowsync settings set web.password="..." command. Continuing...
    Error: Cannot set settings
    network.timezone: The input is invalid
    

    Will fix this in the next version of low.js.



  • Ok, I'll test more the software on my board. Is there a place with further software examples?

    Finally, thank you for fixing the dns set error 🙂





  • Fixed the network.timezone problem in new version 1.6.2. Can be flashed with lowsync now, or updated via IDE with the neonious one. The PC versions will be available for download sometime today or tomorrow.

    -- Thomas



  • Thank you Thomas 🙂


Log in to reply