esptool | esptool.py replacement written in # golang

 by   Fluepke Go Version: 1.0 License: AGPL-3.0

kandi X-RAY | esptool Summary

kandi X-RAY | esptool Summary

esptool is a Go library typically used in Internet of Things (IoT) applications. esptool has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

This is a work in progress and has not yet been fully tested I bundle my fluepdot firmware with this tool to ship a standalone update utility, which I prefer over ~~remote code execution on customer HW~~ OTA updates.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              esptool has a low active ecosystem.
              It has 15 star(s) with 2 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 1 have been closed. On average issues are closed in 3 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of esptool is 1.0

            kandi-Quality Quality

              esptool has no bugs reported.

            kandi-Security Security

              esptool has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              esptool is licensed under the AGPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              esptool releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed esptool and discovered the below as its top functions. This is intended to give you an instant insight into esptool implemented functionality, and help decide if they suit your requirements.
            • infoCommand returns information about a device .
            • getBaudrateFlag returns the value of baudrate flag .
            • partitionFromRow converts a row to a Partition .
            • Get output mode
            • parseNumeric converts a string to a numeric value .
            • OpenPort opens a port .
            • NewResponse initializes a new Response .
            • Main entry point .
            • Version command prints the version info
            • connectEsp32 connects to the given port .
            Get all kandi verified functions for this library.

            esptool Key Features

            No Key Features are available at this moment for esptool.

            esptool Examples and Code Snippets

            esptool,Compilation
            Godot img1Lines of Code : 4dot img1License : Strong Copyleft (AGPL-3.0)
            copy iconCopy
            go get github.com/fluepke/esptool
            cd ${GOPATH-$HOME/go}/src/github.com/fluepke/esptool
            go build
            ./esptool 
              
            esptool,Usage,Examples
            Godot img2Lines of Code : 2dot img2License : Strong Copyleft (AGPL-3.0)
            copy iconCopy
            ./esptool info -serial.port /dev/ttyUSB0 -json
            
            ./esptool flashWrite -flash.file=/home/fluepke/git/fluepdot/software/firmware/flipdot-firmware.bin -flash.offset=0x10000 -serial.port=/dev/ttyUSB0 -serial.baudrate.transfer=500000 -serial.baudrate.conne  

            Community Discussions

            QUESTION

            ESP-IDF wifi event loop keeps receiving SYSTEM_EVENT_STA_WPS_ER_PIN even after code rollback
            Asked 2021-Jun-01 at 20:46

            I have been working on a project using the ESP32 with the ESP-IDF that will check it's NVS memory for wifi credentials before starting the network stack. If it has said credentials, it will connect to the wifi network in STA mode, if it lacks them, it will launch as it's own AP to allow the user to send it the credentials over HTTP.

            After manually putting my test credentials into NVS, I started working on the AP code. Once all the AP code and logic was complete, I manually wiped the flash memory with esptool to force the board to launch in that mode. Doing so worked fine, and I was able to send it the updated credentials over HTTP.

            At this point, the board attempted to connect as STA upon reset, however, the SYSTEM_EVENT_STA_WPS_ER_PIN event kept being caught by the wifi event loop. The board has since only experienced this event and has been completely unable to connect to wifi since. To make matters stranger, even after rolling back to a previous version with git, the problem still persists.

            main.c

            ...

            ANSWER

            Answered 2021-May-22 at 13:33

            Useful to solve the problem. I'm in the proces of learning to use the ESP32 wifi, read your message checked, the ESP-idf and esp-32 technical manual not much info there I found this URI https://www.wi-fi.org/downloads-public/Wi-Fi_Protected_Setup_Best_Practices_v2.0.2.pdf/8188

            Kind regards

            Update: check the sdkconfig file in your projectmap against the one in the example map for wifi config settings.

            Source https://stackoverflow.com/questions/67576386

            QUESTION

            Problem uploading sketch to arduino uno/esp8266
            Asked 2021-May-04 at 15:24

            Getting this error while uploading:

            ...

            ANSWER

            Answered 2021-Apr-30 at 15:46

            Could you give more details about the 3.3V regulator that you using? Do you have it connected between the serial signals?

            If that is the case, I suggest this connection instead:

            3.3V signal voltage divisor

            ESP TX and Arduino RX can be connected directly without any issue

            Source https://stackoverflow.com/questions/67320143

            QUESTION

            ESP32 toit provisioning fails
            Asked 2021-Apr-09 at 05:43

            Setup: Macbook Pro 2020 with a Satechi USB dongle, which serves the usb connections to the microcontroller. The USB cable suited for file transferring. I am using an ESP32-wroom-32E, but when that failed I also tried with an ESP32-wroom-32D and an ESP32 (v1). All of them are development boards.

            Tried to provision with the following command from https://docs.toit.io/getstarted/provision/:

            toit serial provision --baud 460800 -p wifi.ssid=toitwifi -p wifi.password=toitware -m esp32-4mb

            This resulted in the following:

            ...

            ANSWER

            Answered 2021-Apr-09 at 05:43

            Most often provisioning fails because of drivers that aren't updated.

            For macOS these would be (latest version):

            According to your update you already installed those.

            Some devices also need lower baud rates. For example the LILYGO TTGO T-Wristband only works with limited bandwidths. Maybe try with a lower value (as low as 9600).

            Since the macOS USB hardware is known to be a bit finicky you could also try to put the devkit behind a USB hub (with an external power supply).

            Finally, there are some devices that are known to have a bad hardware setup and which are difficult to flash on macOS. Sometimes pulling the GPIO0 to ground (for example with a resistor) can make the flashing work.

            Others have reported success with adding a capacitor: https://randomnerdtutorials.com/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header/

            Since you only need to provision/flash a device once, the breadboard solution would be enough. Concretely, adding a 10uF electrolytic capacitor between the EN pin and GND could work.

            Source https://stackoverflow.com/questions/67015569

            QUESTION

            How do you erase ESP32 wifi Smartconfig credentials from flash?
            Asked 2021-Jan-25 at 12:15

            I am using esp32 smartconfig to setup wifi credentials and it is working reliably. I want to be able to erase the credentials which are stored somewhere in flash from my arduino esp32 sketch.

            The only way I have been able to erase the credentials (I'm not sure where they are stored) is to erase the entire flash using esptool.py from my Windows PC:

            ...

            ANSWER

            Answered 2021-Jan-25 at 12:15

            You haven't provided much details on your implementation, but if assuming the standard ESP-IDF implementation then the WiFi credentials are stored in Flash on the default NVS partition named "nvs" (overview). You can easily perform an erase cycle on the entire partition which will erase everything stored in your device.

            Alternatively you can hunt down the specific NVS keys used by the ESP WiFi component to store the credentials and erase only those. This is slightly risky as they haven't open-sourced the WiFi drivers and might change the implementation at any time. With that in mind, current ESP IDF 4.2 seems to store those keys in the default NVS partition under namespace "nvs.net80211". The relevant key names would appear to be "sta.authmode", "sta.ssid" and "sta.pswd".

            Source https://stackoverflow.com/questions/65873683

            QUESTION

            What does "stub" mean in the context of ESP32 and esptool option --no-stub?
            Asked 2021-Jan-16 at 14:08

            I want to program a board with an esp32 on it using esp-prog and esptool. When I do that I get the following error:

            ...

            ANSWER

            Answered 2021-Jan-16 at 14:08

            In software development, a stub is a piece of code or a program which is used in place of another. They often simulate the behavior of the original feature and sometimes they are used as a temporaro substitute for undeveloped code.

            In the case of esptool, it uses a stub loader, which basically replaces the original bootloader used in the ESP to load your program via serial port to the ROM of your ESP32 device.

            Basically this stub bootloader has the same behavior as the original bootloader, but it uses some UART routines which are more heavily optimised to load the ROM code.

            Using --no-stub you will be using the original ESP32 bootloader, which is known to be slower at flashing the program and at some other operations. There are some commands which can only be used in the esptool bootloader, but if you are not using any optional commands to boot your code, it is safe to use --no-stub

            Source https://stackoverflow.com/questions/65749587

            QUESTION

            ESP8266 esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
            Asked 2020-Dec-11 at 10:01

            I have the ESP8266 and have already tried the versions 2.6.2, 2.7.3, and 2.7.4. Nothing worked and all got was the same error:

            ...

            ANSWER

            Answered 2020-Dec-07 at 17:17

            I think I know what's your problem, I had a very similar one: You have to keep pressing one of the two ESP8266 buttons (it's called boot I think (I was wrong, it's called flash)) next to the USB plug while uploading (I wrote this before I realised that there are no buttons and no USB plug). That's a problem that is mostly there on cheap chinese devices I think.

            Edit: Now that I know the exact board (I just assumed it was a NodeMCU for some reason) it turned out that that board doesn't have such a flash button, but that doesn't mean that you can't make one yourself:

            (image from this site)

            GPIO0, the pin that is grounded by the flash button, is accessable, so it should be possible to just ground it.

            Source https://stackoverflow.com/questions/65173101

            QUESTION

            Killing all processes and threads in python3.X
            Asked 2020-Jul-14 at 09:52

            I'm writing a UI wrapper for reading some info using esptool.py

            I have two active threads: UI and procesing - SerialReader. UI class has reference to the SerialReader and should stop SerialReader when it gets the exit command.

            The problem is that I call esptool command which gets stuck in trying to read data over serial connection.

            ...

            ANSWER

            Answered 2020-Jul-13 at 12:01

            First import os library:

            Source https://stackoverflow.com/questions/62873234

            QUESTION

            Problem uploading code to ESP8266: esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for package header
            Asked 2020-May-13 at 19:07

            I'm trying to upload the example Blink code to my ESP8266 modules, 1 of which is an ESP8266-07, the other a WeMos D1 mini PRO. I've installed the library for the ESPs according to online instructions. I'm uploading from Ubuntu 16.04, Arduino 1.8.9. I've also made sure to use sudo chmod 666 /dev/ttyUSB0.

            I've tried uploading both through a normal USB cable and through a USB-TTL board, both of which made no difference. My Tools > Board settings are "Generic ESP8266 module" for the ESP8266-07 and "LOLIN(WEMOS) D1 mini Pro" for my mini Pro. In all 4 cases (2 different boards, 2 uploading cables/gateways), I've got the same error message.

            ...

            ANSWER

            Answered 2019-May-29 at 22:34

            There are a few different things to check for troubleshooting:

            • Check what your serial devices are enumerating as. They may be showing up as /dev/ttyACM* rather than /dev/ttyUSB0

            • Add your user to the dialout group

            Source https://stackoverflow.com/questions/56357008

            QUESTION

            arduino nodemcu error compiling for board esp32
            Asked 2020-Apr-21 at 08:41

            when compiling a code in Arduino Idea get this error:

            Traceback (most recent call last): File "/home/user/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py", line 37, in import serial ImportError: No module named serial

            exit status 1 Error compiling for board DOIT ESP32 DEVKIT V1.

            ...

            ANSWER

            Answered 2020-Apr-21 at 08:37

            you should install serial package. use this code:

            Source https://stackoverflow.com/questions/61339256

            QUESTION

            not able to figure out what is wrong with my nodemcu code
            Asked 2020-Mar-21 at 10:44
            #include 
            #include 
            
            //Firebase settings
            #define FIREBASE_HOST "..........firebaseio.com/"     //cant share
            #define FIREBASE_AUTH "..............."               //cant share   
            
            //Wi-Fi settings
            #define WIFI_SSID "kello"
            #define WIFI_PASSWORD "8888"
            
            //Define trigger and echo digital pins
            const int trigPin = 4;
            const int echoPin = 3;
            
            // The amount of time the ultrassonic wave will be travelling for
            long duration = 0;
            // Define the distance variable
            double distance = 0;
            
            void setup()
            {
                 Serial.begin(9600);
                // Connect to Wi-Fi
                Serial.print("Wi-Fi...");
                WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
                Serial.print("Connecting...");
                while (WiFi.status() != WL_CONNECTED)
                {
                    Serial.print(".");
                    delay(500);
                }
                Serial.println();
                Serial.print("Connected to: ");
                Serial.println(WiFi.localIP());
            
                Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
            
                // Ultrasonic sensor, set echo as Input and trigger as Output
                pinMode(trigPin, OUTPUT);
                pinMode(echoPin, INPUT);
            
            
            }
            
            void loop()
            {
            
                getDistance();
                // Prints the distance value to the serial monitor
                Serial.print("Distance: ");
                Serial.println(distance);
            
                delay(500);
            }
            
            void getDistance()
            {
                // Clear trigPin
                digitalWrite(trigPin, LOW);
                delayMicroseconds(2);
            
                // trigPin HIGH por 10ms
                digitalWrite(trigPin, HIGH);
                delayMicroseconds(10);
                digitalWrite(trigPin, LOW);
            
                //Reads echoPin, returns the travel time of the sound wave in ms
                duration = pulseIn(echoPin, HIGH);
            
                // Calculating the distance, in centimeters, using the formula described in the first section.
                distance = duration * 0.034 / 2;
            
                // Sends the distance value to Firebase
                Firebase.setFloat("distance", distance);
            
            }
            
            ...

            ANSWER

            Answered 2020-Mar-20 at 18:33

            What you are showing is not the serial console output, but the content of the compiler result.

            When you open the serial console window in ArduinoIDE SerialMonitor right upper corner -> the little button right of the text a new window opens.

            If not you have selected the wrong comport -> select the right one in Tools->port

            If it opens, check the baud rate in the left lower corner it should match the baud rate in your program

            Source https://stackoverflow.com/questions/60758785

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install esptool

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Fluepke/esptool.git

          • CLI

            gh repo clone Fluepke/esptool

          • sshUrl

            git@github.com:Fluepke/esptool.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link