BG96 file download problem and CRC issue

I am downloading a file using AT+QHTTPREADFILE but the file which appears on modem is not the same like on server. Starting from byte 254 server and downloaded on modem UFS file differs. Also I tried to get file CRC but there is always an error. Does anybody know why?

AT+QGMR
BG96MAR02A07M1G

OK

AT+QHTTPURL=53,10
CONNECT

https://test.net:11111/fw/update1.bin

OK

GET /fw/update1.bin HTTP/1.1
Host: test.net:11111
Authorization: Basic xxxxxxxxxxx=
User-Agent: xyz-mIoT 
Content-Type: application/*
Accept: */*

AT+QHTTPGET=40,208

CONNECT


GET /fw/IceFridge_IoT_v244.bin HTTP/1.1
Host: test.net:11111
Authorization: Basic xxxxxxxxxx
User-Agent: xyz-mIoT 
Content-Type: application/*
Accept: */*

OK

+QHTTPGET : 0,200,100412

AT+QHTTPREADFILE="ufs:update1.bin",80

OK

+QHTTPREADFILE: 0

AT+QFLST="*"

+QFLST: "conifg.xyz",39
+QFLST: "update1.bin",100412

OK

AT+QFCRC=?

ERROR

AT+QFCRC="ufs:update1.bin

ERROR
1 Like

Downloaded file differs from original starting from byte 254

Computer downloaded file looks following:

hexdump -C update1w.bin -n 256

00000000  00 80 00 20 7d 3c 00 00  65 3c 00 00 65 3c 00 00  |... }<..e<..e<..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 65 3c 00 00  |............e<..|
00000030  00 00 00 00 00 00 00 00  65 3c 00 00 d1 3c 00 00  |........e<...<..|
00000040  65 3c 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00  |e<..e<..e<..e<..|
00000050  65 3c 00 00 65 3c 00 00  65 3c 00 00 69 3c 00 00  |e<..e<..e<..i<..|
00000060  65 3c 00 00 b1 3b 00 00  65 3c 00 00 65 3c 00 00  |e<...;..e<..e<..|
00000070  65 3c 00 00 65 3c 00 00  c1 3b 00 00 65 3c 00 00  |e<..e<...;..e<..|
00000080  65 3c 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00  |e<..e<..e<..e<..|
00000090  00 00 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00  |....e<..e<..e<..|
000000a0  65 3c 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00  |e<..e<..e<..e<..|
000000b0  00 00 00 00 10 b5 06 4c  23 78 00 2b 07 d1 05 4b  |.......L#x.+...K|
000000c0  00 2b 02 d0 04 48 00 e0  00 bf 01 23 23 70 10 bd  |.+...H.....##p..|
000000d0  90 00 00 20 00 00 00 00  d4 58 00 00 04 4b 10 b5  |... .....X...K..|
000000e0  00 2b 03 d0 03 49 04 48  00 e0 00 bf 10 bd c0 46  |.+...I.H.......F|
000000f0  00 00 00 00 94 00 00 20  d4 58 00 00 f0 b5 3c 4c  |....... .X....<L|`

modem downloaded file

00 80 00 20 7d 3c 00 00  65 3c 00 00 65 3c 00 00 
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00  00 00 00 00 65 3c 00 00 
00 00 00 00 00 00 00 00  65 3c 00 00 d1 3c 00 00 
65 3c 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00 
65 3c 00 00 65 3c 00 00  65 3c 00 00 69 3c 00 00 
65 3c 00 00 b1 3b 00 00  65 3c 00 00 65 3c 00 00 
65 3c 00 00 65 3c 00 00  c1 3b 00 00 65 3c 00 00 
65 3c 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00 
00 00 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00 
65 3c 00 00 65 3c 00 00  65 3c 00 00 65 3c 00 00 
00 00 00 00 10 b5 06 4c  23 78 00 2b 07 d1 05 4b 
00 2b 02 d0 04 48 00 e0  00 bf 01 23 23 70 10 bd 
90 00 00 20 00 00 00 00  d4 58 00 00 04 4b 10 b5 
00 2b 03 d0 03 49 04 48  00 e0 00 bf 10 bd c0 46 
00 00 00 00 94 00 00 20  d4 58 00 00 f0 b5 3c 00 <- differs starting from this point
f0 87 f8 fe f7 37 fa fe  e7 0c 4d 00 23 8d 42 f6

Hello,
I have same problem, I used command AT+QHTTPREADFILE=“test.bin”,80,for downloading file from http server, but how should I get this file from EC20 to com or into computer. Which command should I use to download file from ec20 to COM.?

Thanks in advance

Same issue with my ESP32 + M66 Setup. Unable to download bin file without loosing some data in the middle. Please suggest a solution.

Hi Mika, any luck on this? I am facing the same challenge. It would be great if you could guide me. Thanks.!

Hi Rajvignesh,

I have tested with different modem and it still acts the same. Quectel people id not reply so I have no solution.

are you using hardware flow control on the UART?

if not, it may be possible that the receiving side (e.g. ESP32) loses data.

I’m facing the same issue. Trying to download files as small as 10kb (through HTTP) and the modem loses data.

I’ve discarded my main board (ESP32) being the cause because I have the exact same data loss connected directly to the modem UART (BC66 dev kit).

If I try to download 10kb files, I always receive only about 8kb (always the exact same number of bytes).
If I try to download 100kb files, I always receive about 80kb (the same amount of bytes in EVERY TRY). And so on… about 20-30% of data is loss, no matter file size.

I repeat. I’m totally sure this is a BC66 problem. Main board discarded.

No response from Quectel support.