Could you please help to eliminate my confusion?
I am reading AT commands manual for my SIM800L module, everything is clear in scope of a single command. But it is not clear which sequence is best when sending a UDP packet.
So, I know the order of commands is following:
AT+CIICR Brings up wireless connection
AT+CIFSR Get local IP address
AT+CIPSTART Establishes a connection with a server.
AT+CIPSEND Sends data when the a connection is established.
AT+CIPCLOSE
OK but I need to send datagrams time-to-time. Say, the period is from minutes to hour.
I see that AT+CIICR can return ALREADY CONNECTED for subsequent calls, and I guess I should not call it more than once. So the question is: which sequence should be used for the next datagrams?:
1)
AT+CIPSTART
AT+CIPSEND
AT+CIPCLOSE
or just:
2)
AT+CIPSEND
and AT+CIPCLOSE somewhere before a modem shutdown.
Is there any time-to-live of AT+CIPSTART state? What is the best practice?