Thanks jerdung and Sierra_klin2,
I have not managed to update the firmware of the HL8548 on my PCB, because I do not have the proper hardware.
However, I have purchased a MangOH Red board with an HL8548 modem with firmware version 5.24. Then, I have repeated the same test of sending successive pictures to a server via HTTP, using a script from my PC that sends the commands to the MangOH Red via USB. And I got the same error: Suddenly, sending an image to the server fails, and the modem freezes and is not responding. So it is not a firmware version problem.
It cannot be an error in the way the commands are sent, since it is something repetitive and I have managed to upload images to the server. Anyway, I attach the command flow I use:
AT
OK
AT+KIPOPT=1,0
OK
AT+KCNXCFG=1,“GPRS”,“gprs-service.com”,“none”,“none”,“IPV4”,“0.0.0.0”,“0.0.0.0”,“0.0.0.0”
OK
AT+KCNXTIMER=1,60,2,70
OK
AT+KCNXPROFILE=1
OK
AT+CGATT=1
OK
-> Setting HTTP addr…
AT+KHTTPCFG=1,“my_http_server”,80,0
+KHTTPCFG: 1
OK
+KCNX_IND: 1,6
+KCNX_IND: 1,1,0
+KHTTP_IND: 1,1
-> Sending HTTP header…
AT+KHTTPHEADER=1
CONNECT
cache-control: no-cache
Content-Type: multipart/form-data; boundary=--------------------------800559106013275992937575
Authorization: Token token=“my_token”
Accept: /
accept-encoding: gzip, deflate
content-length: 107347
Connection: keep-alive
–EOF–Pattern–
OK
AT+KHTTPPOST=1,"/v1/upload_photo"
CONNECT
----------------------------800559106013275992937575
Content-Disposition: form-data; name=“image”; filename=“testimage.jpeg”
Content-Type: image/jpeg
(…image…)
----------------------------800559106013275992937575–
–EOF–Pattern–
HTTP/1.1 201 Created
Server: nginx/1.10.0 (Ubuntu)
Date: Tue, 04 Aug 2020 08:38:22 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
X-Request-Id: d67a037c-ed4b-48a3-8997-18b337aa3634
X-Runtime: 0.455576
–EOF–Pattern–
OK
+KHTTP_IND: 1,3,107347,201,“Created”
-> Closing session…
AT+KHTTPCLOSE=1,0
OK
+KCNX_IND: 1,5,30
The above command flow is when the HL8548 is working properly. However, when it fails, the modem does not respond at all after sending the image, and does not respond to any subsequent commands until it is reset.
When the failure occurs, I have checked on the server that the modem stops sending. So, it is not a problem on the server.
Investigating in depth, I have come to the conclusion that it may be a bug in the HL8548 related to coverage and (at least) sending via HTTP. Repeating the test several times in environments with worse and better coverage, trying to send 100 images in a row to the server, I have come to the conclusion that, having a coverage (getting RSSI with AT + CSQ command) lower than 15, the HL8548 can freeze up to 30% of the time. However, with exceptional coverage (RSSI around 30), it never seems to hang.
I need help with this problem. It is a reality that the hl8548 hangs regardless of its version. Why? How to avoid it?
Thanks for your time