Update the firmware of BG96 via the filesystem

Hi,

We are trying to update the FW of our modems that are embedded in a Linux driven system. There is no way to connect to a windows machine in order to carry out an update via the official QFlash tool. So I have identified the FOTA update as the only reasonable choice. Further more, I would like to use the FW update method via a file uploaded in the file system of the modem.

Our modems report this version:
AT+QGMR
BG96MAR02A07M1G

OK
ATI
Quectel
BG96
Revision: BG96MAR02A07M1G

OK

However, there are the following problems.

  1. There seems to be no storage named EUFS:
    AT+QFLDS=“EUFS”
    +CME ERROR: 425
    AT+QFLDS=“UFS”
    +QFLDS: 12940736,14483456

    OK

  2. The manual says to put the update file in folder /fota/update.zip. Yet, I don’t know how to do this when there is not way to create folders in either UFS or EUFS.

  3. I am not sure how to create the update.zip file from the update package supplied in this thread:
    BG96 firmware Upgrade
    Should I zip the update folder, its contents only, or the entire package?

  4. In this thread it is mentioned that there is a version of QFlash for Linux. Yet, I couldn’t find such one:
    BG96 - QFlash for Linux doesn't seem to work
    Is there such a tool that can be used in an embedded system?

Any help with any of the items mentioned above would be appreciated.

for you question , pls see the below comment

  1. pls try to transfer file to EUFS as below

AT+QFUPL=“EUFS:/datatx/test.zip”,441472,60

441472 is the size of test.zip

2.to create foder in EUFS , pls try the below tools

https://cnquectel-my.sharepoint.com/:f:/g/personal/america-fae_quectel_com/Eq-VIjcMeQxPqP2aKdMzHVUBYz_YmkFdOPKSecRxjm1GpQ?e=mnGQRt

  1. pls refer to the answer of issue2

  2. for Qflash for BG96 under linux ,pls kindly download it

https://cnquectel-my.sharepoint.com/:f:/g/personal/america-fae_quectel_com/EmJWNe-SFkVFlKVNTLf_xw8BYaNd1hM48dgbW5gojb_idA?e=LSxwaf

Thank you for the reply!

I was able to download anc compile QFlash for linux so now I am able to execute it on the embedded system directly. It starts ok, but then the update process goes into an endless loop:

root@pvs6:~# ./QFlash -f /tmp/upd -m 1
[06-09_10:06:43:157] QFlash Version: LTE&LTE-A_QFlash_Linux&Android_V2.0.0
[06-09_10:06:43:159] Builded at: Jun  9 2020 09:52:01
[06-09_10:06:43:597] Host runtime enviroment check ok
[06-09_10:06:43:597]
[06-09_10:06:43:597] The CPU is little endian
[06-09_10:06:43:597]
[06-09_10:06:43:597] Warn: streaming/fastboot is not recommmended from version 2.0
[06-09_10:06:43:597] will write progress status 0% into /data/update.conf
[06-09_10:06:43:598] Error: fail to create named pipe "/data/update.conf" errno 2 (No such file or directory)
[06-09_10:06:43:598] Module upgrade tool, Tue Jun  9 10:06:43 2020

[06-09_10:06:43:599] Auto detect quectel diagnose port = ttyUSB0
[06-09_10:06:43:600] Detect /tmp/upd/md5.txt file.
[06-09_10:06:43:600] md5 checking enable.
[06-09_10:06:43:603] md5 checking: /tmp/upd/contents.xml pass
[06-09_10:06:43:613] md5 checking: /tmp/upd/update/partition_nand.xml pass
[06-09_10:06:43:634] md5 checking: /tmp/upd/update//sbl1.mbn pass
[06-09_10:06:43:636] md5 checking: /tmp/upd/update//partition.mbn pass
[06-09_10:06:43:652] md5 checking: /tmp/upd/update//tz.mbn pass
[06-09_10:06:43:660] md5 checking: /tmp/upd/update//mba.mbn pass
[06-09_10:06:43:664] md5 checking: /tmp/upd/update//acdb.mbn pass
[06-09_10:06:43:670] md5 checking: /tmp/upd/update//rpm.mbn pass
[06-09_10:06:44:266] md5 checking: /tmp/upd/update//qdsp6sw.mbn pass
[06-09_10:06:44:399] md5 checking: /tmp/upd/update//apps.mbn pass
[06-09_10:06:44:401] md5 checking: /tmp/upd/update//efs2apps.mbn pass
[06-09_10:06:44:406] md5 checking: /tmp/upd/update//NPRG9x06.mbn pass
[06-09_10:06:44:411] md5 checking: /tmp/upd/update//ENPRG9x06.mbn pass
[06-09_10:06:44:412] Warn: firehose direcotry missing, firehose upgarde not supported
[06-09_10:06:44:413] file total size: 29206791
[06-09_10:06:44:415] module platform : 9X06
[06-09_10:06:44:417] product model = Qualcomm CDMA Technologies MSM

