roomsense / firmware

4 stars 0 forks source link

RoomSenseIQ stops functioning after 2024.08.23 FW update #5

Closed mnejmantowicz closed 1 week ago

mnejmantowicz commented 2 weeks ago

I configured my device on the pre-installed FW. Everything was working fine. Then I updated to the latest version. The update completed successfully and then after several hours the device disconnected from he WiFi and the light is solid orange.

Can we please have instructions on how to re-flash the ESP32S3?

mnejmantowicz commented 2 weeks ago

Looks like the unit is stuck in a reboot loop:

ESP-ROM:esp32s3-20210327

Build:Mar 27 2021

rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)

Saved PC:0x40375c0c

SPIWP:0xee

mode:DIO, clock div:1

load:0x3fce3808,len:0x1674

load:0x403c9700,len:0xbb8

load:0x403cc700,len:0x2e8c

entry 0x403c9954

I (29) boot: ESP-IDF v4.4.3-2-ge1510f3354-dirty 2nd stage bootloader

I (29) boot: compile time 14:22:00

I (29) boot: chip revision: 0

I (33) boot.esp32s3: Boot SPI Speed : 80MHz

I (37) boot.esp32s3: SPI Mode : DIO

I (42) boot.esp32s3: SPI Flash Size : 8MB

I (47) boot: Enabling RNG early entropy source...

I (52) boot: Partition Table:

I (56) boot: ## Label Usage Type ST Offset Length

I (63) boot: 0 nvs WiFi data 01 02 00009000 00004000

I (71) boot: 1 otadata OTA data 01 00 0000d000 00002000

I (78) boot: 2 phy_init RF data 01 01 0000f000 00001000

I (85) boot: 3 ota_0 OTA app 00 10 00010000 00300000

I (93) boot: 4 ota_1 OTA app 00 11 00310000 00300000

I (100) boot: End of partition table

I (105) esp_image: segment 0: paddr=00310020 vaddr=3c0b0020 size=a1c54h (662612) map

I (232) esp_image: segment 1: paddr=003b1c7c vaddr=3fc9a480 size=05080h ( 20608) load

I (237) esp_image: segment 2: paddr=003b6d04 vaddr=40374000 size=09314h ( 37652) load

I (246) esp_image: segment 3: paddr=003c0020 vaddr=42000020 size=a216ch (663916) map

I (366) esp_image: segment 4: paddr=00462194 vaddr=4037d314 size=0d160h ( 53600) load

I (378) esp_image: segment 5: paddr=0046f2fc vaddr=50000000 size=00010h ( 16) load

I (387) boot: Loaded app from partition at offset 0x310000

I (387) boot: Disabling RNG early entropy source...

I (399) cpu_start: Pro cpu up.

I (399) cpu_start: Starting app cpu, entry point is 0x40375654

I (377) cpu_start: App cpu up.

I (413) cpu_start: Pro cpu start user code

I (413) cpu_start: cpu freq: 160000000

I (413) cpu_start: Application information:

I (416) cpu_start: Project name: roomsense-web

I (421) cpu_start: App version: 757eb66-dirty

I (427) cpu_start: Compile time: Aug 23 2024 13:23:36

I (433) cpu_start: ELF file SHA256: 18b33b8e375f65a2...

I (439) cpu_start: ESP-IDF: v4.4.3-2-ge1510f3354-dirty

I (445) heap_init: Initializing. RAM available for dynamic allocation:

I (452) heap_init: At 3FCA6840 len 00042ED0 (267 KiB): D/IRAM

I (459) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM

I (466) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM

I (472) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM

I (479) spi_flash: detected chip: gd

I (482) spi_flash: flash io: dio

I (487) sleep: Configure to isolate all GPIO pins in sleep state

I (493) sleep: Enable automatic switching of GPIO sleep configuration

I (500) cpu_start: Starting scheduler on PRO CPU.

I (0) cpu_start: Starting scheduler on APP CPU.

