espressif / esp-google-iot

Google Cloud IoT SDK as an ESP-IDF Component
Apache License 2.0
143 stars 44 forks source link

connection closed - reason 17! ERROR! Connection has failed reason 33 (CA-56) #14

Closed tremblayraphael29 closed 4 years ago

tremblayraphael29 commented 4 years ago

Hello,

When I implement the code from the "smart_outlet" example, everything is fine. However, after an hour, the terminal indicates an error.

     connection closed - reason 17!
     ERROR!  Connection has failed reason 33

Here is the whole terminal :

I (28) boot: ESP-IDF v4.2-dev-910-g4fe04f115 2nd stage bootloader
I (29) boot: compile time 15:27:27
I (29) boot: chip revision: 1
I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (85) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: chip revision: 1, min. application chip revision: 0
I (104) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x20064 (131172) map
I (163) esp_image: segment 1: paddr=0x0003008c vaddr=0x3ffb0000 size=0x04034 ( 16436) load
I (170) esp_image: segment 2: paddr=0x000340c8 vaddr=0x40080000 size=0x00404 (  1028) load
0x40080000: _WindowOverflow4 at C:/Users/raphn/Desktop/esp/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730

I (170) esp_image: segment 3: paddr=0x000344d4 vaddr=0x40080404 size=0x0bb44 ( 47940) load
I (199) esp_image: segment 4: paddr=0x00040020 vaddr=0x400d0020 size=0x96054 (614484) map
0x400d0020: _stext at ??:?

I (433) esp_image: segment 5: paddr=0x000d607c vaddr=0x4008bf48 size=0x09558 ( 38232) load
0x4008bf48: rcGetSched at ??:?

I (462) boot: Loaded app from partition at offset 0x10000
I (462) boot: Disabling RNG early entropy source...
I (462) cpu_start: Pro cpu up.
I (466) cpu_start: Application information:
I (471) cpu_start: Project name:     smart_outlet
I (476) cpu_start: App version:      0aae347-dirty
I (482) cpu_start: Compile time:     Mar 30 2020 15:36:50
I (488) cpu_start: ELF file SHA256:  77088104b2e2a27b...
I (494) cpu_start: ESP-IDF:          v4.2-dev-910-g4fe04f115
I (500) cpu_start: Starting app cpu, entry point is 0x400814e0
0x400814e0: call_start_cpu1 at C:/Users/raphn/Desktop/esp/esp-idf/components/esp32/cpu_start.c:277

I (0) cpu_start: App cpu up.
I (510) heap_init: Initializing. RAM available for dynamic allocation:
I (517) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (523) heap_init: At 3FFB9F38 len 000260C8 (152 KiB): DRAM
I (530) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (536) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (542) heap_init: At 400954A0 len 0000AB60 (42 KiB): IRAM
I (549) cpu_start: Pro cpu start user code
I (567) spi_flash: detected chip: generic
I (567) spi_flash: flash io: dio
W (568) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (578) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (665) APP: ESP_WIFI_MODE_STA
I (675) wifi:wifi driver task: 3ffc19e4, prio:23, stack:3584, core=0
I (675) system_api: Base MAC address is not set
I (675) system_api: read default base MAC address from EFUSE
I (695) wifi:wifi firmware version: 89341b9
I (695) wifi:wifi certification version: v7.0
I (695) wifi:config NVS flash: enabled
I (695) wifi:config nano formating: disabled
I (705) wifi:Init dynamic tx buffer num: 32
I (705) wifi:Init data frame dynamic rx buffer num: 32
I (715) wifi:Init management frame dynamic rx buffer num: 32
I (715) wifi:Init management short buffer num: 32
I (725) wifi:Init static rx buffer size: 1600
I (725) wifi:Init static rx buffer num: 10
I (725) wifi:Init dynamic rx buffer num: 32
I (735) APP: start the WIFI SSID:[TELUS1212-2.4G]
I (835) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0
I (835) wifi:mode : sta (24:6f:28:17:14:14)
I (845) APP: Waiting for wifi
I (2175) wifi:new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (3135) wifi:state: init -> auth (b0)
I (3135) wifi:state: auth -> assoc (0)
I (3145) wifi:state: assoc -> run (10)
I (3165) wifi:connected with TELUS1212-2.4G, aid = 9, channel 11, BW20, bssid = fc:2b:b2:c9:f1:b2
I (3165) wifi:security type: 3, phy: bgn, rssi: -48
I (3165) wifi:pm start, type: 1

