Azure / embedded-wireless-framework

Microsoft's Embedded Wireless Framework is a design concept that enables users to abstract application code from host port drivers and communication adapter drivers primarily in microcontroller-based projects.
MIT License
63 stars 31 forks source link

Quectel BG96 - ERROR: Modem reception failed. #20

Closed rwsanders closed 1 year ago

rwsanders commented 1 year ago

I am using a BG96 with the B-U585I-IOT02A development board. I have tested both using the X-CUBE-AZURE project provided by ST.

The ewf_info_tx_bg96_stmod project executes without error. The ewf_test_tx_bg96_stmod project produces errors. The ewf_telemetry_basic_tx_bg96_stmod project produces the same "Modem reception failed." error as the first error from the test project.

I have copied the console output from the test execution with added masking on IP addresses.

Waiting for BG96 modem to be ready after power ON
Modem Ready!!!
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   5][ATE0\r]
[RECV][  11][ATE0\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  10][AT+CMEE=1\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  11][AT+QISDE=0\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  22][AT+QMTCFG="ssl",0,1,2\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  24][AT+QMTCFG="version",0,4\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  13][AT+QSSLSTATE\r]
[RECV][   6][\r\nOK\r\n]
[SEND][   9][AT+CPIN?\r]
[RECV][  22][\r\n+CPIN: READY\r\n\r\nOK\r\n]
[SEND][   8][AT+CFUN=]
[SEND][   1][1]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][   9][AT+CFUN?\r]
[RECV][  18][\r\n+CFUN: 1\r\n\r\nOK\r\n]
[SEND][  12][AT+QICSGP=1\r]
[RECV][  31][\r\n+QICSGP: 1,"","","",0\r\n\r\nOK\r\n]
[SEND][  14][AT+QIDNSCFG=1\r]
[RECV][   9][\r\nERROR\r\n]
[SEND][  10][AT+QIACT?\r]
[RECV][   6][\r\nOK\r\n]
[SEND][   9][AT+QIACT=]
[SEND][   1][1]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  10][AT+QIACT?\r]
[RECV][  39][\r\n+QIACT: 1,1,1,"10.XXX.YYY.172"\r\n\r\nOK\r\n]
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][TCP]
[SEND][   2][",]
[SEND][   1]["]
[SEND][  17][www.microsoft.com]
[SEND][   2][",]
[SEND][   2][80]
[SEND][   1][,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   2][0\r]
[RECV][   6][\r\nOK\r\n]
[URC^][   2][\r\n]
[URCv][   2][\r\n]
[URC^][  14][+QIOPEN: 0,0\r\n]
[URCv][  14][+QIOPEN: 0,0\r\n]
[SEND][  13][AT+QISTATE=1,]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][  68][\r\n+QISTATE: 0,"TCP","23.XXX.YYY.185",80,32410,2,1,0,0,"uart1"\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  24][\r\n+QISEND: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   2][42]
[SEND][   1][\r]
[RECV][   4][\r\n> ]
[SEND][  42][GET / HTTP/1.1\r\nHost:www.microsoft.com\r\n\r\n]
[RECV][  11][\r\nSEND OK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  26][\r\n+QISEND: 42,0,42\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[URC^][   2][\r\n]
[URCv][   2][\r\n]
[URC^][  18][+QIURC: "recv",0\r\n]
[URCv][  18][+QIURC: "recv",0\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  28][\r\n+QIRD: 1294,0,1294\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  26][\r\n+QISEND: 42,42,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  28][\r\n+QIRD: 1294,0,1294\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   4][1460]
[SEND][   1][\r]
[RECV][1317][\r\n+QIRD: 1294\r\nHTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Type: text/html\r\nETag: "6082151bd56ea922e1357f5896a90d0a:1425454794"\r\nLast-Modified: Wed, 04 Mar 2015 07:39:54 GMT\r\nServer: AkamaiNetStorage\r\nContent-Length: 1020\r\nDate: Mon, 06 Mar 2023 22:54:32 GMT\r\nConnection: keep-alive\r\n\r\n<html><head><title>Microsoft Corporation</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"></meta><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><meta name="SearchTitle" content="Microsoft.com" scheme=""></meta><meta name="Description" content="Get product information, support, and news from Microsoft." scheme=""></meta><meta name="Title" content="Microsoft.com Home Page" scheme=""></meta><meta name="Keywords" content="Microsoft, product, support, help, training, Office, Windows, software, download, trial, preview, demo,  business, security, update, free, computer, PC, server, search, download, install, news" scheme=""></meta><meta name="SearchDescription" content="Microsoft.com Homepage" scheme=""></meta></head><body><p>Your current User-Agent string appears to be from an automated process, if this is incorrect, please click this link:<a href="http://www.microsoft.com/en/us/default.aspx?redir=true">United States English Microsoft Homepage</a></p></body></html>\r\n\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  26][\r\n+QISEND: 42,42,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  28][\r\n+QIRD: 1294,1294,0\r\n\r\nOK\r\n]
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]

ERROR:
[C:/e/src/ewf_interface.c]:[1076]
function: [ewf_interface_drop_response]

Modem reception failed.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[50]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/HTTP test: ewf_result -102.
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][TCP]
[SEND][   2][",]
[SEND][   1]["]

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[59]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/echo test: ewf_result -1.
[SEND][  10][AT+QIACT?\r]
[RECV][   9][\r\nERROR\r\n]

ERROR:
[C:/e/src/ewf_adapter_quectel_common_info.c]:[176]
function: [ewf_adapter_quectel_common_get_ipv4_address]

Unexpected response format.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[68]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/client-server test: ewf_result -50.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[23]
function: [ewf_adapter_test]

Failed to run the adapter TCP test: ewf_result -50.
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][UDP]
[SEND][   2][",]
[SEND][   1]["]

ERROR:
[C:/e/src/ewf_adapter_quectel_common_internet.c]:[457]
function: [_ewf_adapter_quectel_common_internet_socket_send]

Filed to open the UDP socket.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[89]
function: [ewf_adapter_test_api_udp]

Failed to run the adapter UDP/echo test: ewf_result -1.
[SEND][  10][AT+QIACT?\r]
[RECV][   9][\r\nERROR\r\n]

ERROR:
[C:/e/src/ewf_adapter_quectel_common_info.c]:[176]
function: [ewf_adapter_quectel_common_get_ipv4_address]

Unexpected response format.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[98]
function: [ewf_adapter_test_api_udp]

Failed to run the adapter UDP/client-server test: ewf_result -50.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[30]
function: [ewf_adapter_test]

Failed to run the adapter UDP test: ewf_result -50.

ERROR:
[C:/e/src/test/ewf_adapter_quectel_common_test.c]:[92]
function: [ewf_adapter_quectel_common_test]

Failed to run the adapter common tests: ewf_result -50.
[SEND][  10][AT+QIACT?\r]
[RECV][  39][\r\n+QIACT: 1,1,1,"10.139.59.172"\r\n\r\nOK\r\n]
[SEND][  11][AT+QIDEACT=]
[SEND][   1][1]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  10][AT+QIACT?\r]
[RECV][   6][\r\nOK\r\n]

Done!
..............................
rwsanders commented 1 year ago

one thing ill point out is that the AT command for DNS configuration seems to be failing... [SEND][ 14][AT+QIDNSCFG=1\r] [RECV][ 9][\r\nERROR\r\n]

I have tried a few different things where I specify the DNS addresses AT+QIDNSCFG=1,\"8.8.8.8\",\"8.8.4.4\"\r but that results in an ERROR as well. I'm not sure if all the tests fail due to a cascade in errors from this one.

rwsanders commented 1 year ago

I noticed that the order of the AT commands in the code conflicts with the order of the AT commands in Quectel's docs. image

The code activates the PDP context AFTER the AT+QIDNSCFG command is sent. https://github.com/Azure/embedded-wireless-framework/blob/5d15b928bbb228f57da93f97bd1077ab77b86885/src/test/ewf_adapter_quectel_common_test.c#L36

    /* TCP/IP */
    if (ewf_result_failed(result = ewf_interface_send_command(interface_ptr, "AT+QICSGP=1\r"))) return result;
    if (ewf_result_failed(result = ewf_interface_drop_response(interface_ptr))) return result;

    /* DNS */
    if (ewf_result_failed(result = ewf_interface_send_command(interface_ptr, "AT+QIDNSCFG=1\r"))) return result;
    if (ewf_result_failed(result = ewf_interface_drop_response(interface_ptr))) return result;

    if (ewf_result_failed(result = ewf_adapter_quectel_common_context_activate(adapter_ptr, EWF_CONFIG_CONTEXT_ID)))
    {
        EWF_LOG("[WARNING][Failed to activate the context.]\n");
    }

If I move this PDP context activation before the DNS configuration command I get one less error in the AT+ command back and forth. I still have many test errors following.

Here is my new output.

Waiting for BG96 modem to be ready after power ON
Modem Ready!!!
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   9][AT\r\r\nOK\r\n]
[SEND][   5][ATE0\r]
[RECV][  11][ATE0\r\r\nOK\r\n]
[SEND][   3][AT\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  10][AT+CMEE=1\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  11][AT+QISDE=0\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  22][AT+QMTCFG="ssl",0,1,2\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  24][AT+QMTCFG="version",0,4\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  13][AT+QSSLSTATE\r]
[RECV][   6][\r\nOK\r\n]
[SEND][   9][AT+CPIN?\r]
[RECV][  22][\r\n+CPIN: READY\r\n\r\nOK\r\n]
[SEND][   8][AT+CFUN=]
[SEND][   1][1]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][   9][AT+CFUN?\r]
[RECV][  18][\r\n+CFUN: 1\r\n\r\nOK\r\n]
[SEND][  12][AT+QICSGP=1\r]
[RECV][  31][\r\n+QICSGP: 1,"","","",0\r\n\r\nOK\r\n]
[SEND][  10][AT+QIACT?\r]
[RECV][   6][\r\nOK\r\n]
[SEND][   9][AT+QIACT=]
[SEND][   1][1]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  10][AT+QIACT?\r]
[RECV][  40][\r\n+QIACT: 1,1,1,"10.XXX.YYY.160"\r\n\r\nOK\r\n]
[SEND][  14][AT+QIDNSCFG=1\r]
[RECV][  54][\r\n+QIDNSCFG: 1,"100.XXX.YYY.10","100.XXX.YYY.10"\r\n\r\nOK\r\n]
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][TCP]
[SEND][   2][",]
[SEND][   1]["]
[SEND][  17][www.microsoft.com]
[SEND][   2][",]
[SEND][   2][80]
[SEND][   1][,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   2][0\r]
[RECV][   6][\r\nOK\r\n]
[URC^][   2][\r\n]
[URCv][   2][\r\n]
[URC^][  14][+QIOPEN: 0,0\r\n]
[URCv][  14][+QIOPEN: 0,0\r\n]
[SEND][  13][AT+QISTATE=1,]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][  67][\r\n+QISTATE: 0,"TCP","23.XXX.YYY.164",80,21539,2,1,0,0,"uart1"\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  24][\r\n+QISEND: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   2][42]
[SEND][   1][\r]
[RECV][   4][\r\n> ]
[SEND][  42][GET / HTTP/1.1\r\nHost:www.microsoft.com\r\n\r\n]
[RECV][  11][\r\nSEND OK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  26][\r\n+QISEND: 42,0,42\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  22][\r\n+QIRD: 0,0,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[URC^][  20][\r\n+QIURC: "recv",0\r\n]
[URCv][  20][\r\n+QIURC: "recv",0\r\n]
[RECV][  28][\r\n+QIRD: 1294,0,1294\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  26][\r\n+QISEND: 42,42,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  28][\r\n+QIRD: 1294,0,1294\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   4][1460]
[SEND][   1][\r]
[RECV][1317][\r\n+QIRD: 1294\r\nHTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Type: text/html\r\nETag: "6082151bd56ea922e1357f5896a90d0a:1425454794"\r\nLast-Modified: Wed, 04 Mar 2015 07:39:54 GMT\r\nServer: AkamaiNetStorage\r\nContent-Length: 1020\r\nDate: Tue, 07 Mar 2023 16:58:34 GMT\r\nConnection: keep-alive\r\n\r\n<html><head><title>Microsoft Corporation</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"></meta><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><meta name="SearchTitle" content="Microsoft.com" scheme=""></meta><meta name="Description" content="Get product information, support, and news from Microsoft." scheme=""></meta><meta name="Title" content="Microsoft.com Home Page" scheme=""></meta><meta name="Keywords" content="Microsoft, product, support, help, training, Office, Windows, software, download, trial, preview, demo,  business, security, update, free, computer, PC, server, search, download, install, news" scheme=""></meta><meta name="SearchDescription" content="Microsoft.com Homepage" scheme=""></meta></head><body><p>Your current User-Agent string appears to be from an automated process, if this is incorrect, please click this link:<a href="http://www.microsoft.com/en/us/default.aspx?redir=true">United States English Microsoft Homepage</a></p></body></html>\r\n\r\n\r\nOK\r\n]
[SEND][  10][AT+QISEND=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  26][\r\n+QISEND: 42,42,0\r\n\r\nOK\r\n]
[SEND][   8][AT+QIRD=]
[SEND][   1][0]
[SEND][   3][,0\r]
[RECV][  28][\r\n+QIRD: 1294,1294,0\r\n\r\nOK\r\n]
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]

ERROR:
[C:/e/src/ewf_interface.c]:[1077]
function: [ewf_interface_drop_response]

Modem reception failed.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[50]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/HTTP test: ewf_result -102.
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][TCP]
[SEND][   2][",]
[SEND][   1]["]

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[59]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/echo test: ewf_result -1.
[SEND][  10][AT+QIACT?\r]
[RECV][   9][\r\nERROR\r\n]

ERROR:
[C:/e/src/ewf_adapter_quectel_common_info.c]:[176]
function: [ewf_adapter_quectel_common_get_ipv4_address]

Unexpected response format.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[68]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/client-server test: ewf_result -50.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[23]
function: [ewf_adapter_test]

Failed to run the adapter TCP test: ewf_result -50.
[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][UDP]
[SEND][   2][",]
[SEND][   1]["]

ERROR:
[C:/e/src/ewf_adapter_quectel_common_internet.c]:[457]
function: [_ewf_adapter_quectel_common_internet_socket_send]

Filed to open the UDP socket.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[89]
function: [ewf_adapter_test_api_udp]

Failed to run the adapter UDP/echo test: ewf_result -1.
[SEND][  10][AT+QIACT?\r]
[RECV][   9][\r\nERROR\r\n]

ERROR:
[C:/e/src/ewf_adapter_quectel_common_info.c]:[176]
function: [ewf_adapter_quectel_common_get_ipv4_address]

Unexpected response format.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[98]
function: [ewf_adapter_test_api_udp]

Failed to run the adapter UDP/client-server test: ewf_result -50.

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[30]
function: [ewf_adapter_test]

Failed to run the adapter UDP test: ewf_result -50.

ERROR:
[C:/e/src/test/ewf_adapter_quectel_common_test.c]:[92]
function: [ewf_adapter_quectel_common_test]

Failed to run the adapter common tests: ewf_result -50.
[SEND][  10][AT+QIACT?\r]
[RECV][  40][\r\n+QIACT: 1,1,1,"10.XXX.YYY.160"\r\n\r\nOK\r\n]
[SEND][  11][AT+QIDEACT=]
[SEND][   1][1]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  10][AT+QIACT?\r]
[RECV][   6][\r\nOK\r\n]

Done!
rwsanders commented 1 year ago

Further digging into the issue

[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]

ERROR:
[C:/e/src/ewf_interface.c]:[1077]
function: [ewf_interface_drop_response]

Modem reception failed.

I added a delay to rule out a race condition. This resolves that error, but I never get a good feeling fixing something with a delay. And it did not resolve any of the other issues.

[SEND][  11][AT+QICLOSE=]
[SEND][   1][0]
[SEND][   1][\r]
[RECV][   6][\r\nOK\r\n]
[SEND][  12][AT+QIOPEN=1,]
[SEND][   1][0]
[SEND][   1][,]
[SEND][   1]["]
[SEND][   3][TCP]
[SEND][   2][",]
[SEND][   1]["]

ERROR:
[C:/e/src/test/ewf_adapter_test.c]:[59]
function: [ewf_adapter_test_api_tcp]

Failed to run the adapter TCP/echo test: ewf_result -1.
[SEND][  10][AT+QIACT?\r]
[RECV][   9][\r\nERROR\r\n]

There are plenty more errors downstream. It looks like I was able to fix some upstream errors however resolving this did not have the cascading effect of resolving anything downstream that I was hoping for.

Hopefully someone else has some success. This project would be extremely beneficial if it worked!

andrejm-rtos commented 1 year ago

The Quectel support code has been updated. Hopefully this fulfills your needs.