Page 1 of 1

The SSL communication between the Wi-Fi module ESP8266 and Firebase stopped working (via AT commands) . Why?

Posted: Tue Jul 13, 2021 12:26 am
by Nemo Resh
We have a project that uses the esp8266 -01 wifi module to send SSL messages to the Firebase Real time database. The messages are sent using AT commands.

Everything worked perfectly for months, until one day, the communication failed!
It failed after we send the command:
AT + CIPSTART = "SSL", "project-name.firebaseio.com", 443
For which we received the response:
ERROR CLOSE
D.

Do you have any ideas what could be the reason for the problem?

Notes:
1.We connected the Wi Fi module directly to the computer and tried to run the sequence of AT commands in Tera Term, and again, we got the
ERROR CLOSED
error after sending the command: CIPSTART
2.We manage to send TCP messages without any problem. Only the SSL is causing us trouble.
3.We saw online mention of fingerprints, we never used it, and it used to work.
4.We saw online that increase SSLSIZE can help, But we have already increased to the maximum size (4096)

Thanks in advance!

Re: The SSL communication between the Wi-Fi module ESP8266 and Firebase stopped working (via AT commands) . Why?

Posted: Tue Jul 13, 2021 9:14 am
by ESP_Alson
Could you provide the version of ESP-AT ? I've just tested it on our v2.2.0.0 version. It can connect through SSL。

I have some questions and want to consult you:
1. Have you modified the files in the AT project, especially the SSL certificate files?
2. Could you provide us with the completed capture file for analysis?
3. Could you try the v2.2.0.0 version?

Re: The SSL communication between the Wi-Fi module ESP8266 and Firebase stopped working (via AT commands) . Why?

Posted: Tue Jul 13, 2021 10:04 am
by Nemo Resh
Thank you for your reply!

We used AT Instruction set version 3.0.3 (Espressif System, 2020) https://www.espressif.com/sites/default ... set_en.pdf

1. Our ESP is connected via STM32 microcontroller, We have been using the factory default.  We don't have any special AT/SSL certificate files.
2. We don't have any capture file that we are aware of.
3. Up until now we didn't download any code to the ESP (but for months it worked anyway). We didn't have a way to connect the ESP8266 -01 directly to the PC (just via the STM32). 
Recently we purchased ESP8266MOD, which can be connected directly to the PC. 
Do you think that if we download v2.2.0.0 version to the ESP8266MOD device, it will work? We aren't completely sure how to do it, do you have any referral files?

Notes:
1. We have a few ESP8266 -01, and the SSL handshake stopped working with all of them on the same day.
2. The order of AT commands we used were:

Code: Select all

AT+RST\r\n
AT+CWMODE = 1\r\n
AT+CWJAP = <NETWORK_NAME>, <ACCESS_CODE> \r\n
AT+CIPSSLSIZE = 4096 \r\n
AT+CIPSTART = "SSL","project-name.firebaseio.com",443 \r\n
                    ------> we got here the "ERROR CLOSED" error
AT+CIPSEND = <DATA_LENGTH>
>
https://<project-name.firebaseio.com>/devices/device_ID/history.json?auth=<auth_key>

Recv X bytes

SEND OK

+IPD,318:HTTP/1.1 200 OK.....
Thank you!!!