How to send SMS via DCOM 3G

If you want to send advertising SMS or spam SMS to a lot of recipient

Posted by RITVN on January 20, 2018

How to send SMS via DCOM 3G

  • Written by Mai Vĩnh Thông (MVT) from Casewhere team *

If you want to send advertising SMS or spam SMS to a lot of recipient, I will show you in this article how to do that through a GSM modem or DCOM 3G using AT commands without using any third party library. (What is AT commands? You can reference on other document)

Connect DCOM 3G to PC

To send SMS messages, first place a valid SIM card into DCOM 3G or GSM modem, which is then connected to a computer. There are several ways to connect GSM modem to a computer. For example, they can be connected through a serial cable, a USB cable etc. No matter what way you use, computer still communicates modem via serial port interface.

hsdpa

siemens

You can check the serial port that connect with modem by go to Device manager program. In below picture, I connected my DCOM 3G to PC and it communicating as serial port (COM 10).

siemens

Use a terminal program to send SMS

Download and install RealTerm on https://sourceforge.net/projects/realterm/ A RealTerm’s function is like this: It sends the characters you typed to the GSM modem. It then displays the response it receives from the GSM modem on the screen. Alter install RealTerm, run it and go to Port tab:

realterm

Select Baud is 9600, the port is 10 (corresponding with serial port of GSM modem) then click Change button, then go to Send tab:

realterm2

Type “AT” command and check “+CR” to tell us that send a CR control character bellow. Click Send ASCII button and wait for “OK” response message.

realterm3

The other lines are responses returned from the GSM modem

AT
OK
AT+CMGF=1
OK
AT+CMGS="+8409xxxxxxx"
>Hello word
0x1A

Here are descriptions of what is done:

  • Line 1: “AT” is the test command, it sent to modem to test connection. GSM modem sends back the result code is “OK”, that is mean the GSM modem works fine.
  • Line 2: “AT+CMGS=1”, this command sent to modem to change operation of modem in SMS text mode (The modem can be work on text mode and PDU mode). GSM modem sends back the result code is “OK”.
  • Line 3: AT+CMGW=”” is used to specify the phone number to of message.
  • Line 4: Message content
  • Line 5: 0x1A to instruct end of batch job and send message.

That are all commands to send a SMS message. If you want to collect them and send SMS automatically, you can write the source code for connecting to and sending AT commands to the GSM modem, just like what a terminal program does.

We are hiring

Would you like to work with the coolest IT guys in Vietnam? Apply to one of the following jobs:

C# / .Net Developer
Senior / Specialist
1000 – 3000 USD

Job requires a high level of technical skills and experience within Microsoft technologies and offers high salary, exciting projects, and constant challenges in terms of technology and design.

Tell me more
Xamarin Developer
Experienced
800 – 1500 USD

Want to have fun developing innovative Xamarin products? We are developing a number of exciting games and social applications of our own as well as supporting third party clients.

Tell me more
Technical Writer
Advanced English
2000 – 4000 USD

Job requires both good English as well as the ability to understand complex technical subjects and systems. You will mainly be writing SEO articles and guidelines for our many products.

Tell me more
Front-End Developers
Experienced
1000 – 2500 USD

We are looking to fill Developer positions with a new team that uses JavaScript, TypeScript, HTML5, AngularJS.
Knowing Ionic framework or NodeJs is a plus, but is not mandatory.

Tell me more
.NET/WPF Developers
Advanced English
1000 – 3000 USD

2 Senior Developer positions in an Offshore Development Center team. You will work directly with a Danish Project Manager at our Vietnam office. The initial project is for a multinational French company.

Tell me more
Ruby/Cucumber QA/Test engineering
Advanced English
1000 – 2000 USD

1 Senior QA/Test Engineer in an Offshore Development Center team. You will work directly with a Danish Project Manager at our Vietnam office. The initial project is for a multinational French company.

Tell me more