by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mark Becker
    @MaBecker
    are you trying to setup a additional serial ?
    Ákos Lukács
    @AkosLukacs
    One (other than the terminal)
    Mark Becker
    @MaBecker
    What about Serial2, TX:D17 RX:D16 ?
    or go for a software serial
    Mark Becker
    @MaBecker

    Ups, better not use D17, D16

    On D2WD, pins GPIO16, GPIO17, SD_CMD, SD_CLK,
    SD_DATA_0, SD_DATA_1 are used to connect the built-in SPI Flash chip. Using them for some other purpose will interfere with code execution from flash, leading to illegal instruction exception. Also note that D2WD uses a 1.8V flash chip, so all pins in VDD_SDIO domain use 1.8V supply voltage.

    So it depends on the board you use ;-)
    Ákos Lukács
    @AkosLukacs
    Yeah, D16 is connected to the LCD
    And of course just soldered the pins on the "right" side, because that should be more than enough, if you can move anything to any pin, right? :)
    Ákos Lukács
    @AkosLukacs
    (ESP / arduino) Uart0 is (espruino) Serial1, Uart1 is Serial1, and Uart2 is Serial2, right? Or is there something else?
    And UART0 / Serial1 is the serial terminal. Pin0 and Pin3 is not available on the board
    Mark Becker
    @MaBecker

    Yes, just tried

    Serial1.write("hello")
    hello=undefined

    so use Serial2.setup()
    Ákos Lukács
    @AkosLukacs
    Yes, tried to use Serial2, but now time to get the kids to bed
    Mark Becker
    @MaBecker
    digitalWrite(D16,0);
    Serial2.setup(115200,{rx:D5, tx:D2});
    Serial2.write("Hello");
    digitalWrite(D16,1);
    D16 is just the trigger for the logic analyser
    Work ;-)
    Ákos Lukács
    @AkosLukacs
    It's working on D32 and D33. Just a piece of wire as loopback to verify :)
    rgomezwap
    @rgomezwap

    Hello I just installed the build environment for ESP32. The generated firmware version is 2v04.406.
    Can someone tell me how I can see what exact version of ESP-IDF was used for the build.

    Richard Gomez

    rgomezwap
    @rgomezwap
    I see from github that the last version we are using is -> esp_idf_branch = v3.1.3
    Mark Becker
    @MaBecker
    ok
    just added the ESP-IDF to #1777
    rgomezwap
    @rgomezwap
    Can someone explain to me what is the 64Kbyte flash partition of the ESP32 firmware? thanks
    Ákos Lukács
    @AkosLukacs
    How do you solve wifi reconnect? Usually the EPS32 will reconnect just fine, but sometimes it won't. Big setTimeout, and call wifi.restore(), if it's still not connected?
    rgomezwap
    @rgomezwap
    I am having problems with the same but have not resolved.
    Mark Becker
    @MaBecker
    I would bet it is a esp-idf issue, at the moment we are on 3.1, so send a sample how to detect it I can setup a test with esp-idf 4.1
    rgomezwap
    @rgomezwap
    Yes, try it pls.
    unfortunately it doesn't always happen ... the loss of connection I think comes from the power saving mode
    Ákos Lukács
    @AkosLukacs
    Well, no idea how to test it. My wifi AP seems to be working fine. At least laptops or phones don't have a problem. It works OK for 1-3 hours, and after that it won't reconnect. But the code is working (display on the ESP does update). But at least two times it crashed.
    Right now I'm not 100% sure it's not because the T-Display has weak decoupling. At first it didn't even run with a longer USB cable. But other ESP32 dev boards worked just fine with long USB cable.
    And looks like I have a memory leak. So there can be multiple reasons for my issues...
    Uploaded a modified js code. But now third of my code is wifi & mqtt reconnect logic :O
    Wifi issues are annoying to test, while hunting for a memory leak in tinyMQTT I put an ESP8266 into a steel pot and cover it to break wifi, but even that didn't work all the time. Had to cover it in tin foil :)
    Mark Becker
    @MaBecker
    On esp12 i always use none powersave mode when connected to power supply
    Ákos Lukács
    @AkosLukacs
    How can I change the power save mode? right now it's powersave: "modem"
    rgomezwap
    @rgomezwap
    Yes it is difficult to find ... to solve it you also have to go to the access point, and log the messages on the reconnection they exchange.
    Mark Becker
    @MaBecker
    @AkosLukacs this could be a nice mqtt - nodered - influxdb - grafana Project to improve know how on my site
    rgomezwap
    @rgomezwap
    I have read that power modem mode turns off the wifi and turns it on at intervals ... in the wifi API you can set the mode, but I have not tried.
    Mark Becker
    @MaBecker
    Check this api call https://www.espruino.com/Reference#l_Wifi_setConfig to set powersave mode
    Ákos Lukács
    @AkosLukacs
    Oh, setConfig, thanks. I try that
    Yes, I use mqtt, influx and grafana. And just send free and rssi as extra telemetry so I can check that. I can send a stripped down example later. But it's time to work :)
    Mark Becker
    @MaBecker

    I use mqtt, influx and grafana.

    all in one on a pi?

    Ákos Lukács
    @AkosLukacs
    yep
    Mark Becker
    @MaBecker

    I can send a stripped down example later

    Thanks

    Ákos Lukács
    @AkosLukacs
    Re pi: it's a Pi3 B+, 1Gb ram; Only ssh, no monitor; Runs Raspbian lite whatever. Not doing much else. 5-600Mb mem usage. CPU is pretty bored :)
    I use an SSD so it doesn't kill the SD card, but that's all
    Ákos Lukács
    @AkosLukacs
    Oh, one more: powered by a https://shop.pimoroni.com/products/wide-input-shim?variant=2168104321034 that's backed by a 12V 7Ah lead acid battery (off the self UPS for alarms and things like that made by a Hungarian company). Could measure battery voltage, but didn't bother so far. It should run for more than half a day on battery.
    Works nicely, there are a lot of short blackouts in windy weather.
    Mark Becker
    @MaBecker
    Nice, thanks for sharing
    rgomezwap
    @rgomezwap
    @AkosLukacs hi, have you been able to advance with the power save mode? any news to share, thanks
    Mark Becker
    @MaBecker
    It is available, just use it like this
    >Wifi.setConfig({powersave:'none'});
    =undefined
    >Wifi.getStatus()
    ={
      station: "connected",
      ssid: "SBIT",
      bssid: "28:cf:da:b5:5e:71",
      channel: 6, rssi: -75,
      htMode: "HT20",
      authMode: "wpa2",
      mode: "STA",
      powersave: "none"
     }
    >
    Ákos Lukács
    @AkosLukacs
    @countxerox yes did exactly what @MaBecker showed. Wifi reconnect seems to be better after the modifications. Still crashed twice, but once the displayed value from the sensor was totally off
    Not sure yet what is the cause of that. Whether an issue with the esp32 caused the bad reading, or maybe bad data from the sensor was the reason for the crash. Or something completely different...