Closed Flow76320 closed 8 months ago
Actually, this worked like a charm for months... But since I wanted to add a case for everything, the ESP seems to be corrupted. My soldering was quite poor for the external antena and it just broke. I made a new one and then...
Hi,
How do you flash the firmware ?
Using another microUSB cable helped.
Hi,
Thanks for your fast answer.
I flashed with EspHome from HA, and reset with esptool.py from Espressif website.
I changed the USB cable too
Le jeu. 14 sept. 2023, 13:43, Peter Siebler @.***> a écrit :
Actually, this worked like a charm for months... But since I wanted to add a case for everything, the ESP seems to be corrupted. My soldering was quite poor for the external antena and it just broke. I made a new one and then...
Hi,
How do you flash the firmware ?
Using another microUSB cable helped.
— Reply to this email directly, view it on GitHub https://github.com/zibous/ha-watermeter/issues/21#issuecomment-1719291380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB62BIMNMRNJ2EWAUAZFIADX2LUURANCNFSM6AAAAAA4X6GRRY . You are receiving this because you authored the thread.Message ID: @.***>
I flashed with EspHome from HA, and reset with esptool.py from Espressif website.
Ohh, This explains to some, HA ESPHome is currently unstable and there are some reports that flashing devices and creating firmware is not working !
Here you can test firmware. I would flash with "ESPHOME Flasher".
Firmware : https://github.com/zibous/ha-watermeter/tree/master/esphome/testcases
ESPHOME Flasher: https://github.com/esphome/esphome-flasher/releases
This is good to know.
I tried with https://web.esphome.io/, click "prepare for first use" which was fine. Next I used "Install" with your firmware water-meter-esp32-izar-test.bin https://github.com/zibous/ha-watermeter/blob/master/esphome/testcases/water-meter-esp32-izar-test.bin
Got:
[ 7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz,
APB: 80000000 Hz [ 40][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino
Event: 0 - WIFI_READY [ 136][V][WiFiGeneric.cpp:338] _arduino_event_cb():
STA Started [ 137][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event:
2 - STA_START [ 1033][V][WiFiGeneric.cpp:390] _arduino_event_cb(): AP
Started [ 3285][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 10
- AP_START [ 3289][V][WiFiGeneric.cpp:393] _arduino_event_cb(): AP Stopped [
3292][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 11 - AP_STOP [
3299][V][WiFiGeneric.cpp:390] _arduino_event_cb(): AP Started [
3304][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 10 -
AP_START [ 8566][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done:
ID: 128, Status: 0, Results: 7 [ 8566][D][WiFiGeneric.cpp:929]
_eventCallback(): Arduino Event: 1 - SCAN_DONE [
10919][V][WiFiGeneric.cpp:353] _arduino_event_cb(): STA Connected: SSID:
Flo_WIFI, BSSID: c0:f4:e6:66:cf:d3, Channel: 5, Auth: WPA2_PSK [
10921][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 4 -
STA_CONNECTED [ 11923][V][WiFiGeneric.cpp:367] _arduino_event_cb(): STA Got
New IP:192.168.1.10 [ 11924][D][WiFiGeneric.cpp:929] _eventCallback():
Arduino Event: 7 - STA_GOT_IP [ 11927][D][WiFiGeneric.cpp:991]
_eventCallback(): STA IP: 192.168.1.10, MASK: 255.255.255.0, GW:
192.168.1.254 [ 11944][V][WiFiGeneric.cpp:393] _arduino_event_cb(): AP
Stopped [ 11945][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event:
11 - AP_STOP E (34240) task_wdt: Task watchdog got triggered. The following
tasks did not reset the watchdog in time: E (34240) task_wdt: - loopTask
(CPU 1) E (34240) task_wdt: Tasks currently running: E (34240) task_wdt:
CPU 0: IDLE E (34240) task_wdt: CPU 1: loopTask E (34240) task_wdt:
Aborting. abort() was called at PC 0x400fe918 on core 0
Backtrace:0x400838d9:0x3ffbeadc
|<-CORRUPTED
If I install directly without "prepare for first use", I got:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT) invalid header:
0x00000000 invalid header: 0x00000000 invalid header: 0x00000000 invalid
header: 0x00000000 invalid header: 0x00000000 invalid header:
0x00000000 invalid
header: 0x00000000 invalid header: 0x00000000 ets Jul 29 2019 12:21:46
Meanwhile, I also changed the AZ delivery board...
After the card change, I had another try for Esp Home / HA v2023.8.3. It says the code is successfully uploaded, but no sensor nore the manual IP address I configured is used. Very strange behaviour.
Thanks again for your help
Le jeu. 14 sept. 2023 à 15:36, Peter Siebler @.***> a écrit :
I flashed with EspHome from HA, and reset with esptool.py from Espressif website.
Ohh, This explains to some, HA ESPHome is currently unstable and there are some reports that flashing devices and creating firmware is not working !
Here you can test firmware. I would flash with "ESPHOME Flasher".
Firmware : https://github.com/zibous/ha-watermeter/tree/master/esphome/testcases
ESPHOME Flasher: https://github.com/esphome/esphome-flasher/releases
— Reply to this email directly, view it on GitHub https://github.com/zibous/ha-watermeter/issues/21#issuecomment-1719468937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB62BILUUG77F6OJGQEISFLX2MB5RANCNFSM6AAAAAA4X6GRRY . You are receiving this because you authored the thread.Message ID: @.***>
After the card change, I had another try for Esp Home / HA v2023.8.3
Esp Home / HA v2023.8.3 do not work, try the test firmware from:
Firmware : https://github.com/zibous/ha-watermeter/tree/master/esphome/testcases Firmware was build with ESPHOME Docker.
I would flash with "ESPHOME Flasher".
Backtrace Decoder : https://maximeborges.github.io/esp-stacktrace-decoder/
Hi,
Yes I tried your firmware. The logs are those from my previous comment. I installed it with web esp home
Le ven. 15 sept. 2023, 07:32, Peter Siebler @.***> a écrit :
After the card change, I had another try for Esp Home / HA v2023.8.3
Esp Home / HA v2023.8.3 do not work, try the test firmware from:
Firmware : https://github.com/zibous/ha-watermeter/tree/master/esphome/testcases
I build this with ESPHOME Docker.
— Reply to this email directly, view it on GitHub https://github.com/zibous/ha-watermeter/issues/21#issuecomment-1720701079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB62BIIL5ANVXG7SVIICXJLX2PR7TANCNFSM6AAAAAA4X6GRRY . You are receiving this because you authored the thread.Message ID: @.***>
Yes I tried your firmware. The logs are those from my previous comment. I installed it with web esp home
Negativ, do not use "web esp home" use the ESPHOME Flasher.
If I flash the firmware water-meter-esp32-izar-test.bin with "web esp home - chrome browser" then I get the same error message.
But if I flash it with the "ESP Home Flasher 1.2.0" then it works without any error messages.
https://github.com/esphome/esphome-flasher/releases/tag/v1.2.0 With all other flash tools I cannot flash the firmware properly.
Using '/dev/cu.SLAB_USBtoUART' as serial port.
Connecting........_
Detecting chip type... ESP32
Connecting........_
Chip Info:
- Chip Family: ESP32
- Chip Model: ESP32D0WDQ5 (revision 3)
- Number of Cores: 2
- Max CPU Frequency: 240MHz
- Has Bluetooth: YES
- Has Embedded Flash: NO
- Has Factory-Calibrated ADC: YES
- MAC Address: C8:F0:9E:F3:47:94
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
- Flash Size: 4MB
- Flash Mode: dio
- Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Chip erase completed successfully in 12.8s
Compressed 15872 bytes to 10319...
Writing at 0x00001000... (100 %)Wrote 15872 bytes (10319 compressed) at 0x00001000 in 0.2 seconds (effective 518.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Writing at 0x00008000... (100 %)Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.0 seconds (effective 1490.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4513.9 kbit/s)...
Hash of data verified.
Compressed 970880 bytes to 634084...
Writing at 0x000a8000... (100 %)Wrote 970880 bytes (634084 compressed) at 0x00010000 in 15.2 seconds (effective 510.4 kbit/s)...
Hash of data verified.
Leaving...
Hard Resetting...
Done! Flashing is complete!
Showing logs:
[09:57:17][ 7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[09:57:17][ 34][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[09:57:20][ 200][V][WiFiGeneric.cpp:390] _arduino_event_cb(): AP Started
[09:57:20][ 2451][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 10 - AP_START
[09:57:20][ 2455][V][WiFiGeneric.cpp:393] _arduino_event_cb(): AP Stopped
[09:57:20][ 2458][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 11 - AP_STOP
[09:57:20][ 2466][V][WiFiGeneric.cpp:390] _arduino_event_cb(): AP Started
[09:57:20][ 2471][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 10 - AP_START
[09:57:20][ 2482][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[09:57:20][ 2483][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
New Testcase using https://web.esphome.io/ with chrome browser.
Works for me.
Result:
Hi,
The flash / update OTA is successful. The device is stable when I keep the CC1101 unplugged.
Just after the antenna plug in and device reboot, the device is looping again because of corruption
[ 10784][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 4 -
STA_CONNECTED [ 11791][V][WiFiGeneric.cpp:367] _arduino_event_cb(): STA Got
New IP:192.168.1.10 [ 11791][D][WiFiGeneric.cpp:929] _eventCallback():
Arduino Event: 7 - STA_GOT_IP [ 11794][D][WiFiGeneric.cpp:991]
_eventCallback(): STA IP: 192.168.1.10, MASK: 255.255.255.0, GW:
192.168.1.254 [ 11809][V][WiFiGeneric.cpp:393] _arduino_event_cb(): AP
Stopped [ 11810][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event:
11 - AP_STOP E (33946) task_wdt: Task watchdog got triggered. The following
tasks did not reset the watchdog in time: E (33946) task_wdt: - loopTask
(CPU 1) E (33946) task_wdt: Tasks currently running: E (33946) task_wdt:
CPU 0: IDLE E (33946) task_wdt: CPU 1: loopTask E (33946) task_wdt:
Aborting. abort() was called at PC 0x400fe918 on core 0
Backtrace:0x400838d9:0x3ffbeadc
|<-CORRUPTED ELF file SHA256: 0000000000000000 Rebooting... ets Jul 29 2019
12:21:46
After the first use preparation and antenna plugged in, no such logs.
Le ven. 15 sept. 2023 à 13:09, Peter Siebler @.***> a écrit :
New Testcase using https://web.esphome.io/
- Connect to the device
- Prepare for first use
- When finish set the local WIFI and "Visit Device"
- OTA Update water-meter-esp32-izar-test.bin
Works for me.
[image: Bildschirmfoto 2023-09-15 um 13 05 12] https://user-images.githubusercontent.com/30198737/268262699-58665f6c-dd27-4347-89ea-eeca2d1a1d25.png
Result:
[image: Bildschirmfoto 2023-09-15 um 13 08 13] https://user-images.githubusercontent.com/30198737/268262829-adde5ec3-0bcd-45cb-ab18-d71f5a0b8e2d.png
— Reply to this email directly, view it on GitHub https://github.com/zibous/ha-watermeter/issues/21#issuecomment-1721093729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB62BIPIBQDMDT3RRHKVRL3X2QZNRANCNFSM6AAAAAA4X6GRRY . You are receiving this because you authored the thread.Message ID: @.***>
The flash / update OTA is successful. The device is stable when I keep the CC1101 unplugged.
In any case, it looks like a bad connection to CC1101, misplaced pins, or a failed CC1101. see: https://github.com/SzczepanLeon/esphome-components/issues/17
Yep it looks like I had some defective wires. I managed to get it stable for a while until I move it ahah.
Thanks for your help!
Le dim. 17 sept. 2023, 14:59, Peter Siebler @.***> a écrit :
The flash / update OTA is successful. The device is stable when I keep the CC1101 unplugged.
In any case, it looks like a bad connection to CC1101, misplaced pins, or a failed CC1101. see: SzczepanLeon/esphome-components#17 https://github.com/SzczepanLeon/esphome-components/issues/17
— Reply to this email directly, view it on GitHub https://github.com/zibous/ha-watermeter/issues/21#issuecomment-1722471846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB62BIIGKRT7HKGK626LJVLX23X4FANCNFSM6AAAAAA4X6GRRY . You are receiving this because you authored the thread.Message ID: @.***>
Hi @zibous,
Tell me if you want me to open a new issue. I've received and tested a new E07-900MBL-01 rev v.1.1 to replace the CC1101 cards, tested 2 ESP32, and I still got the corruptions.
After some investigations, they only appear when calling
wmbus:
mosi_pin: GPIO23 ## SI: braun 3: MOSI Attached to Hardware SPI controller MOSI SPI Interface
miso_pin: GPIO19 ## SO: grün 5: MISO Attached to Hardware SPI controller MISO SPI Interface
clk_pin: GPIO18 ## SCLK: violett 4: SCK Attached to Hardware SPI controller CLK
cs_pin: GPIO05 ## CSN: orange 8: CSN Attached to Hardware SPI controller
gdo0_pin: GPIO16 ## GD00: gelb 7: RX Clock output. High Impedance !
gdo2_pin: GPIO17 ## GD02: weiss 6: TX FIFO status signals. High Impedance !
log_unknown: False
I've built the testing code with Web ESP Home and from Docker container, then it can't be related to the compiler. The pins are good, are I've tested providing power to the network card by the integrated USB or from 3.3V of ESP32. Cables are all brand new too.
Here is the wired setup
By any chance, may you have another idea?
Hi @zibous!
Thanks for this work/tuto, this works like a charm!
Actually, this worked like a charm for months... But since I wanted to add a case for everything, the ESP seems to be corrupted. My soldering was quite poor for the external antena and it just broke. I made a new one and then...
It reboots all the time.
I've checked my soldering, made new ones, changes the CC1101. Interesting point is that when I remove 3v3 for the CC1101, boot loops stop.
Any idea on how to fix this?
Thanks 🙏