Applicable Products
Objective
This application note shows how to connect with the cellular module inside the Siretta QUARTZ Router to communicate with it using AT commands.
To achieve this, it is necessary to first put the router in AT over IP mode.
Solution
For this solution to work user must enable AT over IP from Advance Network setting from router GUI, Choose TCP as Type of connection, enter local IP address of the router, enter port number, and set time out for the connection to stay open during inactivity period.
Then use of terminal emulator program of user choice to dial into the unit using its local IP address of the router and port that opened for AT over IP purpose.
Note: This guide is set for local connection only, means router and PC are on the same network, remote connection is covered in a separate application note.
Requirements
• Siretta Router with the firmware version beginning with a letter (example: Gm.0.2.x-xxxxxx-xxxxxx).
• PC with Tera Term Version 4.96 or above (Tera Term can be downloaded from the following link – Teraterm Link).
• Router Quick Start Guide
• Siretta Router – For this guide – QUARTZ-GOLD-W21-5G (EU) was used.
• RG50xQ&RM5xxQ Series AT Commands Manual – Quectel
• SIM card with ability to send and receive SMS.
Steps
1. Follow router Quick Start Guide.
2. Wait for the router to connect to the cellular network and show all connection parameters like one shown below.
3. Click administration tab to expand menu options.
4. Select Upgrade tab from Administration dropdown menu to see router full router firmware.
5. You will be presented with the page showing current version as seen below.
6. The firmware version for this router is: Gm.0.2.5-240402-181018.
Note: This firmware version has the support for AT Over IP, if returned firmware version starts with a letter, rather than a number then AT over IP is possible.
Contact Siretta Support at [email protected] to upgrade your router with the correct firmware.
Setting for AT Over IP
7. Click Advanced Network tab to expand dropdown menu.
8. Select AT over IP from the dropdown menu.
9. You will be presented with a AT over IP parameters settings page (see below).
10. Enable mode from the dropdown menu (Other option is Disabled).
11. Select TCP from Type dropdown menu (Other option is UDP).
12. Type IP address of your router in Local IP field (for this guide 172.168.1.1 was used).
13. Leave a default Local Port 5400.
14. Set Idle Timeout to the maximum 3600 seconds to allow more time to type commands (Minimum value for Idle time out is 5 Seconds).
15. Once all fields are complete, the page will look like the one below.
16. Click Save to save settings.
17. Reboot prompt will appear as seen below.
18. Click OK to reboot router (Or cancel to abort the setting if you wish not to proceed with setting AT over IP).
19. Wait for the reboot process to complete.
20. Router page will automatically reload (If router page is not loading automatically then press F5 from a PC keyboard to reload page)
21. Wait for the router to establish connection after the completion of the reboot.
22. Once connection is established you will be presented with the page below showing connection parameters.
23. Navigate to the AT over IP page to confirm all settings are saved as seen below.
24. You have successfully set AT over IP.
25. Open Tera Term application or Terminal emulator program of your choice on the PC connected to the router.
26. You will be presented with the following window.
27. Select TCP/IP option if not Selected.
28. Type Local IP address of the router to the Host field (for this guide router with IP of 172.168.1.1 was used).
29. Enter TCP port number (For this guide 5400 was used)
30. Select Other for service field.
31. Select IP Version IPV4 from the dropdown menu.
32. Once all field are completed you will have a window like one below.
33. Click OK
34. You will be presented with Tera Term window below.
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
35. You have now established connection with the cellular Module inside the router.
36. Issue the following set of at commands to query modem.
37. AT+GMI – to request Cellular Module manufacture.
38. AT+GMM – to request cellular module identification.
39. AT+GMR – to request Module firmware revision.
40. Issue AT+QGMR – to receive full firmware version.
41. AT+CIMI – to request Internation Mobile Subscriber Identity (IMSI)
42. AT+CSQ – to request signal strength.
43. AT+COPS? – to check what network and technology module is connected to.
44. AT+QNWINFO – to check technology, PLMN, Band and channel.
45. AT+QNWCFG=”lte_cell_id” to read LTE cell ID
46. Below are the AT commands and responses from the Module.
COM3 – Tera Term VT |
File Edit Setup Control Window Help |
AT+GMI
Quectel
OK AT+GMM RM500Q-AE
OK AT+GMR RM500QAEAAR13A01M4G
OK AT+QGMR RM500QAEAAR13A01M4G_01.001.01.001
OK AT+CIMI 234500053170149
OK AT+CSQ +CSQ: 21,99
OK AT+COPS? +COPS: 0,0,”O2 – UK Global1″,7
OK AT+QNWINFO +QNWINFO: “FDD LTE”,”23410″,”LTE BAND 1″,199
OK AT+QNWCFG=”lte_cell_id” +QNWCFG: “lte_cell_id”,32F4011BACF7C,1BACF7C,1BACF
OK |
Note: If you wish to obtain other information from module not listed in this document, refer to AT Commands Manual for the Module type inside your router.
System Integration
AT over IP feature in Siretta router can be integrated with user application. Application notes and examples can be found Modem Application Notes.
Note: Examples in Modem Application Notes are based on different types of cellular module. Use the AT commands reference manual for the module inside router, as the Application Notes may not be based on the same cellular modem.
Example: Sending SMS using Siretta Router.
47. Issue AT+CREG? – to Check the network registration.
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
AT+CREG?
+CREG: 0,1
|
48. Receive following when registered to a local network:
+CREG: 0,1
49. Receive following when registered to a roaming network:
+CREG: 0,5
NOTE If you do not receive a 1 or a 5 for the +CREG command, you are not registered on the cellular network and will not be able to send an SMS message.
50. Issue the following AT command: AT+CMGF=? To check supported messaging modes.
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
AT+CMGF=?
+CMGF: (0,1)
|
51. You will receive (0 ,1)
Where: –
0 is PDU Mode
1 is Text Mode.
52. Issue AT+CMGF=1 – to Set Modem to ‘Text’ mode
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
AT+CMGF=1
OK
|
53. Receive OK when successful.
54. Issue AT+CSCA? check the ‘Service Centre Address’
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
AT+CSCA?
+CSCA: “+447782000800”,145
|
Where “145” indicates the international dialling code scheme which contains “+” and UK dialling code. The number “++447782000800” is the mobile number with the UK international dialling code for the SIM installed inside the router.
NOTE: The Siretta router will automatically set its ‘Service Centre Address’
55. Issue AT+CSCS=”GSM” to set format to GSM 7-bit.
Other options are: –
• IRA
• UCS2.
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
AT+CSCS=”GSM”
OK |
56. Enter the recipient mobile number by using the following AT command.
AT+CMGS=” Mobile Number”. For this guide the mobile number 07951446859 is used.
Issue AT+CMGS=” +447951446859”
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
AT+CMGS=”+447951446859″
OK
|
57. Receive “>” when successful.
58. Type your SMS message to send after “>”
“This is test SMS from Siretta QUARTZ-GOLD-W21-5G (EU) reply RECEIVED”.
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
> This is test SMS from Siretta QUARTZ-GOLD-W21-5G (EU) reply RECEIVED.
|
59. To send SMS message press and hold “Ctrl” and press “Z” on the PC keyboard to send a special termination character to the modem then Press return key to send.
60. When the SMS has been sent you will see the confirmation and SMS message queue location using the following message: +CMGS: XXX
172.168.1.1 – Tera Term VT |
File Edit Setup Control Window Help |
> This is test SMS from Siretta QUARTZ-GOLD-W21-5G (EU) reply RECEIVED.
+CMGS: 57
OK
|
61. You have now successfully sent an SMS to the mobile number 07951446859.
62. Image below from recipient mobile phone.
63. If SMS is not sent you will receive +CMS ERROR:XXX code (Check error code from AT command reference Manual and rectify issue).
Other optional AT commands for user to try if opted.
64. Reply from Mobile to router RECEIVED.
65. Issue AT+CMGL – to View the time-stamped ‘received unread’ SMS message sent from the mobile user to the router.
66. Issue AT+CMGL=”REC READ” to read the new message.
67. You have now successfully received a reply from the mobile phone using the Siretta QUARTZ-GOLD-W21-5G (EU)
68. Issue AT+CMGL=? to see the available message options from Siretta QUARTZ-GOLD-W21-5G (EU).
Where:
• “REC UNREAD” shows received unread SMS Messages.
• “REC READ” shows received read SMS Messages
• “STO UNSENT” shows stored unsent Messages.
• “STO SENT” shows stored sent Messages.
• “ALL” shows all above SMS Messages
Below are set of AT commands used to send SMS from QUARTZ-GOLD-W21-5G (EU) to Mobile and read received SMS from Mobile.
COM3 – Tera Term VT |
File Edit Setup Control Window Help |
AT+GMI
Quectel
OK AT+GMM RM500Q-AE
OK AT+GMR RM500QAEAAR13A01M4G
OK AT+QGMR RM500QAEAAR13A01M4G_01.001.01.001
OK AT+CIMI 234500053170149
OK AT+CSQ +CSQ: 21,99
OK AT+COPS? +COPS: 0,0,”O2 – UK Global1″,7
OK AT+QNWINFO +QNWINFO: “FDD LTE”,”23410″,”LTE BAND 1″,199
OK AT+QNWCFG=”lte_cell_id” +QNWCFG: “lte_cell_id”,32F4011BACF7C,1BACF7C,1BACF
OK
AT+CREG? +CREG: 0,1
AT+CMGF=? +CMGF: (0,1)
AT+CMGF=1 OK
AT+CSCA? +CSCA: “+447782000800″,145
AT+CSCS=”GSM” OK
AT+CMGS=”+447951446859″
OK
> This is test SMS from Siretta QUARTZ-GOLD-W21-5G (EU) reply RECEIVED.
+CMGS: 57
OK
|
Additional Reading
Description | Author |
RG50xQ&RM5xxQ Series AT Commands Manual | Quectel |
Router Quick Start Guide
|
Siretta |
Teraterm Link | OSDN |
https://www.siretta.com/2023/01/how-to-send-and-receive-sms-messages-using-a-siretta-industrial-modem/ | Siretta |