QuecOpen using BC660K-GL and terminating data input

Hi,

I am using “BC660K-GL_QuecOpen_NB5_SDK_V1.0”, and need to set certificates for SSL.

Normally command [AT+QSSLCFG=0,0,“cacert”] is used, and after receiving [>] the certificate data is written. And finally data input is ended using ctrl-z.

But I have not found out how to send the certificate data and “ctrl-z”.
When I use “Ql_RIL_WriteDataToCore” inside ATCommandResponseCallback, I get result -1.
And when I use Ql_RIL_WriteDataToCore outside ATCommandResponseCallback, the QuecOpen locks up.

What is the correct way of sending data and ending data transmission?

BR Martin

equal to \1a ; * You can add \1a to the string

Hi Herbert,

That is also what I have tried to use.

I have the following test code:

static void ATResponse_Handler2(const char* pStr, u32 strLen, void* pArg)
{
  APP_DEBUG("[ATResponse_Handler2] receData=[%s]\r\n", pStr);
}


static void TestDataInput(void)
{
  APP_DEBUG("TestDataInput\r\n");

  char* certCommand = "AT+QSSLCFG=0,0,\"cacert\"\r";

  s32 res = Ql_RIL_SendATCmd(certCommand, strlen(certCommand), (Callback_ATResponse)ATResponse_Handler2, NULL, 0);

  APP_DEBUG("QSSLCFG, res=%d\r\n", res);

  osDelay(2000);

  char* certData = "*************\x1A";

  res = Ql_RIL_WriteDataToCore((char*)certData, strlen(certData));

  APP_DEBUG("\r\nRES=%d\r\n", res);

  for (;;)
  {
    osDelay(1000);

    APP_DEBUG("Done\r\n");
  }
}

And the result is:

TestDataInput
[ATResponse_Handler2] receData=[
>
]

I do not see, that the BC660K module terminates the data input.
I have used a lot of time on this issue, and do not think, that I am doing something wrong.

I also think it is strange, that the BC660K module does not execute anythink after “Ql_RIL_WriteDataToCore”.

Any help is appreciated, because I am stucked…

BR Martin

Hi, the problem is mainly caused by the current SDK does not support SSL kernel, so our local FAE needs to submit ticket process. We will release the beta version for you to test

Hi Herbert,

Thank you for quick support. Looking forward to test.

BR Martin

Hi Herbert,

I have been working with the Beta software for some time now.
When I develop a QuecOpen, which only executes commands send to BC660K via serial protocol (almost like executing the AT commands), everything seems to work.

But when I run the complete application on BC660K, the module restarts during the “SSL Open”.

I have managed to get a trace, when the issue occures (it is 100% reproduceable…), and it looks like:

What could cause the:

“Reset: Software Active Reset”
“Reset Trigger by Assert”
“Reset Write = 0xacd20ea0”

I hope you will be able to guide me regarding this issue…

Thanks

What version of software are you currently using?

AT+QGMR
ATI

What version of SDK?

Revision: BC660KGLAAR01A05_01.001.01.001

Is it normal to connect to MQTT in non-SSL mode?

Hi,
I am using SSL to access a https server.
So I am using SSL.

I am just wondering, if you could tell me a little bit more about the error:
“Reset: Software Active Reset”
“Reset Trigger by Assert”
“Reset Write = 0xacd20ea0”

What is “Software Active”? It is the software using too much CPU time?

BR Martin

Did you conduct the test based on the beta version we provided? We confirm that there are defects in the problems you gave us before

Yes, I am using the beta version, you proviede.

I can confirm, that it is possible to use SSL without issues, in the scenario, where I only perform the simple operations via QuecOpen.
When compiling the complete application, which I know is working, I see the issue, where URC are not returned to main task. “static void HandleUrcMessage(ST_MSG* msg)” is not called, when SSL commands are executed.
I would expect URCs like:

  • URC_SSL_CONFIG
  • URC_SSL_OPEN

Perhaps I am doing something wrong. That is why I am asking, if you are able to tell, when errors:
“Reset: Software Active Reset”
“Reset Trigger by Assert”
“Reset Write = 0xacd20ea0”
are reported in the Quectel part of application.

BR Martin

I think the issue is due to RAM issues…

Do you know, if the RAM statistics takes stack allocation into account?

I am able to create a small application, where SSL works, and than add some code, which is only called once during initialization (but code uses static allocated memory).

And then I am able to reproduce issue.

I have the following memory footprints:

ONLY TEST APPLICATION **********************

Memory region Used Size Region Size %age Used
LOAD_IRAM_MCUVECTOR: 100 B 100 B 100.00%
LOAD_IRAM_MCU: 4116 B 5020 B 81.99%
UNLOAD_DRAM_USRNV: 1 KB 1 KB 100.00%
LOAD_DRAM_MCU: 48 B 4 KB 1.17%
UNLOAD_DRAM_PSPHYRET: 6 KB 6 KB 100.00%
LOAD_IRAM: 35896 B 36 KB 97.37%
LOAD_DRAM_SHARED: 137464 B 152 KB 88.32%
LOAD_DRAM_BSP: 4044 B 8 KB 49.37%
UNLOAD_DRAM_FLASHMEM: 7 KB 7 KB 100.00%
UNLOAD_DRAM_SLPMEM: 224 B 992 B 22.58%
FLASH_APP: 2517728 B 2560 KB 96.04%

FULL EMBEDDED APPLICATION **********************

Memory region Used Size Region Size %age Used
LOAD_IRAM_MCUVECTOR: 100 B 100 B 100.00%
LOAD_IRAM_MCU: 4116 B 5020 B 81.99%
UNLOAD_DRAM_USRNV: 1 KB 1 KB 100.00%
LOAD_DRAM_MCU: 48 B 4 KB 1.17%
UNLOAD_DRAM_PSPHYRET: 6 KB 6 KB 100.00%
LOAD_IRAM: 35896 B 36 KB 97.37%
LOAD_DRAM_SHARED: 143960 B 152 KB 92.49%
LOAD_DRAM_BSP: 4044 B 8 KB 49.37%
UNLOAD_DRAM_FLASHMEM: 7 KB 7 KB 100.00%
UNLOAD_DRAM_SLPMEM: 224 B 992 B 22.58%
FLASH_APP: 2570936 B 2560 KB 98.07%

When reading the QuecOpen reference manual, the available APP storage is 200KB and RAM space is 30KB.

Which regions of the Memory regions relates to “APP Storage” and “RAM Space” ?

BR Martin