Hello,
We are using Quectel M66 GSM module in out IoT device with firmware version M66FAR02A05BT.
I have implemented file downloading from server via HTTP. The file is first downloaded to modem UFS memory using AT+QHTTPGET and AT+QHTTPDL commands. When it is downloaded successfully, it is read and copied to device’s FLASH memory by 2048B packets. This operation is running smoothly when file size is not greater than 100kB. Otherwise we are receiving invalid data in packet that exceed 100kB. Please check my commands flow after registration to network below:
[...]
MODEM: checking TCP/IP state
>>> AT+QISTAT
MODEM: TCP/IP initial
MODEM: setting APN
>>> AT+QIREGAPP="netland.iot.test","",""
MODEM: set APN ok
MODEM: checking TCP/IP state
>>> AT+QISTAT
MODEM: TCP/IP start
MODEM: activating PDP context
>>> AT+QIACT
MODEM: PDP context activated
MODEM: disabling HTTP header
>>> AT+QHTTPCFG="responseheader",0
MODEM: HTTP header disabled
MODEM: setting firmware file URL
>>> AT+QHTTPURL=79,5
MODEM: URL = http://iot.netland.com.pl:18030/f/d/nl_hakar_pls_gsm/869247041829174/5d8023d6c2
>>> http://iot.netland.com.pl:18030/f/d/nl_hakar_pls_gsm/869247041829174/5d8023d6c2
MODEM: firmware file URL set
MODEM: sending HTTP GET
>>> AT+QHTTPGET=60,300
MODEM: downloading file from HTTP
>>> AT+QHTTPDL="firmware.bin",500000,300
MODEM: content length = 277888
MODEM: result = 0
MODEM: writing firmware file to FLASH
>>> AT+QFOPEN="firmware.bin", 2
MODEM: file 19202049 opened
>>> AT+QFSEEK=19202049,0,0
>>> AT+QFREAD=19202049,2048
MODEM: 2048/277888
>>> AT+QFSEEK=19202049,2048,0
>>> AT+QFREAD=19202049,2048
MODEM: 4096/277888
>>> AT+QFSEEK=19202049,4096,0
>>> AT+QFREAD=19202049,2048
MODEM: 6144/277888
>>> AT+QFSEEK=19202049,6144,0
>>> AT+QFREAD=19202049,2048
// Reading file by 2048B packets
[...]
// At packet which exceed 100kB size I am getting some random bytes and its size don't match
MODEM: 98304/277888
>>> AT+QFSEEK=19202049,98304,0
>>> AT+QFREAD=19202049,2048
>>> AT+QFCLOSE=19202049
I have tried following workarounds so far:
-
Downloading file to modem RAM memory instead of UFS
-
Downloading file packets by AT+QHTTPGET and AT+QHTTPREAD
-
Writing own HTTP GET requests and send them using AT+QISEND, reading response with AT+QIRD
None on these solved the problem, I am still getting invalid data in response for packet exceeding 100kB.
I am using similar approach in other device with Quectel BG600L modem, where I download file to modem memory and then read it in the same way as above. There is no such issue in BG600L, I am successfully downloading files greater than 300kB.
I have found information that M66-OpenCPU reserves 100kB RAM space for the embedded application. Maybe the problem here is RAM memory overflow?
Thank you in advance for response,
Adam