RoomSense © Production image version 20240806

I (561) system_api: Base MAC address is not set

I (561) system_api: read default base MAC address from EFUSE

I (561) MAIN: MAC address: 806599A3440C

I (561) co-sensor: STARTING CO Sensor task...

E (571) i2cdev: Could not read from device [0x4d at 0]: -1 (ESP_FAIL)

ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x4037dbd7

file: "./main/climatesense.c" line 337

func: climatesense_task

expression: measure_pm(&mpm, PM_ONE_REG, &data)

E (591) climatesense: PM reading error results -1 (ESP_FAIL)

E (601) i2cdev: Could not write to device [0x62 at 0]: -1 (ESP_FAIL)

ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x4037dbd7

file: "./main/climatesense.c" line 353

func: climatesense_task

expression: scd4x_stop_periodic_measurement(&(scd.i2c_dev))

I (601) wifi_app: STARTING WIFI APPLICATION

E (621) i2cdev: Could not write to device [0x62 at 0]: -1 (ESP_FAIL)

I (641) climatesense: scd4x_perform_self_test failed.



E (641) i2cdev: Could not write to device [0x62 at 0]: -1 (ESP_FAIL)

ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x4037dbd7

file: "./main/climatesense.c" line 369

func: climatesense_task

expression: scd4x_reinit(&(scd.i2c_dev))

I (671) pp: pp rom version: e7ae62f

I (671) net80211: net80211 rom version: e7ae62f

E (681) i2cdev: Could not write to device [0x62 at 0]: -1 (ESP_FAIL)

ESP_ERROR_CHECK_WITHOUT_ABORI (691) wifi_init: rx ba win: 6

I (691) wifi_init: tcpip mbox: 32

I (691) wifi_init: udp mbox: 6

I (701) wifi_init: tcp mbox: 6

I (701) wifi_init: tcp tx win: 5744

I (701) wifi_init: tcp rx win: 5744

I (711) wifi_init: tcp mss: 1440

I (711) wifi_init: WiFi IRAM OP enabled

I (721) wifi_init: WiFi RX IRAM OP enabled

I (721) wifi_init: LWIP IRAM OP enabled

ESP_ERROR_CHECK failed: esp_err_t 0x300b (ESP_ERR_WIFI_PASSWORD) at 0x4037dbec

file: "./main/wifi_app.c" line 235

func: wifi_app_soft_ap_config

expression: esp_wifi_set_config(ESP_IF_WIFI_AP, &ap_config)

abort() was called at PC 0x4037dbef on core 0

Backtrace: 0x40375f6e:0x3fcee270 0x4037dbf9:0x3fcee290 0x4038797a:0x3fcee2b0 0x4037dbef:0x3fcee320 0x42009571:0x3fcee340 0x4200987d:0x3fcee400 0x40380fa9:0x3fcee430

ELF file SHA256: 18b33b8e375f65a2

Rebooting...

roomsense commented 2 weeks ago

Is the issue persist after power cycle of the device? Are you able to connect to RoomSense access point?

There are also some errors for ClimateSense module. Is it connected?

mnejmantowicz commented 2 weeks ago

So, the device is now in a continuous loop as you can see from the last line. Power cycling did not help. I do NOT have a ClimateSense module. I followed the instructions on your website and applied the firmware from this repo.

tofurky commented 2 weeks ago
ESP_ERROR_CHECK failed: esp_err_t 0x300b (ESP_ERR_WIFI_PASSWORD) at 0x4037dbec

It looks like it's failing to start the AP. Maybe the area in flash where the password is stored is corrupt somehow? Apparently, that same ESP_ERR_WIFI_PASSWORD can happen if it's < 8 characters somehow.

A recovery image can be flashed via esptool.py over USB serial; I haven't tried it, though: https://github.com/roomsense/firmware/tree/main/Serial%20Flasher

mnejmantowicz commented 2 weeks ago

Thank you so much!! That worked like a charm! I have a working device now.