[06-09_10:06:44:418] Start to open com port: /dev/ttyUSB0
[06-09_10:06:44:423] Use normal diag port
[06-09_10:06:44:423] Get sahara hello packet!
[06-09_10:06:44:425] Error: Get sahara hello packet failed.
[06-09_10:06:44:426] Detect module status!
[06-09_10:06:44:426] Module status detect
[06-09_10:06:45:428] The module in normal mode
[06-09_10:06:45:430]
[06-09_10:06:45:432] Software Revision = BG96MAR02A07M1G
[06-09_10:06:45:432] Switch to PRG status
[06-09_10:06:47:556] Diagnose port disconnect
[06-09_10:06:48:560] Diagnose port connected.
[06-09_10:06:49:562] Start to open com port: /dev/ttyUSB0
[06-09_10:06:49:565] Try get sahara hello packet!
[06-09_10:06:49:567] Get sahara hello packet successfully!
[06-09_10:06:49:568] Send sahara hello response packet(2)!
[06-09_10:06:52:571] Start Read Data!
[06-09_10:06:52:575] Sahara send /tmp/upd/update//NPRG9x06.mbn
[06-09_10:06:52:595] 06-09_10:06:52:595 process: 100% finished
[06-09_10:06:52:597] Send sahara do packet!
[06-09_10:06:52:599] Module Status Detection
[06-09_10:06:52:602] Upgrade in normal mode
[06-09_10:06:53:722] Diagnose port disconnect
[06-09_10:06:57:733] Diagnose port connected.
[06-09_10:06:58:734] Start to open com port: /dev/ttyUSB0
[06-09_10:06:58:736] Module status detect
[06-09_10:06:59:737] The module in normal mode
[06-09_10:06:59:737] Module in normal state, do download again.
[06-09_10:06:59:851] Start to open com port: /dev/ttyUSB0
[06-09_10:06:59:855] Use normal diag port
[06-09_10:06:59:856] Get sahara hello packet!
[06-09_10:07:09:865] Error: Timeout Occured, No response or command came from the target!
[06-09_10:07:09:865] Error: Get sahara hello packet failed.
[06-09_10:07:09:865] Detect module status!
[06-09_10:07:09:865] Module status detect
[06-09_10:07:10:866] The module in normal mode

[06-09_10:07:10:868]
[06-09_10:07:10:869] Software Revision = BG96MAR02A07M1G
[06-09_10:07:10:869] Switch to PRG status
[06-09_10:07:13:001] Diagnose port disconnect
[06-09_10:07:14:005] Diagnose port connected.
.... same as the above in a endless loop

I tried increasing timeouts in the program, but that was of no effect. Could it be that we are using wrong firmware? I tried with the following with the same result:
BG96MAR02A07M1G_01.016.01.016.zip
BG96MAR04A04M1G_01.004.01.004.zip

I also tried the QWinExplorer tool. Its work was not reliable (giving different results on every run) and I couldn’t get a valid response from it on any command. Please check this output

F:\docs\bg96_modem\support_reset_board\QWinExplorer_v1.3>QWinExplorer.exe -f: 123.txt
space not enough for new file.transfer 123.txt to /datatx failed
reason: space is not enough

F:\docs\bg96_modem\support_reset_board\QWinExplorer_v1.3>QWinExplorer.exe -f: 123.txt
transfer 123.txt to /datatx failed
reason: get space error


F:\docs\bg96_modem\support_reset_board\QWinExplorer_v1.3>QWinExplorer.exe -l: /datatx
list /datatx error

F:\docs\bg96_modem\support_reset_board\QWinExplorer_v1.3>QWinExplorer.exe -l: /datatx
list /datatx:

F:\docs\bg96_modem\support_reset_board\QWinExplorer_v1.3>

The size of 123.txt is 3 bytes and I set the config file to use:
<filesys>1</filesys> with 1 and 2 and no difference :frowning: