Most examples for setting the RTC on an ESP32 use WiFi or Ethernet connection and the builtin SNTP library or the NTPClient library. However, if a device operates in an environment without WiFi over 3G (as in our case), setting the RTC is not so straightforward.
This is just a quick note to understand the workings of timeservers and synchronizing the RTC using SNTP over TCP and UDP connections.
The SIM5360 series is a Dual-Band HSPA+/WCDMA and Quad-Band GSM/GPRS/EDGE module solution in a SMT type which supports HSPA+ up to 14.4Mbps for downlink data transfer. SIM5360 related documentation can be downloaded from SIMCom site.
This short note explains the AT commands needed to open the network and establish a TCP connection on the SIM5360A.