UDP communication of OpenCPU based on BC26

First of all, I don’t know much about UDP communication. I just know that it is a transport layer protocol without connection, reliability, disorder and flow control.

Now the company wants to realize UDP communication of BC26 data acquisition based on OpenCPU development, the company gives me this task, and I am very interested in OpenCPU.

Now in the development phase, I have a problem. After the module enters the PSM mode and wakes up from the PSM mode (wakes up with the external key), the server sends the data, but the module does not receive it. I think the module should first send the data to the server, and then the server replies to the data, but I don’t know how to send the first frame of data after the PSM wakes up?

I thought of using RTC timer to wake up PSM, but I didn’t find the right time to start RTC and stop RTC.

So I want to ask how to realize UDP communication after exiting PSM?

thank you!

If you are using OpenCPU for development, RTC Wake has a special API in the SDK for you to use.To ensure successful data delivery, make sure that the module is registered on the network and connected to the cloud platform before sending data.

Therefore, it is recommended to use AT command to communicate with the platform first and get familiar with the whole process.

First of all, thank you for your reply!

When I first came into contact with OpenCPU, I used at command to test, including querying SIM card status, signal strength and other parameters related to network connection, as well as testing the whole UDP connection and transceiver process.

Now I add this process to the program. When the module is powered on and started, the network status query and socket connection are completed, and the data is successfully sent once. Then the module automatically enters the PSM. However, after the module wakes up, the server sends the data, but the module can’t receive it. Therefore, the module should send the data to the server first, and the server returns the data, only the PSM Mode, the user program does not run, only a RTC is running, so I thought of using RTC to wake up regularly, but I do not know when to start RTC is better, recently stuck in this problem, has been unable to solve.