BG95-M3 - QHTTPREADFILE Download Stalls During OTA Firmware Download

Dear Quectel Support Team,

I am currently developing an OTA firmware update solution using a BG95-M3 module and I would appreciate your guidance regarding an issue that occasionally occurs during HTTP file downloads.

Module Information

  • Module Model: BG95-M3

  • Firmware Version: BG95M3LAR02A03_A0.206.A0.206

  • IMEI: 865918071798430

HTTP Configuration

After powering up the module, I configure the HTTP service using the following commands:

AT+QHTTPCFG="contextid",1
AT+QHTTPCFG="requestheader",0
AT+QHTTPCFG="responseheader",0
AT+QHTTPCFG="contenttype",1
AT+QHTTPCFG="sslctxid",1

OTA Download Procedure

  1. Configure the URL:
AT+QHTTPURL=<URL_SIZE>,80
  1. Send an HTTP POST request:
AT+QHTTPPOST=<data_size>,80,80
  1. Parse the server response and obtain the OTA download URL.

  2. Execute:

AT+QHTTPREAD=80
  1. Parse the response data and determine whether a firmware download is available.

  2. Configure the download URL:

AT+QHTTPURL=<DOWNLOAD_LINK_SIZE>,80
  1. Send the download URL content.

  2. Start the download using:

AT+QHTTPREADFILE="my_download_file",500
  1. Monitor the download progress by querying the file size every 3 seconds:
AT+QFLST="my_download_file"
  1. The download process is considered complete when the file size matches the size reported by the server.

Observed Issue

This procedure works reliably most of the time.

However, in some situations, during the execution of AT+QHTTPREADFILE, the download appears to stop unexpectedly. When this happens:

  • The file size reported by AT+QFLST stops increasing.

  • The file remains incomplete.

  • The module does not report any explicit error.

  • The download never resumes.

  • The file size remains unchanged indefinitely.

The issue appears to occur randomly and is difficult to reproduce consistently.

Questions

  1. Are there any recommended HTTP, TCP/IP, SSL, PDP, or file system configurations that could improve the robustness of large file downloads using AT+QHTTPREADFILE?

  2. Is there any internal timeout parameter associated with QHTTPREADFILE that should be adjusted for large OTA files?

  3. Are there known limitations or known issues with firmware version BG95M3LAR02A03_A0.206.A0.206 related to HTTP file downloads?

  4. In scenarios involving temporary network degradation, packet loss, server delays, or interrupted connections, what recovery mechanism does Quectel recommend? For example:

    • Restarting the HTTP session

    • Re-establishing the PDP context

    • Reissuing the download request

    • Using HTTP Range requests

    • Other recommended approaches

Any recommendations regarding best practices for implementing a reliable OTA download mechanism on the BG95 platform would be greatly appreciated.

Thank you for your support.

Best regards,
Daniel Pazzini

Hi @Daniel_Pazzini

For large files, you need enable flow control by AT+IFC=2,2. And if network disconnected in downloading process, please Restarting the HTTP session, re-establishing the PDP context, Reissuing the download request.

Hello @Linkin-Q

Thanks for your feedback. My +IFC config was set as 0,0. I just set as you suggested.

I’ll continue the tests and let you know about it.

Many thanks.