DFOTA update in BC660K failing

Hello,

I am trying to run the QFOTADL to update the firmware of BC660K-GL.

Basically, I did the following steps:

1 - Build the firmware A (let’s call it firmware_old);
2 - Do some very small change, and then build firmware B (lets call it firmware_new);
3 - Go to https://dfota.quectel.com:8443/
4 - Upload firmware_old and firmware_new
5 - download the delta, which was named by the webite as firmware_old-TO_firmware_new.zip
6 - then I uploaded this zip file into my HTTP Server
7 - Then I ran the command AT+QFOTADL="http://xxx.xxx.xxx:80/firmware_old-TO_firmware_new.zip"

Here are the logs:

AT+QFOTADL="http://xxx.xxx.xxx:80/firmware_old-TO_firmware_new.zip"
OK
+QIND: "FOTA","HTTPSTART"

# [->> then it took about 2 minutes to show the below URC <<-]

+QIND: "FOTA","HTTPEND",12

There was no indication in between about the download progress, as the PDF “DFOTA Application Note”.

I would expect some indication like this about the download: +QIND: "FOTA","DOWNLOADING",x, where x is the percentile progress.

Also, I do not know why it returned the error “12”.

Did I do some wrong step?

Here is my module’s firmware version:

ati
Quectel_Ltd
Quectel_BC660K-GL
Revision: BC660KGLAAR01A04
OK

UPDATE 1:

Yes, the error code 12 means: "Download failed".
But still, it took so long, and I do not know why it fails.
The HTTP Server is publicly available, and I can download the zip file normally.

UPDATE 2:

I used Wireshark to sniff in/out packets, and my firmware keeps sending a “hello” message over UDP (in a specific port), so I can see in Wireshark that I am receiving the “hello” messages.

However, when I ran the AT+QFOTADL="http://xxx.xxx.xxx:80/firmware_old-TO_firmware_new.zip" I do not see any different traffic, only the “hello” message on UDP.

Well, turns out I had some port mapping issue.

Tested on a different port, and it is working.

AT+QFOTADL="http://xxx.xxx.xxx:1883/firmware_old-TO-firmware_new.zip"
OK
+QIND: "FOTA","HTTPSTART"
+QIND: "FOTA","DOWNLOADING",65%
+QIND: "FOTA","DOWNLOADING",100%
+QIND: "FOTA","HTTPEND",0

# [ module restarted ]

yes, you are great! Thank you for sharing!

Hello, how do you mount http server ? have a problem with bc 660k not suport https

For testing, I simply used Apache running on Linux.

It should not be hard, just follow any tutorial about how configure Apache on Ubuntu and it should be enough.

The only thing is to make sure that you are exposing the TCP port, AFAIR I used the ufw suite to do that, it is a simple linux program that exposes or not tcp/udp ports.

Hello, Solve the http server issue. Now, the issue is that I send the dfota command and it shows me httpstart and httpend error 12, do you know what it could be? I send the command as follows
AT+QFOTADL=“http://adress.net:80
or
AT+QFOTADL=“http://adress.net:1883

Your DFOTA command is incomplete.

You must specify the filename also, for example, the filename is new_firmware.zip, then your URL should look like:

AT+QFOTADL="http://address.net:1883/new_firmware.zip"

About the error code, you can get details on the documentation Quectel_BC660K-GL_DFOTA_Application_Note_V1.0.pdf inside the SDK folder:

ok, i try that. I created an api on Amazon that has an auto-download get method with the link. Now I modify it so that I must enter with the name.

I tried with the name but I still get the same error :S, I’ll send you a screenshot of what the serial port shows me

Try to remove the last “/”

Should be only “…actualizar.zip”

I did it but got the same answer

Can you share the URL?

Or, try using your mobile phone (not connected to the same network as your server) and you should be able to download the actualizar.zip file. That means, the HTTP Server must be seen externally to your network.

Then my last guess is try to make sure your BC660 has internet.

Do a PING test with it.

I do not remember the command, but it is something like this:

AT+QPING=1,8.8.8.8

To make sure it has connection.

In the code, I send the at command after it connects

HI.
i have error 255 after it downloads the package. Do you know what it means or how to solve it?

If your download was success, then the resulting code is related to the .

On the documentation, here it is the meaning

Screenshot from 2024-04-04 07-24-00

So, you probably are doing wrong related to the zip file.

Check the steps I mentioned at the very beginning of this post: here

i had followed those steps many times now, and couldn’t reach the goal. Is there another way to do the diff package, or could you send me one to try out?
Thanks in advance

it is working now. I recommend to use a local server with xampp, an then with ngrocks to access an download.
Thanks for your time

1 Like