DotNet Messaging

Download "DotNet Messaging" android application to your phone. Install "NerdsInn.Messaging" package in your project.And enjoy sending & reciving SMS from your phone using .net applicaions.

Download Android Application

Updates are comming in android application this week. Which will allow you some new features.Be updated.


"DotNet Messaging" have two main components. The android application "DotNet Messaging" & .net package "NerdsInn.Messaging". Which let developers send sms from their .net application using their android mobile device. Currently usually a GSM modem or old GSM supported mobile phones are used in conjunction with .net application to send messages to contacts, but now anyone can connect their android mobile phone with .net application to send messages to the intended person.


  • Easy Integration with .net technologies such as C#, etc.
  • Send SMS from your smartphone/tablets by using .net code in your application
  • Receive SMS from your smartphone/tablets to your .net application
  • Connect to your PC through Wifi , USB cable or any local network
  • Connect multiple devices to single Instance/PC
  • Fast Sending and Receiving SMS


Step: 1

Download and install DotNet Messaging android applicaton to your smart phone from playstore.

Step: 2

Open "Package Manager Console" Window In Visual Studio. And run the below command.This Package is hosted on

Install-package NerdsInn.Messaging


Example code for window form application in c#

// use NerdsInn.Messaging namespace at the top of your project.
private void Form1_Load(object sender, EventArgs e)
SMSController smsController = new SMSController();
//SMSController smsController = new SMSController(3333); Connection on different port
//SMSController smsController = new SMSController("",3333); Connection on different IP & different port(In case of multiple NetworkInterfaces)
var isWatching = smsController.StartWatching();
if (isWatching)
smsController.OnDeviceConnected += SMSController_OnDeviceConnected;
smsController.OnDeviceDisconnected += SMSController_OnDeviceDisconnected;
smsController.OnMessageReceived += SMSController_OnMessageReceived;
smsController.OnPassCodeVerified += SMSController_OnPassCodeVerified;
smsController.OnMessageSent += SMSController_OnMessageSent;
smsController.OnDeviceUnblocked += SMSController_OnDeviceUnblocked;
smsController.OnDeviceBlocked += SMSController_OnDeviceBlocked;

private void SMSController_OnMessageSent(object sender, SMSController.SMS sms)
MessageBox.Show("Message Sent to : " + sms.address);

private void SMSController_OnPassCodeVerified(object sender, SMSController.Device device)
MessageBox.Show("PassCode Verified Successfully on "+ device.imei);

private void SMSController_OnMessageReceived(object sender, SMSController.SMS sms)
MessageBox.Show("Message Received : " + sms.body);

private void SMSController_OnDeviceDisconnected(object sender, SMSController.Device device)
MessageBox.Show(device.imei + " - Disconnected");

private void SMSController_OnDeviceUnblocked(object sender, SMSController.Device device)
MessageBox.Show(device.imei + " - UnBlocked");
private void SMSController_OnDeviceBlocked(object sender, SMSController.Device device)
MessageBox.Show(device.imei + " - Blocked");


  • .Net framework 4.5 or higher
  • Administrator privileges are required


Note: We are using smsController with events and function in this documentation. which is an instance of SMSController.
SMSController smsController = new SMSController();   



Triggered when a new device is connected to the system:

Provide the device object which is an instance of SMSController.Device clase.This object provide information about the connected device. Also you have the ability to perform below action on that device

  • You can send SMS to that device by device.SendSMS(SMSController.SMS sms)
  • You can add device to verified devices list device.Verify(SMSController smsController)
  • You can add that device to block devices list device.Block(SMSController smsController)
  • You can send passcode to that device device.RequestPassCode(string passcode)
  • You can also disconnect the connected device by calling device.Disconnect(SMSController smsController)


Called when a connected device disconnected.


Triggered on arrival of a new SMS.

Provide the SMS object which is an instance of SMSController.SMS class. This object provide information about the new SMS & it device.


Triggered when sms sent successfully.


Triggered when device blocked successfully.


Triggered when device unblocked.


Triggered when device passcode matched to server passcode.



SMSController(Int32 Port=3000)

SMSController(string Ip,Int32 Port=3000)

SMSController(IPEndPoint _IPEndPoint)

This is the constructor of the "SMSController" class has three overloaded methods. You can pass custom port number and custom IP if you want to start communication on different Ip & Port.


public bool StartWatching()

Application start watching for any activity on the given port.


public Device GetDeviceByIMEI(Int64 IMEI)

This function will return a device from connected devices by IMEI number.


public Device GetDeviceByConnecionId(string ConnectionId)

This function will return a device from connected devices by ConnectionId.


public List AllConnectedDevices()

It will return the list of all connected devices.


public List AllVerifiedDevices()

It will return list of all devices that are verified.


public List AllBlockedDevices()

It will return list of all devices that has been blocked.


public string GetAddress()

This function will return the full address which is using for communication.


public IPAddress GetIP()

This function will return the ip address part from the address which is using for communication.


public IPEndPoint GetPort()

This function will return the Port number of address.


public IPEndPoint GetPort()

This function will return the Port number of address.


public bool SendSMS(SMS sms)

This function will send sms to from that device.


public void RequestPassCode(string passCode)

This function ask for a passcode from a device.


public bool Verify(SMSController smsController)

This function will add a device to verified list.


public bool Block(SMSController smsController)

This function will add a device to blocked list.


public bool Unblock(SMSController smsController)

This function will remove a device from block list but still not in verified list.


public bool IsBlocked(SMSController smsController)

This function check if a device is in blocked list.


public bool IsVerified(SMSController smsController)

This function check if a device is in verified list.


public bool Disconnect(SMSController smsController)

This function will disconnect a device.


public bool Send(Device device)

public bool Send(List devices)

This function is similler to device.SendSMS().