AT command - error 922 using HTTPS server


I want to connect to an HTTPS server using AT commands, which I can do with a simple HTTP server.

The problem is that to connect to an HTTP server, I have to use AT+KHTTPCFG=1,"" and for an HTTPS server AT+KHTTPCFG=1,"",443,2.
The problem with the latter is that every time I use AT+KHTTPGET=1,"/" I get an error code 907 (Generic error) and AT+KHTTPPOST=1,,"/".I get an error code 922 (Error due to invalid state of session), I also get a KHTTP_ERROR:1,5 for all commands that interact with the server.

Also, I have seen that the AT+KCERTSTORE command can be useful but when I use it, my program freeze.

There should be no problem on using AT+KCERTSTORE:

Hi jyijyi
For the ‘AT+KCERTSTORE’ command, I initialize it with just one parameter ‘AT+KCERTSTORE=0’.
I am missing the number of bytes to read/write, thanks for the help.

But I still have my problem with errors!

you can see here for successful case:

I took a look, and it may help me solve some problem.
I will try