If anybody is conform with SIM800L, I've got a working design regarding sending data through TCV via SIM800L, building up the network is ok. What is working:
AT+CIPSTART
waiting about 2 sec
AT+CIPSEND=lenght(small text) (very small basic text data)
waiting 2 secs, then
UART.write(data)
waiting 3 secs, returns: SEND OK
AT+CIPSEND=lenght(file) (filesize up to about 1400 bytes have no issues)
UART.write(file)
waiting 3 secs, returns: SEND OK
I got my confirmation also with read() from my server side that it's okay. This is working well.
BUT: If I would like to send a larger binary file which is bigger than 2kbyte than I know it is impossible to send it in one line, so I've tried to chunk the file into pieces, by cutting them into 1024 bytes, and tried also with 512 bytes
but after sending the first piece of file I get always CME ERROR 3 tried to extend the time for waiting but it also does not help.
Does anybody know how to send larger files chunked? My basic idea was:
in the loop:
 AT+CIPSEND=length(chunked_file_part)
 UART.write(chunked_file_part) # with and without ending character chr(26)
 wait 2-3 secs
and also with sending file size first outside the loop and inside the loop sending only the chunks (tried with and also without ending character)
The ending character was always put at the last chunk's end.
Please share your toughs only who already did that kind of approach.
I'm using micropython and an ESP32 for this, but I feel that this is not what matters in this case.
1 Answer 1
I figured out, that I have to wait for the responsd, mostly: SEND OK but somtimes due to Serial communication, only a _ prompt appears, which is equivalent for OK and waiting for next chunk of data.