Uploaded by Abhishek Pankaj

how to send data over control plane

advertisement
To send data over the control plane in NB-IoT, you can use the AT+CSODCP command. This
command allows you to send control plane (CP) data over the data communication path using
a specified PDP context. Below, I'll provide a detailed step-by-step guide and an example
using a U-Blox NB-IoT module.
Steps to Send Data Over Control Plane in NB-IoT
1. Connect to the U-Blox NB-IoT Module:
o Use a serial interface (e.g., UART, USB) to connect the module to your
computer.
o Open a terminal program (e.g., PuTTY, Tera Term) to communicate with the
module.
2. Initialize Communication:
o Ensure the module is powered on and connected properly.
o Open the terminal program and connect to the appropriate COM port at the
correct baud rate (usually 9600 or 115200).
3. Check Module Communication:
o Send an AT command to ensure the module is responsive.
Copy code
AT
o The module should respond with OK.
4. Attach to the Network:
o Make sure the module is attached to the NB-IoT network.
objectivec
Copy code
AT+CGATT=1
o
Check the attachment status:
objectivec
Copy code
AT+CGATT?
o Expected response: +CGATT: 1
5. Activate PDP Context:
o Configure and activate the PDP context if not already done. Assuming context
ID 1:
objectivec
Copy code
AT+CGDCONT=1,"IP","<your_apn>"
AT+CGACT=1,1
o Replace <your_apn> with your network's APN.
6. Prepare the CSODCP Command:
o Determine the data you want to send over the control plane.
o Convert your data to hexadecimal format. For example, if you want to send
the string "Hello", its hexadecimal representation is 48656C6C6F.
Example Command
Let’s assume you want to send the string "Hello" over the control plane using the AT+CSODCP
command. Here’s how you can construct and send the command:
1. Data to Send:
o String: "Hello"
o Hexadecimal Representation: 48656C6C6F
2. Calculate the Length:
o The length of "Hello" is 5 bytes.
3. Construct the Command:
o CID: 1 (Context ID)
o cpdata_length: 5
o cpdata: 48656C6C6F
o RAI: Optional (let’s assume 0 for this example)
o type_of_user_data: Optional (let’s assume 0 for this example)
o sequence: Optional (let’s assume 0 for this example)
Complete AT Command
Copy code
AT+CSODCP=1,5,48656C6C6F,0,0,0
Step-by-Step Execution
1. Open the Terminal and ensure you are connected to the U-Blox NB-IoT module.
2. Send Initial AT Command to check communication:
Copy code
AT
o
Expected Response: OK
3. Ensure Network Attachment:
objectivec
Copy code
AT+CGATT=1
AT+CGATT?
o Expected Response: +CGATT: 1
4. Activate PDP Context:
objectivec
Copy code
AT+CGDCONT=1,"IP","<your_apn>"
AT+CGACT=1,1
o Replace <your_apn> with your network’s APN.
5. Send the CSODCP Command:
Copy code
AT+CSODCP=1,5,48656C6C6F,0,0,0
o
Explanation:
 1: Context Identifier.
 5: Length of the CP data.
 48656C6C6F: The CP data ("Hello" in hexadecimal).
 0: RAI not requested.
 0: Default type of user data.
 0: First sequence.
6. Verify the Response:
o The module should respond with OK if the command was successfully received
and processed.
Example in Practice
Here is how a complete terminal session might look:
objectivec
Copy code
AT
OK
AT+CGATT=1
OK
AT+CGATT?
+CGATT: 1
OK
AT+CGDCONT=1,"IP","<your_apn>"
OK
AT+CGACT=1,1
OK
AT+CSODCP=1,5,48656C6C6F,0,0,0
OK
Summary
To send data over the control plane in NB-IoT using a U-Blox module:
1.
2.
3.
4.
5.
Connect to the module and ensure it’s responsive.
Attach to the network and activate the PDP context.
Prepare your data, convert it to hexadecimal, and calculate its length.
Construct the AT+CSODCP command with the required parameters.
Send the command and verify the response.
Download