cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Problems with Nx_TCP_Echo_Client

MiEx13
Associate II

hello

We have some problems to run the "32L496GDISCOVERY\Nx_TCP_Echo_Client" from the "STM32CubeExpansion_CELLULAR_V7.0.0" package (with AZURE RTOS).

What we did so far: we changed the entries in "plf_cellular_config.h" to meet the requirements of our SIM card provider (APN, username, password).

Than we built and deployed this project (successfully) to our P_L496G-CELL02 board with Tera Term attached to the VCP of the eval board.

What we see here is the folowing log:

===== X-Cube-Cellular version : X-CUBE-CELLULAR-7.0.0 =====

BG96 UART config: BaudRate=115200 / HW flow ctrl=1

DNS Server address: 8.8.8.8

SNTP Time Sync...0.pool.ntp.org

SysCtrl_BG96:Waiting 5500 millisec for modem running...

SysCtrl_BG96:...done

Modem Boot OK, sim slot nb 0

SysCtrl_BG96:MODEM SIM SOCKET SELECTED

ATCore ERROR:AT_sendcmd error

ATCore ERROR:AT_sendcmd error: parse from rsp

LOG ERROR #1: channel=1 / errorId=11 / gravity=2

LOG ERROR #2: channel=1 / errorId=14 / gravity=2

LOG ERROR #3: channel=2 / errorId=1 / gravity=2

Modem Boot OK, sim slot nb 0

SysCtrl_BG96:MODEM SIM SOCKET SELECTED

ATCore ERROR:AT_sendcmd error

ATCore ERROR:AT_sendcmd error: parse from rsp

LOG ERROR #4: channel=1 / errorId=11 / gravity=2

LOG ERROR #5: channel=1 / errorId=14 / gravity=2

LOG ERROR #6: channel=2 / errorId=1 / gravity=2

If we enter the "cst state" comamnd into TeraTerm, we see, that APN, username and pasword have been set correctly.

What could cause this behaviour and these error messages? What are we doing wrong?

The documentation for the CELL and AZURE package

What is strange:

if we run the "32L496GDISCOVERY\Cloud\Azure\" project from the "STM32CubeExpansion_Cloud_AZURE_V1.2.1" package

with exactly the same provider settings (APN etc.), we can connect to our AZURE IoT Hub and exchange data and commands with the device without any problems!

regards

Michael

9 REPLIES 9
MiEx13
Associate II

hi all

because there is no answer to my problem yet, i will aks a more specific question:

What is the meaning of the error messages that I see on my terminal?

And what causes them?

I mean these errors:

SysCtrl_BG96:MODEM SIM SOCKET SELECTED

ATCore ERROR:AT_sendcmd error

ATCore ERROR:AT_sendcmd error: parse from rsp

LOG ERROR #10: channel=1 / errorId=11 / gravity=2

LOG ERROR #11: channel=1 / errorId=14 / gravity=2

LOG ERROR #12: channel=2 / errorId=1 / gravity=2

best regards

Michael

S.RA
ST Employee

Dear Michael,

Such Error is returned when the Modem does not answer to the AT command.

So, either the Modem is busy, for example to search network or other ongoing task, or the communication with the Modem is not longer operational.

To get more detail, can you please enable the trace to get more information?

For that in the file plf_sw_config.h

you can set trace flags as defined below. Then share the log for further analysis?

#define USE_TRACE_SYSCTRL          (1U)

#define USE_TRACE_ATCORE          (1U)

#define USE_TRACE_ATPARSER         (1U)

#define USE_TRACE_ATDATAPACK        (1U)

#define USE_TRACE_ATCUSTOM_MODEM      (1U)

#define USE_TRACE_ATCUSTOM_COMMON      (1U)

#define USE_TRACE_ATCUSTOM_SPECIFIC     (1U)

#define USE_TRACE_CELLULAR_SERVICE     (1U)  

Solofo

MiEx13
Associate II

Hi Solofo

Thank you for your answer. If I enable the traces you mentioned, I get the attached log (LogCellularDemo_01.txt).

There seems to be an issue with the SIM?

--> But if I run the Cloud_AZURE_V1.2.1 demo on the same eval-board (P_L496G-CELL02) with the same APN settings, it works fine:

