BC66 OpenCPU Ql_RIL_SendATCmd CTRL+Z

Some AT commands for BC66 (probably other hardware as well) have this:

//Input the content
//Tap "CTRL+Z" to send.

For example

AT+QSSLCFG=1,5,"cacert"

I struggle to send such commands using OpenCPU’s function Ql_RIL_SendATCmd

Ql_sprintf(cmd, "AT+QSSLCFG=1,5,\"cacert\");
Ql_RIL_SendATCmd(cmd, Ql_strlen(cmd), ATResponse_Handler, nullptr, 0);

ATResponse_Handler is not being called and execution blocks. What is the correct way of doing this?

Hi, have you initialized the RIL before? here is a piece of code that works for me:

while (TRUE)
{
Ql_OS_GetMessage(&msg);
switch(msg.message)
{
case MSG_ID_RIL_READY:
{
Ql_RIL_Initialize();
char* cmd0 = “AT+CMEE=2”;
ret = Ql_RIL_SendATCmd(cmd0, sizeof(cmd0), ATResponse_Handler, NULL, 0);
APP_DEBUG("<-- cmd0 ret0 :%d -->\r\n",ret);
break;
}

}

When the system boots up, your user code will get a message from the system that indicated the RIL is ready to be used. I guess it is not really necessary because it happens in no time, but i think it just looks “nicer”

Yes, I am calling Ql_RIL_Initialize()

Most of the AT commands that I am using work fine

AT+QBAND
AT+QIDNSCFG
AT+COPS

But when I try AT+QSSLCFG, it hangs

I see, what does QSSLCFG do? I couldn’t find it here: https://www.quectel.com/UploadImage/Downlad/Quectel_BC66&BC66-NA_AT_Commands_Manual_V2.0.pdf

AT+QSSLCFG command is described in the document: Quectel_BC66&BC66-NA_SSL_Application_Note_V1.0.pdf

I received the document when I asked Quectel support if it was possible to use MQTT with TLS security. I got the answer that it is possible.