v1.1 Released (19 Jul 2013)

See changes for info.

Discussion group available.

There is a discussion group available at http://groups.google.com/group/smsrobot

What is it?

SMSRobot is a windows service, implemented in C#, which enables your PC to send SMSs using an array of modems physically connected to it.

System architecture is shown below.

Enqueuer module is implemented as WCF daemon. It receives SMS submission requests from clients. You can implement your own client in a number of different ways: console application, winform application, daemon, etc. Received SMSs are enqueued in a RDBMS database table. Dispatcher module pools the RDBMS table and sends enqueued SMSs as fast as possible. It concurrently drives all the available modems by using multiple application threads.

Since the software is based on NHibernate library, database portability is assured: Oracle, SqlServer, MySql, Postgres, SQLite, Firebird, etc.


How do I install SMSRobot?

See INSTALL file in the distribution package.

Which RDBMSs are supported?

Almost every RDBMS. SMSRobot is based on NHibernate library. You have just to change SMSRobot's configuration file according to your database technology.

What is the maximum reachable SMS sending rate?

It depends on how many modems you use. Each modem sends about 0.2 SMSs per second. So, for example, if you have 10 modems connected to your PC (presumably using a USB hub) you can send 120 SMSs per minute, which is 7200 SMSs per hour.

Is there any client already set up for SMS submission?

Yes. The distributed files contain a console application client. It can be used by a command line like this:

> smspush "+12345678" "Text of the message here"

This client consumes the WCF service exposed by the Enqueuer module. You can embed such a client in your applications.

How do I implement my own client?

It is just a matter of consuming a WCF service. Reference the service from your code project (Add Service Reference...). Then, consume the service using something like:

    using (var client = new ServiceReference1.SMSEnqueuerWcfClient())
      client.SendSMS("+12345678", "Test SMS");

What modems are currently supported?

Currently, SMSRobot controls modems connected via COM port (note that USB modems are COM-compliant). Furthermore, modems have to be compatible with standard AT commands. In order to discover whether your modem is compatible, you can open a Hyperterminal connection to your modem. Once connected, you can type the following commands (change +12345678 with your phone number).

    YOU   : AT
    MODEM : +OK
    YOU   : AT+CMGF=1
    MODEM : +OK
    YOU   : AT+CMGS="+12345678"
    MODEM : >
    YOU   : Text of the message here!<CTRL+Z>
    MODEM : +OK

After pressing <CTRL+Z>, the SMS should immediately be delivered to the telecom operator. Should not be the case, maybe your modem does not support AT protocol.

What about controlling AT modems?

If you cannot code, you can ask me. Otherwise, you can write your own class to control your modem. Take inspiration from NokiaStyleSmsEngine.cs. It contains the code to control the supported modem. If you are lucky, you might have to change just the lines containing the protocol commands. The new class name must be referenced in the SMSEngines.xml under the property ConcreteEngineClassName of the Engine section. Please, if you send me your new class, I can add it to the project. Thanks.

Why does SMSRobot need a database to work?

SMSRobot is more than a one-by-one SMS gateway. Thanks to its queue, it is able to accept a batch of SMSs as large as you want. Then, it manages the delivery queue in an asynchronous and reliable fashion. Even in case of hardware failures (e.g. local network unavailability, telco network congestion, modem misconfiguration, etc.), it keeps on trying to send enqueued SMSs. Furthermore, it keeps history of sent SMSs.

Can SMSRobot delete a SMS from database once delivered?

No. This feature will be implemented in the next releases.

Can I directly feed the RDBMS table to send SMSs?

Yes, although it is the dirty way. The sql INSERT command should look as follows.

    //Mysql way
    INSERT INTO Sms (Id, Message, PhoneNumber, EnqueueTime)
    VALUES (UNHEX(REPLACE(UUID(),'-','')), 'Test SMS', '+12345678', current_timestamp)
    //Oracle way
    INSERT INTO Sms (Id, Message, PhoneNumber, EnqueueTime)
    VALUES (sys_guid(), 'Test SMS', '+12345678', current_timestamp)
For other DMBS technologies, you have to find the right way to insert a Guid into a database row.

May I run Sender service, Enqueuer service and RDBMS on the same machine?

Yes. Of course.


You can contact SMSRobot author to:


v1.1 (19 Jul 2013)

MySql database connection updated to MySql5 - Guids now are stored as BINARY(16).

log4net library used - Now SMSSender logs onto a log.txt file in the binary folder.

Log file rolls as soon as it reaches 200KB in size. 50 total files are stored. log4net configuration can be easily changed through SMSSenderService.exe.config file in the binary folder.


First release.