I am trying to acces to some server, to get json responses trough https.
I get the responses perfectly the 90% of the time... but sometimes it launch this:
I (11320) wifi station: Start https_request example
I (11320) wifi station: https_request using crt bundle
E (11330) esp-tls: couldn't get hostname for :api.coingecko.com:
E (11340) esp-tls: Failed to open new connection
E (11340) wifi station: Connection failed...
I (11350) wifi station: Finish https_request example
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandle
d.
Core 0 register dump:
PC : 0x40086529 PS : 0x00060d30 A0 : 0x800867ff A1 : 0x3f
fd4080
0x40086529: get_coin at C:\Users\Nasib\eclipse-workspace\gpio\build/../main/gpio
_example_main.c:760
A2 : 0x3ffc9fac A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00
000000
A6 : 0x00000000 A7 : 0x3ffcc9c0 A8 : 0x80086529 A9 : 0x3f
fd4060
A10 : 0x00000000 A11 : 0x3f003978 A12 : 0x3f002fd4 A13 : 0x00
000000
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000004 EXCCAUSE: 0x00
00001c
EXCVADDR: 0x00000018 LBEG : 0x3f002fd4 LEND : 0x00000000 LCOUNT : 0x40
026065
0x40026065: _xt_user_exc at C:/Users/Nasib/Desktop/esp-idf/components/freertos/x
tensa/xtensa_vectors.S:627
Backtrace:0x40086526:0x3ffd4080 0x400867fc:0x3ffd40b0 0x40084163:0x3ffd4110 0x40
02bcd5:0x3ffd4140
0x40086526: get_coin at C:\Users\Nasib\eclipse-workspace\gpio\build/../main/gpio
_example_main.c:760
0x400867fc: app_main at C:\Users\Nasib\eclipse-workspace\gpio\build/../main/gpio
_example_main.c:898 (discriminator 2)
0x40084163: main_task at C:/Users/Nasib/Desktop/esp-idf/components/esp32s2/cpu_s
tart.c:453 (discriminator 2)
0x4002bcd5: vPortTaskWrapper at C:/Users/Nasib/Desktop/esp-idf/components/freert
os/xtensa/port.c:143
ELF file SHA256: 87782f649b840315
Rebooting...
I dont know why the system reboots...
And sometimes if i let the system rebooting and trying again and again to acess that server through https it says this:
I (3570) wifi station: Start https_request example
I (3580) wifi station: https_request using crt bundle
Traceback (most recent call last):
File "C:/Users/Nasib/Desktop/esp-idf/tools/idf_monitor.py", line 520, in main_
loop
item = self.cmd_queue.get_nowait()
File "queue.py", line 198, in get_nowait
File "queue.py", line 167, in get
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Nasib/Desktop/esp-idf/tools/idf_monitor.py", line 1087, in <mod
ule>
main()
File "C:/Users/Nasib/Desktop/esp-idf/tools/idf_monitor.py", line 991, in main
monitor.main_loop()
File "C:/Users/Nasib/Desktop/esp-idf/tools/idf_monitor.py", line 523, in main_
loop
item = self.event_queue.get(True, 0.03)
File "queue.py", line 179, in get
File "threading.py", line 306, in wait
KeyboardInterrupt
Aborted!
Could anyone help me please ((((
Thank you a lot in advance
https request reboot ...
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: https request reboot ...
Looks like the hostname couldn't be resolved, which sometimes happens. Your own code really doesn't like that and crashes around the line indicated in the backtrace. You should handle a network failure properly, e.g. by retrying.
-
- Posts: 11
- Joined: Wed Jun 23, 2021 2:22 pm
Re: https request reboot ...
Thanks a lot for your response.
I am using exatly the same coda as in the https request idf example... the rebooting is normal there ?
I am using exatly the same coda as in the https request idf example... the rebooting is normal there ?
Re: https request reboot ...
What hardware and power supply are you using? It could be a power issue, since the power consumption is somewhat spiky, particularly with TLS.
Who is online
Users browsing this forum: No registered users and 173 guests