CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

SIM7080G HTTP post

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Marco27293



Joined: 09 May 2020
Posts: 110

View user's profile Send private message

SIM7080G HTTP post
PostPosted: Fri Jan 22, 2021 7:36 am     Reply with quote

Hi,

Is it possible with SIM7080G module upload large data packet by HTTP post request ?

Because, the max body length available with at+shconf is 4096 (at command manual version 1.3), but actually with SIM868 we're able to post through at+httpaction up to 64KB in a single post request.
We need to rapidly post an equivalent data size with SIM7080G is there any workaround that makes it possible?

Might AT+SHAHEAD="Connection","keep-alive" command help me?
Maybe, I can perform the upload through subsequent post requests in order to send multiple 4096bytes packets....

Please give me a suggestion on how I can afford this issue

Regards,

Marco
benoitstjean



Joined: 30 Oct 2007
Posts: 543
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Fri Jan 22, 2021 7:49 am     Reply with quote

Hi again Marco,

As indicated in my other post for FTP, this forum is for PIC microcontroller users who use CCS' C compiler. This is not like stackexchange and whatnot like if it were a general support website for anything. Your questions are very specific - they should be fired-off to SIMCOM as this is the modem you are using.

Otherwise, you may wish to contact whoever is your SIMCOM representative and where you have purchased the modem from.

This is my view but if other users wish to help, then that's their choice.

Good luck.

Ben
Marco27293



Joined: 09 May 2020
Posts: 110

View user's profile Send private message

PostPosted: Fri Jan 22, 2021 8:22 am     Reply with quote

I'm using PIC18F47J53 (CCS C 5.090 pch compiler) tied via uart to sim7080g.

SIMCOM documentation is NOT helpful...

Please give me some suggestion...

Marco
benoitstjean



Joined: 30 Oct 2007
Posts: 543
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Fri Jan 22, 2021 8:52 am     Reply with quote

haha! SIMCOM documentation is NOT helpful. Join the club! I know, been using their products for a very long time and docs are quite bad... but the products are very nice, robust and reliable.

I haven't used the HTTP stack other than recently for fun to display "Device is online" when an HTTP connection is made to my unit from a recognized address.

But for large blocks, this would be the same principle as with FTP in a sense that when the MCU receives a "GET" message from the modem (you attempt to connect to the modem therefore the modem will return the GET message to the MCU with all its associated data), I filter-out the first part which is "GET /" and then I issue the following in multiple blocks:

Code:

sprintf( sTempBuffer, "HTTP/1.1 200 OK\r\n"
                            "Content-Type: text/html\r\n"
                            "Connection: Close\r\n"
                            "Content-Length: %Lu\r\n"
                            "\r\n", ContentsLength );

--> Send sTempBuffer to MCU's TX queue
--> Clear sTempBuffer

sprintf( sTempBuffer, "<!DOCTYPE HTML>\r\n"
                            "<html>\r\n"
                            "<head>\r\n" );

--> Send sTempBuffer to MCU's TX queue
--> Clear sTempBuffer

sprintf( sTempBuffer, "<title>Success</title></head><body>Device is online</body></html>\r\n" );

--> Send sTempBuffer to MCU's TX queue
--> Clear sTempBuffer



When you get the "GET" message, it'll contain all the other crap like User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Accept: text and so on. I filter-out the first 5 characters with strncmp( Message, "GET /", 5 ).

The reason I have to send the reply this way is because the modem has its UART configured to run in multiplexer mode therefore a single physical UART is set to run as 4 virtual UARTs. For some reason, SIMCOM didn't fully implement the 3GPP specs for UART multiplexing (not sure about the SIM7600 but that's the case on the SIM5320) in a sense that you cannot send buffers of more than 127 bytes per MUX frame. The standard calls for 255 bytes in linked frames. This said, I need to break-down the data into blocks of maximum 127 bytes. That's why in my example above, I am sending sTempBuffer in multiple instances. I had to count each byte manually to ensure I did not exceed the length of the buffer.

I also have a message queue of 50 elements deep on the MCU where I queue all the outgoing data that needs to go out the PIC's UART through DMA to the modem, one element after another, in sequential order. I have a similar queue for modem-to-PIC messages where data is stored in the incoming queue for later processing sequentially.

Ben
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jan 23, 2021 6:30 am     Reply with quote

My head hurts...
Life was a LOT simpler when I worked on Teletypes....
sigh..
..can I go back, please ?? Rolling Eyes

or the job as GG ?
Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group