Signal Level: -53 dBm

Retrieving the cellular operator: "Swisscom Swisscom"

Module initialized successfully: Quectel

- Network Interface started:

- Network Interface connected:

....

Connecting to www.gandi.net at ipaddress: 151.101.193.103

Configuring the RTC from Date: Wed, 27 Jul 2022 05:50:01 GMT

...

any idea?

regards

Michael

HAarz.1
Associate II

I am also facing the same issue with Nx_TCP_Echo_Client. After the modifications in the file plf_sw_config.h, it can be vividly seen that the error is of SIM FAILURE because AT+QCCID command is unable to provide any response in STM32CubeExpansion_CELLULAR_V7.0.0.

0693W00000QMGDEQA5.jpg 

But if we use other firmware "STM32CubeFunctionPack_LTE1_V1.1.0" use the AT+QCCID command its working fine. The SIM is connecting to the network and able to provide feedback.

0693W00000QMGDnQAP.jpg 

To sum up, the issue is in "STM32CubeExpansion_CELLULAR_V7.0.0" application.

MiEx13
Associate II

Hi HAarz.1

Thank you very much for your response and hint. So at the moment it seems to be useless to continue with this part of firmware until STM has fixed the Cellular Expansion.

(didn't they tested the demo before release?)

I am very curious what is happening next...

S.RA
ST Employee

Hello Michael and Al,

Based on the log you have shared, the Modem FW is old BG96MAR02A06M1G and the new version of X-CUBE-CELLULAR needs BG96MAR02A08M1G. In fact, the X-CUBE-CELLULAR starting from 6.0.0 it will automatically select the APN based on the inserted SIM card. So, it needs to read the ICCID and IMSI while the Modem is in AT+CFUN=4 (RF not used).

So, to use the X-CUBE-CELLULAR, you have to update the Modem FW.

The procedure to update Modem FW is available in the X-CUBE-CELLULAR V6.0.0 and you can find the material at STM32CubeExpansion_CELLULAR_V6.0.0\Utilities\Modem_FW\BG96\.

The Quectel Tools (QFLASH, Drivers, ..) can be downloaded here https://www.quectel.com/ProductDownload/BG96.html

Best Regards

Solofo

MiEx13
Associate II

Hi Solofo

I am back in the project again. Thank you for your hint about the BG96 firmware version.

I have downloaded the X-CUBE-CELLULAR V6.0.0 to get the new modem firmware, than I downloaded the BG96.zip from the Quectel link you provided.

(By the way, the links provided in the "How to flash BG96 board.pdf" from the Cellular V6.0.0 package are not working any more: file not found error).

After that, I installed the BG96 USB driver as described, flashed my P-L496G-CELL02 board with the "L496_modem_boot.bin" image as described and than connected the Modem with USB cable to my PC.

Than I started the "QFlash_V4.19.exe" as administrator as described in the Quectel documentation. I choosed the Quectel USB DM Port (COM8) with a speed of 460800 also as described in the Quectel documentation.

Than I opened the firmware file as shown in your screenshot in "How to flash BG96 board.pdf" -> "NPRG9x06.mbn".

Everything seems to be ok, but if I hit [Start], it shows "waiting...", counts to 5s and than displys the error at+qmbncfg="list" FAIL.

There is no description of this particular error in the Quectel documentation.

The terminal output of the P-L496G-CELL02 board shows the following last messages:

-> BG96:>>>>> ................................. <<<<<

-> *********** MODEM ON ********

-> Subscribe modems events

What is the problem here? What am I doing wrong?

regards

Michael

MiEx13
Associate II

hi all, hi Solofo

Short information:

I finaly managed to update the BG96 firmware to BG96MAR02A08M1G and now the Echo_Client demo works fine.

But:

This was only possible with help from Quectel because the folder- and file-structure in the firmware .ZIP (BG96MAR02A08M1G_01.012.01.012.zip) provided from STM in the X-CUBE-CELLULAR V6.0.0 extension is completeley wrong and will never work in QFlash according information from the Quectel supporter.

Regards

Michael

MK.17
Associate
  • 0693W00000Y8y8HQAR.pngDo we have an answer for this. I have got a P-L496G-CELL02 and I am facing same issues as well. I think its the issue with the QUECTEL BG96 module.