esptool | esptool.py replacement written in # golang
kandi X-RAY | esptool Summary
kandi X-RAY | esptool Summary
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
Top functions reviewed by kandi - BETA
- 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 .
esptool Key Features
esptool Examples and Code Snippets
go get github.com/fluepke/esptool
cd ${GOPATH-$HOME/go}/src/github.com/fluepke/esptool
go build
./esptool
./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
Trending Discussions on esptool
QUESTION
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:33Useful 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.
QUESTION
Getting this error while uploading:
...ANSWER
Answered 2021-Apr-30 at 15:46Could 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:
ESP TX and Arduino RX can be connected directly without any issue
QUESTION
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:43Most often provisioning fails because of drivers that aren't updated.
For macOS these would be (latest version):
- https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
- https://ftdichip.com/drivers/vcp-drivers/
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.
QUESTION
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:15You 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".
QUESTION
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:08In 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
QUESTION
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:17I 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.
QUESTION
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:01First import os library:
QUESTION
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:34There 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
QUESTION
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:37you should install serial package. use this code:
QUESTION
#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:33What 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
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install esptool
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page