Page 1 of 1

Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Posted: Mon Jun 09, 2025 6:31 am
by Vaishnav
Hi everyone,
(Am working on SIMA7670C GSM Modem)

I'm facing an issue while downloading a file from a server using HTTP commands. Here's the situation:

-> I send the HTTPACTION command, and it responds correctly with a 200 status and the expected file size (e.g., 2000 bytes).
-> Then, I use the HTTPREAD command to read the data in chunks.
-> However, when I read the file in two chunks (e.g., first 1024 bytes, then the next 1024), the data returned includes the beginning and end of the file, but some data in the middle is missing.

It seems like the chunks are not being read sequentially or there's a gap between them. Has anyone experienced this before? Could it be an issue with the offset or buffer handling?

Any suggestions or fixes would be greatly appreciated!

Thanks in advance.

Re: Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Posted: Mon Jun 09, 2025 7:26 am
by MicroController
Are you using the <start_addr> parameter of HTTPREAD?

Re: Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Posted: Mon Jun 09, 2025 8:15 am
by Vaishnav
We are sending the AT command as,
SIMSerial.println("AT+HTTPREAD=0,1024");
delay(2000);

Re: Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Posted: Tue Jun 10, 2025 8:22 am
by mpeplar
Hi @Vaishnav,

I am not sure if a GSM Library is an option for you? If so, LibGSM, developed by eiTech Systems, has an HTTP module.

The library comes with a free SMS Read module to test the library. All documentation, YouTube video links and the desktop application can be found on the website: https://eitech.systems/libgsm-gsm-library/

Disclaimer: I do work for eiTech Systems, and would be happy to answer any questions regarding the library. Contact details are available on the website "Contact" page. :)

Re: Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Posted: Tue Jun 10, 2025 5:30 pm
by MicroController
We are sending the AT command as,
SIMSerial.println("AT+HTTPREAD=0,1024");
Try

Code: Select all

SIMSerial.println("AT+HTTPREAD=1024");
.