Comments (11)
@seeya is this with the latest deployed version that you observed this issue?
from esptool-js.
@adwait-esp yes, I cloned the latest version and tested again it's the same. It seems like the board didn't connect properly causing the variable this.chip
to be null.
from esptool-js.
@seeya , are you able to perform other operations - like erase flash or get to the console with the same attached chip?
from esptool-js.
@adwait-esp yes, using the flasher tool from Espressif Systems (https://www.espressif.com/en/support/download/other-tools), I'm able to flash the firmware.bin
file at 0x1000
.
Also with PlatformIO there's no issue.
from esptool-js.
Same issue for me. Going to the live demo code at: https://espressif.github.io/esptool-js/. Plugin an ESP32, connect, select a firmware binary, and click program and nothing happens and in the Chrome developer tools console I see:
ESPLoader.js:1288 Uncaught (in promise) TypeError: Cannot read property 'BOOTLOADER_FLASH_OFFSET' of null
at ESPLoader._update_image_flash_params (ESPLoader.js:1288)
at ESPLoader.write_flash (ESPLoader.js:1358)
at HTMLInputElement.programButton.onclick (index.js:279)
from esptool-js.
Its a timing thing. If i put a breakpoint here and just click continue when it stops there then it doesn't get that "Cannot read property" error any more. Still doesn't flash the ESP32 though, when I click program nothing happens and no errors in the Javascript console.
from esptool-js.
Same issue here, on latest Chrome
from esptool-js.
What is the state of this project in general? Is main
a working branch, or should we be using another one? I don't see how it even CAN work, e.g. connecting causes an infinite loop here
There's no way to ever break out of this loop unless there's a timeout:
while (1) {
try {
const res = await this.transport.read({timeout: 1000});
i += res.length;
//console.log("Len = " + res.length);
//var str = new TextDecoder().decode(res);
//this.log(str);
} catch (e) {
if (e === "timeout") {
break;
}
}
await this._sleep(50);
}
unless I'm missing something entirely obvious/subtle, the loop above should read:
while (1) {
// loop until we read something from the device successfully
try {
const res = await this.transport.read({timeout: 1000});
break; // successful read
} catch (e) {
if (e === "timeout") {
// caught and (expected) error, will continue to attempt connecting.
continue;
}
// caught a real error
throw e
}
await this._sleep(50);
}
from esptool-js.
This project is being maintained and the branch "gh_pages" which serves the https://espressif.github.io/esptool-js/ has the latest updated code.
We have observed intermittent connection issues for some revisions of ESP32 chipsets and we are working to resolve the same. Can you please let us know which ESP32 chipset you are trying to connect to?
from esptool-js.
It seems to me that the tool might be able to use some polishing, especially concerning handling of error cases and reporting on progress.
My main intention of writing here is to check whether it would make sense to contribute here, or if there are already people working on these (tbh rather obvious) deficits.
The boards I'm using are about as plain vanilla as it gets, e.g. in front of me is a WROOM Devkit, with a Silicon Labs CP210x Bridge:
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
but also on a variety of known good devices and different bridges (at least FTDI), all of which work fine even at high baud rates with the same cable and esptool.py
Out of curiosity, which chipsets/devkits are you using that work?
The connect/sync works sometimes if run at the lowest baud rate. Even when it works, it takes a long time and provides no feedback during connection / sync. And not indication when an error occured. Typically, it's necessary to press Connect twice, because the connect procedure is stuck in the loop described above.
Even in the cases where the connect works, the upload fails. Again with no error indication.
from esptool-js.
Above issues have been addressed. It now correctly raises if an unsupported chip is passed in (chip == null
) and with #33 the latest UI issues has been fixed. Give it a try and please open new issues if you find some.
from esptool-js.
Related Issues (20)
- Use stubs from esp-flasher-stub project
- Issue with ESP32-S3 and Baudrate 115200 HOT 2
- Live Demo no longer working HOT 4
- Make esptool-js available on Android device. HOT 3
- 使用这个工具烧录ESP8266总是失败 HOT 1
- Compatibiity With Electron HOT 4
- Provide Support For All SerialOptions While Opening Port Of Device (Web Serial API) HOT 1
- Separate environment specific bindings and make esptool-js usable from Node.js environment HOT 2
- Error: Cannot read properties of undefined (reading 'BOOTLOADER_FLASH_OFFSET') HOT 2
- Using this tool to burn MicroPython firmware on ESP8266 always fails HOT 4
- Browser module imports don't work HOT 7
- package.json library decleration leads esbuild to incorrectly importing index.js as a CommonJS file HOT 3
- Why was the Buffer dependency added? HOT 1
- Lolin S2 mini : Error: Invalid custom reset sequence HOT 1
- "unsupported command error"
- Monitor for ESP32-C6 HOT 7
- Timeout connecting, but works on adafruit version of esptool-js HOT 3
- When the flash is erased and the power is accidentally cut off, the connection will be stuck in "connecting..." HOT 2
- Flashing S3 via CDC does not work reliable HOT 19
- Is there any interest in supporting flashing of TinyUSB devices? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esptool-js.