energietransitie / needforheat-generic-firmware

Common source code (library) for NeedForHeat measurement devices
https://www.energietransitiewindesheim.nl/needforheat-generic-firmware/
Apache License 2.0
4 stars 1 forks source link

Wifi credentials not erased by 10 sec longpress #16

Closed MarcoW71 closed 2 years ago

MarcoW71 commented 3 years ago

Wifi credentials not erased by 10 sec longpress.. Terminal log after long press on TTGO boot button:

14:33:03.635 -> SCD41: CRC: 81 14:33:17.154 -> SCD41: Warning: ASC not disabled (0xb213) 14:33:30.623 -> SCD41: Serial number: 195794682576896 14:33:30.658 -> �[0;32mI (28668) gpio: GPIO[19]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 �[0m 14:33:30.705 -> �[0;32mI (28678) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2 �[0m 14:33:30.705 -> �[0;32mI (28678) Twomes Generic Firmware Library ESP32: Button Press Duration is Here!�[0m 14:33:30.705 -> �[0;31mE (28688) Twomes Heartbeat Test Application ESP32: Succesfully opened NVS twomes_storage!�[0m 14:33:30.705 -> �[0;32mI (28698) Twomes Heartbeat Test Application ESP32: The PoP has been initialized already! 14:33:30.705 -> �[0m 14:33:30.705 -> �[0;32mI (28708) Twomes Heartbeat Test Application ESP32: The PoP is: 3339047 14:33:30.743 -> �[0m 14:33:30.743 -> �[0;32mI (28718) Twomes Heartbeat Test Application ESP32: POP: 3339047�[0m 14:33:30.743 -> I (28738) wifi:wifi driver task: 3ffc41a4, prio:23, stack:6656, core=0 14:33:30.743 -> �[0;32mI (28738) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE�[0m 14:33:30.743 -> �[0;32mI (28738) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE�[0m 14:33:30.790 -> I (28768) wifi:wifi firmware version: 3ea4c76 14:33:30.790 -> I (28768) wifi:config NVS flash: enabled 14:33:30.790 -> I (28768) wifi:config nano formating: disabled 14:33:30.790 -> I (28768) wifi:Init dynamic tx buffer num: 32 14:33:30.790 -> I (28778) wifi:Init data frame dynamic rx buffer num: 32 14:33:30.790 -> I (28778) wifi:Init management frame dynamic rx buffer num: 32 14:33:30.790 -> I (28788) wifi:Init management short buffer num: 32 14:33:30.790 -> I (28788) wifi:Init static rx buffer size: 1600 14:33:30.790 -> I (28798) wifi:Init static rx buffer num: 10 14:33:30.843 -> I (28798) wifi:Init dynamic rx buffer num: 32 14:33:30.843 -> �[0;32mI (28798) Twomes Generic Firmware Library ESP32: Already provisioned, starting Wi-Fi STA�[0m 14:33:30.943 -> �[0;32mI (28908) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0�[0m 14:33:30.943 -> I (28908) wifi:mode : sta (8c:aa:b5:85:a7:c8) 14:33:31.043 -> I (29038) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 14:33:31.043 -> I (29038) wifi:state: init -> auth (b0) 14:33:31.090 -> I (29078) wifi:state: auth -> assoc (0) 14:33:31.143 -> I (29108) wifi:state: assoc -> run (10) 14:33:31.243 -> I (29258) wifi:connected with @@@@@@@@, aid = 3, channel 6, BW20, bssid = @@@@@@@@@ 14:33:31.290 -> I (29258) wifi:security: WPA2-PSK, phy: bgn, rssi: -85 14:33:31.290 -> I (29258) wifi:pm start, type: 1 14:33:31.290 -> 14:33:31.344 -> I (29328) wifi:AP's beacon interval = 102400 us, DTIM period = 1 14:33:32.691 -> �[0;32mI (30678) Twomes Generic Firmware Library ESP32: Connected with IP Address:192.168.2.222�[0m 14:33:32.691 -> �[0;32mI (30678) esp_netif_handlers: sta ip: 192.168.2.222, mask: 255.255.255.0, gw: 192.168.2.254�[0m 14:33:32.691 -> �[0;32mI (30678) Twomes Generic Firmware Library ESP32: Time is not set yet. Connecting to WiFi and getting time over NTP.�[0m 14:33:32.691 -> �[0;32mI (30698) Twomes Generic Firmware Library ESP32: Initializing SNTP�[0m 14:33:32.744 -> �[0;32mI (30698) Twomes Generic Firmware Library ESP32: Waiting for system time to be set... (1/10)�[0m 14:33:34.694 -> �[0;32mI (32708) Twomes Generic Firmware Library ESP32: Waiting for system time to be set... (2/10)�[0m 14:33:36.700 -> �[0;32mI (34708) Twomes Generic Firmware Library ESP32: Waiting for system time to be set... (3/10)�[0m 14:33:37.755 -> �[0;32mI (35738) Twomes Generic Firmware Library ESP32: Notification of a time synchronization event�[0m 14:33:38.703 -> �[0;32mI (36708) Twomes Generic Firmware Library ESP32: The current date/time in Amsterdam is: Wed Jun 9 14:33:38 2021�[0m 14:33:38.703 -> �[0;32mI (36708) Twomes Heartbeat Test Application ESP32: Getting time!�[0m 14:33:38.757 -> �[0;32mI (36708) Twomes Heartbeat Test Application ESP32: Time is: 1623242018�[0m 14:33:38.757 -> �[0;31mE (36718) Twomes Generic Firmware Library ESP32: Succesfully opened NVS twomes_storage!�[0m 14:33:38.757 -> �[0;32mI (36728) Twomes Generic Firmware Library ESP32: The bearer has not been initialized yet!�[0m 14:33:38.757 -> �[0;32mI (36738) Twomes Heartbeat Test Application ESP32: Bearer not found, activating device!�[0m 14:33:38.757 -> �[0;32mI (36748) Twomes Generic Firmware Library ESP32: { "proof_of_presence_id":"3339047"}�[0m 14:33:43.765 -> �[0;31mE (41728) Twomes Generic Firmware Library ESP32: Status Code: 422 Response Length: 100�[0m 14:33:43.765 -> �[0;31mE (41738) Twomes Generic Firmware Library ESP32: Response: {"detail":[{"loc":["body","activation_token"],"msg":"field required","type":"value_error.missing"}]}⸮⸮⸮?�⸮⸮?⸮⸮O⸮�[0m 14:33:43.765 -> �[0;32mI (41748) Twomes Generic Firmware Library ESP32: HTTP_EVENT_DISCONNECTED�[0m 14:33:43.765 -> �[0;31mE (41758) Twomes Generic Firmware Library ESP32: Failed to activate device!�[0m 14:33:43.765 -> �[0;31mE (41758) Twomes Generic Firmware Library ESP32: Succesfully opened NVS twomes_storage!�[0m 14:33:43.765 -> �[0;32mI (41768) Twomes Generic Firmware Library ESP32: The bearer has not been initialized yet!�[0m 14:33:43.812 -> I (41778) ESPNOW: espnow [version: 1.0] init 14:33:43.812 -> peer mac: 24:62:ab:d7:16:1c 14:33:43.812 -> I (41798) wifi:state: run -> init (0) 14:33:43.812 -> I (41798) wifi:pm stop, total sleep time: 3711479 us / 12538359 us 14:33:43.812 -> 14:33:43.812 -> I (41798) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 14:33:43.812 -> �[0;32mI (41808) Twomes Generic Firmware Library ESP32: Disconnected. Connecting to the AP again...�[0m 14:33:43.866 -> I (41858) wifi:flush txq 14:33:43.866 -> I (41858)

henriterhofte commented 3 years ago

@MarcoW71 I tried it on fw release V1.6.1 and it seems to work fine. Initially, I thought I also experienced the issue you decribed, but then I realized that I was holding the RST button (the one on the side of the TTGO), not the BOOT buitton (the one 'above' the USB-port, between the headers). When I held the BOOT button, things worked fine.

henriterhofte commented 3 years ago

@MarcoW71 informed me that he pressed boot and not reset.

Ghraemdal commented 3 years ago

@MarcoW71 gebruikte je alleen de Generic Firmware of een combinatie van Generic als een library of iets anders? En had je hardware op de ESP32 zitten, een shield oid?

henriterhofte commented 2 years ago

Tested on Nov 6; https://trello.com/c/5yONxVpa/154-does-the-10s-long-button-press-work-in-practice-including-renewed-provisioning ok now