I (3255) wifi:AP's beacon interval = 102400 us, DTIM period = 3
I (5665) esp_netif_handlers: sta ip: 192.168.1.80, mask: 255.255.255.0, gw: 192.168.1.254
I (5665) APP: Initializing SNTP
I (5665) APP: Waiting for system time to be set...
I (7675) APP: Waiting for system time to be set...
I (9675) APP: Time is set...
I (9675) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
connected!
subscribe to topic: "/devices/esp32_171414/commands/#"
subscribe to topic: "/devices/esp32_171414/config"
I (19645) APP: Subscription Topic: /devices/esp32_171414/commands/#

I (19645) APP: Message Payload:

I (19685) APP: Subscription Topic: /devices/esp32_171414/config

I (19685) APP: Message Payload:

I (19685) APP: value: 4

I (19695) APP: Subscription Topic: /devices/esp32_171414/config

I (19695) APP: Message Payload: {"outlet": 1}

I (19695) APP: value: 1

I (19705) APP: Subscription Topic: /devices/esp32_171414/config

I (19705) APP: Message Payload: {"outlet": 1}

I (19715) APP: value: 1

I (39715) APP: publishing msg "{temp : 23}" to topic: "/devices/esp32_171414/events"

I (59995) APP: publishing msg "{temp : 23}" to topic: "/devices/esp32_171414/events"

I (80105) APP: publishing msg "{temp : 22}" to topic: "/devices/esp32_171414/events"

I (100235) APP: publishing msg "{temp : 29}" to topic: "/devices/esp32_171414/events"

I (119355) APP: publishing msg "{temp : 20}" to topic: "/devices/esp32_171414/events"

I (139475) APP: publishing msg "{temp : 28}" to topic: "/devices/esp32_171414/events"

I (159585) APP: publishing msg "{temp : 22}" to topic: "/devices/esp32_171414/events"

I (179735) APP: publishing msg "{temp : 26}" to topic: "/devices/esp32_171414/events"

I (199915) APP: publishing msg "{temp : 26}" to topic: "/devices/esp32_171414/events"

I (220035) APP: publishing msg "{temp : 29}" to topic: "/devices/esp32_171414/events"

I (240165) APP: publishing msg "{temp : 21}" to topic: "/devices/esp32_171414/events"

I (259465) APP: publishing msg "{temp : 21}" to topic: "/devices/esp32_171414/events"

I (279795) APP: publishing msg "{temp : 23}" to topic: "/devices/esp32_171414/events"

I (299945) APP: publishing msg "{temp : 25}" to topic: "/devices/esp32_171414/events"

I (320055) APP: publishing msg "{temp : 28}" to topic: "/devices/esp32_171414/events"

I (339305) APP: publishing msg "{temp : 23}" to topic: "/devices/esp32_171414/events"

I (359425) APP: publishing msg "{temp : 20}" to topic: "/devices/esp32_171414/events"

I (379625) APP: publishing msg "{temp : 26}" to topic: "/devices/esp32_171414/events"

I (399745) APP: publishing msg "{temp : 29}" to topic: "/devices/esp32_171414/events"

I (419865) APP: publishing msg "{temp : 22}" to topic: "/devices/esp32_171414/events"

I (439985) APP: publishing msg "{temp : 27}" to topic: "/devices/esp32_171414/events"

I (460105) APP: publishing msg "{temp : 27}" to topic: "/devices/esp32_171414/events"

I (480235) APP: publishing msg "{temp : 22}" to topic: "/devices/esp32_171414/events"

I (499345) APP: publishing msg "{temp : 28}" to topic: "/devices/esp32_171414/events"

I (519475) APP: publishing msg "{temp : 20}" to topic: "/devices/esp32_171414/events"

I (539595) APP: publishing msg "{temp : 23}" to topic: "/devices/esp32_171414/events"

I (559715) APP: publishing msg "{temp : 29}" to topic: "/devices/esp32_171414/events"

I (579825) APP: publishing msg "{temp : 22}" to topic: "/devices/esp32_171414/events"

I (600215) APP: publishing msg "{temp : 24}" to topic: "/devices/esp32_171414/events"

connection closed - reason 17!
ERROR!  Connection has failed reason 33
ivanfp commented 4 years ago

Hi! I'm dealing with the same issue. Could you solve it?

Gohith commented 4 years ago

Hey mate, did you got the solution for the above problem?

Right now I am facing same problem, unlike in your case I am having problem at starting itself (open failed error) (after connect function used in MQTT task)