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.
Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response
-
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
Are you using the <start_addr> parameter of HTTPREAD?
Re: Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response
We are sending the AT command as,
SIMSerial.println("AT+HTTPREAD=0,1024");
delay(2000);
SIMSerial.println("AT+HTTPREAD=0,1024");
delay(2000);
Re: Issue with HTTPREAD Missing Data in Chunks After HTTPACTION Response
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.
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
TryWe are sending the AT command as,
SIMSerial.println("AT+HTTPREAD=0,1024");
Code: Select all
SIMSerial.println("AT+HTTPREAD=1024");
Who is online
Users browsing this forum: Applebot, Bing [Bot], ChatGPT-User and 2 guests