Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Vaishnav
Posts: 2
Joined: Mon Jun 09, 2025 6:18 am

Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response

Postby Vaishnav » Mon Jun 09, 2025 6:31 am

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.

MicroController
Posts: 2663
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

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

Postby MicroController » Mon Jun 09, 2025 7:26 am

Are you using the <start_addr> parameter of HTTPREAD?

Vaishnav
Posts: 2
Joined: Mon Jun 09, 2025 6:18 am

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

Postby Vaishnav » Mon Jun 09, 2025 8:15 am

We are sending the AT command as,
SIMSerial.println("AT+HTTPREAD=0,1024");
delay(2000);

mpeplar
Posts: 2
Joined: Tue Jun 10, 2025 7:17 am

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

Postby mpeplar » Tue Jun 10, 2025 8:22 am

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. :)

MicroController
Posts: 2663
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

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

Postby MicroController » Tue Jun 10, 2025 5:30 pm

We are sending the AT command as,
SIMSerial.println("AT+HTTPREAD=0,1024");
Try

Code: Select all

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

Who is online

Users browsing this forum: ChatGPT-User, meta-externalagent and 3 guests