Is the https_request(get and post) simultaneously works on esp32..??

Reeshma
Posts: 37
Joined: Tue Mar 28, 2017 12:40 pm

Is the https_request(get and post) simultaneously works on esp32..??

Postby Reeshma » Thu Jun 15, 2017 7:58 am

Hi all, in my project , am reading the data from webserver using https_request(GET) example and if the read data is something like this(to power on the led ) and if the esp32 (power on the led) it will post an update to the webserver using https_request(POST)...but when am combining the GET and POST in my project , am getting something like this...
[0;32mI (6380) example: Connected to AP[0m
[0;32mI (6380) example: Connecting to xxxxx.com:443...[0m
[0;32mI (6660) example: Connected.[0m
[0;32mI (6660) example: Performing the SSL/TLS handshake...[0m
[0;32mI (10920) example: Verifying peer X.509 certificate...[0m
[0;33mW (10920) example: Failed to verify peer certificate![0m
[0;33mW (10920) example: verification info: ! The certificate is not correctly signed by the trusted CA
[0m
[0;32mI (10930) example: Writing HTTP request...[0m
[0;32mI (10940) example: 244 bytes written[0m
[0;32mI (10940) example: Reading HTTP response...[0m
[0;32mI (11180) example: 333 bytes read[0m
Header:

-------

HTTP/1.1 200 OK

Server: nginx

Date: Thu, 15 Jun 2017 07:52:32 GMT

Content-Type: application/json; charset=utf-8

Content-Length: 46

Connection: close

Access-Control-Allow-Origin: *

Cache-Control: no-cache

Strict-Transport-Security: max-age=31556926; includeSubDomains; preload

-------

[0;32mI (11200) example: JSON data received.[0m
[0;32mI (11200) example: parsing JSON data:[0m
pwr = on

[0;32mI (11210) example: led on.......... [0m
[0;32mI (11220) BT: Seeding the random number generator[0m
[0;32mI (11220) BT: Loading the CA root certificate...[0m
[0;32mI (11230) BT: Setting hostname for TLS session...[0m
[0;32mI (11230) BT: Setting up the SSL/TLS structure...[0m
[0;32mI (11240) BT: Connected to AP[0m
[0;32mI (11240) BT: Connecting to xxxxxxxx.com:443...[0m
[0;32mI (11490) BT: Connected.[0m
[0;32mI (11490) BT: Performing the SSL/TLS handshake...[0m
[0;32mI (13970) BT: Verifying peer X.509 certificate...[0m
[0;33mW (13970) BT: Failed to verify peer certificate![0m
[0;33mW (13970) BT: verification info: ! The certificate is not correctly signed by the trusted CA
[0m
[0;32mI (13980) BT: Writing HTTP request...[0m
[0;32mI (13990) BT: 379 bytes written[0m
[0;32mI (13990) BT: Reading HTTP response...[0m
[0;32mI (14220) BT: 317 bytes read[0m
HTTP/1.1 200 OK

Server: nginx

Date: Thu, 15 Jun 2017 07:52:36 GMT

Content-Type: application/json; charset=utf-8

Content-Length: 30

Connection: close

Access-Control-Allow-Origin: *

Cache-Control: no-cache

Strict-Transport-Security: max-age=31556926; includeSubDomains; preload



{
"www_status" : "online"
}
[0;32mI (14250) BT: connection closed[0m
[0;32mI (14350) example: Starting again![0m
[0;32mI (14350) example: Connected to AP[0m
[0;32mI (14350) example: Connecting to xxxxxxx.com:443...[0m
[0;32mI (14590) example: Connected.[0m
[0;32mI (14590) example: Performing the SSL/TLS handshake...[0m
I (15110) wifi: pm start, type:0

[0;32mI (17080) example: Verifying peer X.509 certificate...[0m
[0;33mW (17080) example: Failed to verify peer certificate![0m
[0;33mW (17080) example: verification info: ! The certificate is not correctly signed by the trusted CA
[0m
[0;32mI (17090) example: Writing HTTP request...[0m
[0;32mI (17090) example: 244 bytes written[0m
[0;32mI (17100) example: Reading HTTP response...[0m
[0;32mI (17560) example: 333 bytes read[0m
Header:

-------

HTTP/1.1 200 OK

Server: nginx

Date: Thu, 15 Jun 2017 07:52:39 GMT

Content-Type: application/json; charset=utf-8

Content-Length: 46

Connection: close

Access-Control-Allow-Origin: *

Cache-Control: no-cache

Strict-Transport-Security: max-age=31556926; includeSubDomains; preload

-------

[0;32mI (17580) example: JSON data received.[0m
[0;32mI (17580) example: parsing JSON data:[0m
pwr = on

[0;32mI (17590) example: led on.......... [0m
[0;32mI (17590) BT: free DRAM 20744 IRAM 45928[0m
[0;32mI (17600) BT: Seeding the random number generator[0m
[0;32mI (17600) BT: Loading the CA root certificate...[0m
[0;32mI (17610) BT: Setting hostname for TLS session...[0m
[0;32mI (17610) BT: Setting up the SSL/TLS structure...[0m
[0;31mE (17620) BT: mbedtls_ssl_setup returned -0x7f00

[0m
Guru Meditation Error of type StoreProhibited occurred on core 1. Exception was unhandled.
Register dump:
PC : 0x4000c46c PS : 0x00060030 A0 : 0x80163cff A1 : 0x3ffe6470
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x0000414d A5 : 0x00000000
A6 : 0x3ffe6140 A7 : 0x00000414 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x3ffce57c A11 : 0x3ffce524 A12 : 0x3ffe6364 A13 : 0x00000000
A14 : 0x00000004 A15 : 0xff000000 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000413

Backtrace: 0x4000c46c:0x3ffe6470 0x40163cff:0x3ffe6480 0x40163dd8:0x3ffe64a0 0x401149e6:0x3ffe64c0 0x40114abe:0x3ffe6f20 0x4011514a:0x3ffe6f50

Rebooting...

am getting like this , after every https_request(GET), can anyone please say...where am made a mistake

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Is the https_request(get and post) simultaneously works on esp32..??

Postby kolban » Thu Jun 15, 2017 1:37 pm

When an exception occurs while running ESP32 code, you can configure the ESP32 to log either a dump or directly enter gdb mode. In both cases, we see exactly the source line where the exception occurred. I think it might be useful to enable that additional level of debugging so that we can see which source statement is throwing the exception.

It is always good to post as much information as possible in a post and your logs are indeed very useful, however, if I may ... might I suggest posting your logs to pastebin.com and including a link to the logs in the thread rather than all the data? It makes the post so much more readable (opinion). In addition, you can also pastebin.com link other items such as the source of the application.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: Is the https_request(get and post) simultaneously works on esp32..??

Postby f.h-f.s. » Thu Jun 15, 2017 4:47 pm

Use esp-idf's make monitor, so your backtraces get resolved. http://esp-idf.readthedocs.io/en/latest ... -addresses

Also you have a error in

Code: Select all

E (17620) BT: mbedtls_ssl_setup returned -0x7f00
Which means

Code: Select all

#define MBEDTLS_ERR_SSL_ALLOC_FAILED                      -0x7F00  /**< Memory allocation failed */
https://github.com/espressif/esp-idf/bl ... /ssl.h#L91
You are probably out of memory.

the [ code ] [ / code ] tags will put your logs into a scrollable window at least use those when posting =P

Reeshma
Posts: 37
Joined: Tue Mar 28, 2017 12:40 pm

Re: Is the https_request(get and post) simultaneously works on esp32..??

Postby Reeshma » Fri Jun 16, 2017 10:53 am

Thank you all...am a beginner to this platform , hereafter i will paste the codes and output like as your suggestion

Who is online

Users browsing this forum: Google [Bot] and 381 guests