BC66, OpenCPU and updating application

Hi everyone,

I am using the BC66 module with OpenCPU. Is there any way to use the DOTA mode to update not only the FW besides I would like to update the embedded application?

I think there is probably a way to copy the binary part related to the embedded application inside the binary firmware.

Best regards.

Hi Oscargomezf
There is a dfota routine in the example, which can upgrade the firmware differential package and app differential package.

1 Like

Hi Abner,

Thank you very much for your help.

I’ve checked the example called: example_dfota_http.c for updating the binary (SDK v1.5).

I’ve placed the binary I want to upgrade in a http server, and when the example: example_dfota_http.c executes the function RIL_DFOTA_Upgrade(m_URL_Buffer), I can see with my power analyzer current peaks for a while, so it seems to be that something is working, but eventually, I get the error DFOTA_FAILED.

In the example I could read these instructions:

---->
* Operation:
*
* step 1: you must put your application bin in your server.
* step 2: replace the “APP_BIN_URL” with your own .
* step 3: input string : start dfota=XXXX, XXXX stands for URL.
*
* The URL format for http is: http://hostname:port/filePath/fileName
* NOTE: if “:port” is be ignored, it means the port is http default port(80)
*
* eg1: http://23.11.67.89/file/xxx.bin
* eg2: http://www.quectel.com:8080/file/xxx.bin
---->

So they don’t talk about differential binary file for the application. Do I have to use a differential binary for the app? I the answer is yes, Do you know how I have to do that?

Best regards.

Hi Oscargomezf
Please provide the error DFOTA_FAILED log.
Please make sure that the HTTP server is using a differential package instead of a full file package.

1 Like

Hi Abner,

As I told you, I am using a binary. When I compile I get the file: APPGS3MDM32A01.bin. I am not using a differential binary. How can I build a differential binary?

By the way, How can I get the log for the error DFOTA_FAILE? Do you want me to use Genie for that?

Best regards.

Hi Oscargomezf

How can I get the log for the error DFOTA_FAILE? Do you want me to use Genie for that?
【Abner】Yes

APPGS3MDM32A01.bin build a differential binary file.
We have the URL build a differential binary file.
DFOTA

1 Like

Hi Abner,

Is there any documentation about how to do it? I don’t know If I am doing well.

These are the steps I followed:

1Âș. Generate a binary and compressed in rar format called [old binary]: APPGS3MDM32A01_old.rar
2Âș. Upload the binary by UART to the BC66 module with this binary.
3Âș. Change the app, compile and generate a new .rar: APPGS3MDM32A01_new.rar
4Âș. Enter in the website: http://dfota.quectel.com:8081 and upload the files: APPGS3MDM32A01_new.rar and APPGS3MDM32A01_old.rar.
5Âș. Click the button “+Start making” to generate the diff file and dowload it. The name is: APPGS3MDM32A01_new-APPGS3MDM32A01_old.rar

And now, What do I have to do with this file?

Best regards.

Hi Oscargomezf
fota
Refer to the documentation. Please consult me if something goes wrong.

1 Like

Hi Abner,

Thank you very much for the documentation. Now is much more clear for me.

I have the last question: According to the documentation If I want to do an upgrade, I need the folder new-old. I have to rename the .update.dela of this folder to the name app_bc66_tst.bin, due to the fact, I have configured this name in my app, and place this app_bc66_tst.bin on my http server (http://my.host.name/fw):

APP_BIN_URL=“http://my.host.name/fw/app_bc66_tst.bin”
RIL_DFOTA_Upgrade(APP_BIN_URL);

And Is that all?

Best regards.

Hi Oscargomezf
Yes, we support HTTP upgrade of .bin files.

1 Like

Hi Abner,

I trying to access to the dfota website, in order to check the upagrades FW, but it seems to be that the website is down: http://dfota.quectel.com:8081/

Would you mind confirming me that the website is properly working?

Best regards.

Hi Oscaegomezf
The server has restarted and can now log in.

1 Like

Ok,

Right now I can access the website. But it doesn’t work the upgrade. I’ve got the same error: DFOTA_FAILED (Error number 8). These are the steps I’ve followed:

These are the steps I followed:

1Âș. Generate a binary and compressed in RAR format called [old binary]: APPGS3MDM32A01_old.rar
2Âș. Upload the binary by UART to the BC66 module with this binary.
3Âș. Change the app, compile and generate a new .rar: APPGS3MDM32A01_new.rar
4Âș. Enter in the website: http://dfota.quectel.com:8081 and upload the files: APPGS3MDM32A01_new.rar and APPGS3MDM32A01_old.rar.
5Âș. Click the button “+Start making” to generate the diff file and download it. The name is: APPGS3MDM32A01_new-APPGS3MDM32A01_old.rar
6Âș. Unrar the file: APPGS3MDM32A01_new-APPGS3MDM32A01_old.rar and get the file: APPGS3MDM32A01_OLD-APPGS3MDM32A01_NEW\update.delta and rename to app_bc66_tst.bin.
7Âș. Upload the file app_bc66_tst.bin to my HTTP server.
8Âș. Force my device to execute the function RIL_DFOTA_Upgrade(APP_BIN_URL), to start the upgrade.

Do you have any suggestions? I think I am following the process correctly.

Best regards.

Hi Oscargomezf

  1. DFOTA upgrade via HTTPS server is not supported.
  2. Initiate DFOTA business. The APP will not do any business other than DFOTA.
  3. Pass the received URL into the interface (RIL_DFOTA_Upgrade) to complete the upgrade
1 Like

Hi Abner,

1Âș. I am using HTTP.
2Âș. I am using the example: example_dfota_http.c

So I think everything is OK.

Best regards.

Hi Oscargomezf
Your steps Are you going to downgrade?
Is the URL in the RIL_DFOTA_Upgrade function in example_dfota_http.c modified?

1 Like

Hi Abner,

  1. According to: “Is the URL in the RIL_DFOTA_Upgrade function in example_dfota_http.c modified?”
    Yes. And I’ve checked with the command wget (from a linux computer) that the binary file is accessible from the HTTP server.

  2. According to: “Your steps Are you going to downgrade?”
    I want to make an upgrade so I need to get the .delta file from the folder APPGS3MDM32A01OLD-APPGS3MDM32A01NEW. What is to say, right now I have the fw OLD and I want to change to the NEW. Is that right?

Best regards.

Hi Oscargomezf

5Âș. Click the button “+Start making” to generate the diff file and download it. The name is: APPGS3MDM32A01_new-APPGS3MDM32A01_old.rar
From your previous process, you are downgrading. Please also confirm the process.

I suspect that something went wrong in your process of making the difference package.
You can try a few more times.

1 Like

Hi Abner,

I think I didn’t explain myself very well. When I made the delta file this file is generated:

APPGS3MDM32A01NEW-APPGS3MDM32A01OLD.rar

And inside there are these two files:

A file: APPGS3MDM32A01NEW-APPGS3MDM32A01OLD\APPGS3MDM32A01OLD-APPGS3MDM32A01NEW\update.delta

B file: APPGS3MDM32A01NEW-APPGS3MDM32A01OLD\APPGS3MDM32A01NEW-APPGS3MDM32A01OLD\update.delta

I’ve got this file:

A file: APPGS3MDM32A01NEW-APPGS3MDM32A01OLD\APPGS3MDM32A01OLD-APPGS3MDM32A01NEW\update.delta

And rename the file to app_bc66_tst.bin to upload to the HTTP server.

Is the A file the right one to make an upgrade?

Best regards.

Hi Oscargomezf
A file is the right one to make an upgrade。

1 Like