Avatar for tarmo888

tarmo888

Member since Apr 2020 • Last active Jul 2020
  • 2 conversations
  • 7 comments

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for tarmo888

    I think I don't have, but I have this USB programmer https://www.sparkfun.com/products/12924

    and I have Arduino Uno, for which I found this guide https://dzone.com/articles/programming-t­he-esp8266-with-the-arduino-ide-in-3

  • in Pico / Wifi / Original Espruino
    Avatar for tarmo888

    Board: ESPRUINOWIFI, 2v06
    AT version:0.40.0.0(Aug 8 2015 14:45:58)

    http://www.espruino.com/WiFi#connecting-­to-an-ap
    I copied this code and it works great when connected to device and flashing the code with Web IDE, but when I am disconnected from Web IDE and plug the device into USB, it keeps waiting for the Web ID on this line console.log("Response: ",res);. Once I re-connect with Web IDE, the code continues running. Also, if I change the line to console.log("Response: ",res.statusCode);, it also works without problems. It seems to be problem cumulative size of console output.

    This is easier to notice when you turn on different LEDs during the request, you can reproduce it by replacing the getPage function with this:

    function getPage() {
      LED1.write(1);
      LED2.write(0);
      require("http").get("http://www.pur3.co.­uk/hello.txt", function(res) {
        console.log("Response: ",res);
        res.on('data', function(d) {
          console.log("--->"+d);
        });
        res.on('close', function() {
          LED1.write(0);
          LED2.write(1);
        });
      });
    }
    

    http://forum.espruino.com/conversations/­306063/
    This looks like similar issue, but it feels odd that console.log sometimes works properly and sometimes doesn't.

    Is there some way to check if device is actually connected to Web IDE, so I could rewrite console.log function to discard the output? I tried E.getConsole(), but that returns "USB" no matter if I am actually connected to Web IDE or not. Using a USB cable that doesn't support data returns "Serial1", but that cable never causes the console.log to stop either.

  • in Pico / Wifi / Original Espruino
    Avatar for tarmo888

    Yes, I used the http://www.espruino.com/ESP8266#use-espr­uino instructions on Pico, I have shim v1 and espruino_2v06_pico_1r3.bin on it. I can still get it into bootloader mode manually, but after trying to flash ESP8266_AT25-SDK112-512k.bin with esptool.py, it broke and now I get the logs above.
    My esptool.py doesn't have ESP_FLASH_BLOCK, it only has ESP_RAM_BLOCK and FLASH_WRITE_SIZE.

    I ordered 10 days ago new shims for Pico too, but I guess you haven't got time to process them yet, I only got the automated order email.

  • in Pico / Wifi / Original Espruino
    Avatar for tarmo888

    I realized that I was still using 0018000902-AI03 firmware, so I decided to update it. I made a mistake of doing it on Windows because esptool.py kept timing out. Then I read about --no-stub option and added that to my command. Reading/writing started to work, but got slower and slower and timed out before reaching even 20% of flashing. I finally realized that I could have flashed it through Raspberry Pi 3+, but even there it doesn't work without --no-stub and flashing fails anyways. Whats my options?

    pi@raspberrypi:~ $ python -m esptool -p /dev/ttyACM0 -b 115200 --no-stub read_mac
    esptool.py v2.8
    Serial port /dev/ttyACM0
    Connecting...
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: 18:fe:34:9d:53:13
    Enabling default SPI flash mode...
    MAC: 18:fe:34:9d:53:13
    Hard resetting via RTS pin...
    
    pi@raspberrypi:~ $ python -m esptool -p /dev/ttyACM0 -b 115200 --no-stub write_flash 0 ESP8266_AT25-SDK112-512k.bin
    esptool.py v2.8
    Serial port /dev/ttyACM0
    Connecting...
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: 18:fe:34:9d:53:13
    Enabling default SPI flash mode...
    Configuring flash size...
    Auto-detected Flash size: 512KB
    Erasing flash...
    Took 1.05s to erase flash block
    Writing at 0x00000000... (0 %)
    A fatal error occurred: Invalid head of packet (0x13)
    
Actions