Hi,
I am trying to upload a large 2 MB file with the BG95 modem, which failed due to ERROR 503 Service Unavailable. The issue seems to be the communication timeout, It looks like the modem opens a socket and doesn’t transmit any data for some time. What happens inside the modem after the “CONNECT” message? Does the modem need time to encrypt the file?
Hi,
Modem won’t encrypt the data that need to transimit. Are you using TCP for data transimission? It is better to provide whole log.
Hi Rodney,
Thank you for your response. Yes, I use TCP for transmission.
Below is the log I have recorded:
AT+QIOPEN=1,0,“TCP”,“www.xxxxx.com”,80,0,2
CONNECT
POST /uploadlog/1235 HTTP/1.1
Host: www.xxxxx.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 305718
battery=%5B%7B%27timestamp%27%3A+1743025552.240812%2C+%27plc_battery_level%27%3A+2561%2C+%27hmi_battery_status%27%3A+%27OK%27%2C+%27plc_battery_status%27%3A+%27OK%27%7D%2C+%7B%27timestamp%27%3A+1743025815.551933%2C+%27plc_battery_level%27%3A+2563%2C+%27hmi_battery_status%27%3A+%27OK%27%2C+%27plc_battery_status%27%3A+%27OK%27%7D%2C+%7B%27timestamp%27%3A+1743027770…
more data…
…
HTTP/1.1 503 Service Unavailable
Connection: keep-alive
Server: Cowboy
Date: Thu, 27 Mar 2025 20:28:44 GMT
Content-Length: 506
Report-To: {“group”:“xxxxx”,“max_age”:3600,“endpoints”:[{“url”:“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”}]}
Reporting-Endpoints: heroku-nel=https://xxxxx.com/reports?ts=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Nel: {“report_to”:“xxxxx”,“max_age”:3600,“success_fraction”:0.005,“failure_fraction”:0.05,“response_headers”:[“Via”]}
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache, no-store
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Application Error</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
</head>
<body>
<iframe src="//www.xxxxx.com/error-pages/application-error.html"></iframe>
</body>
</html>
NO CARRIER
AT+QICLOSE=0
OK
You should use AT+QISEND to send data. You also should make sure the connection is created correctly before applicaiton try to send data.
But If you try to run a http application. Why do not you use http command directly? BG95 supports http protocol.
Hi Ridney, I send data in streaming mode with AT+QIOPEN=1,0,“TCP”,“www.xxxxx.com”,80,0,2
Do I need to use AT+QISEND in this case?
What is the difference between TCP and HTTP when the data is sent?
Of course you should use AT+QISEND to send data. AT+QIOPEN is just usded to create a socket connection.
If you use TCP command sets. Your application must process http protocol related task. Please refer to our guide document.
I think I am correct according to section 3.3. TCP Client Works in Transparent Access Mode in the document below:
Quectel_LTE_Standard_TCP(IP)_Application_Note_V1.1.pdf (445.1 KB)
Sorry, I though you were using buffer mode to send data. It is ok with transparent mode.
Because you try to send a lot of data. It takes long time to send over UART. Have you set any low power mode so that modem goes into deactivated mode? Please check.
Here is the device configuration:
AT&V
&C: 1
&D: 2
&F: 0
&W: 0
Q: 0
V: 1
X: 4
Z: 0
E: 1
S0: 0
S4: 10
S5: 8
S6: 2
S7: 0
S8: 2
S10: 15
S3: 13
OK
Please check device status while it returns NO CARRIER.
AT+CGREG?
AT+COPS?
AT+CSQ
AT+CGACT?
AT+QISTATE?
AT+CPSMS?
AT+QSCLK?
AT+CGREG?
+CGREG: 0,4
OK
AT+COPS?
+COPS: 0,0,“AT&T”,8
OK
AT+CSQ
+CSQ: 23,99
OK
AT+CGACT?
+CGACT: 1,1
OK
AT+QISTATE?
OK
AT+CPSMS?
+CPSMS: 0,“01100000”,“00000000”
OK
Power Saving Mode
AT+QSCLK?
+QSCLK: 0
OK