Loading

.NET SMS SERVER with Database (Sending and Receiving SMS using AT Commands via GSM Modem/GSM Phone )

Submitted by: 
Visitors have accessed this post 76351 times.


You can request for the Demo version or Purchase the full source code of .NET SMS Server (pure AT commands, no OCX or dll) , just contact me @ the addresses below. DEMO CODE: As requested, here's the .NET version of Sending SMS using AT commands. It is tested on a Nokia E63 using bluetooth communication and to a USB GSM Modem. Please download the sample project(.zip) For Questions and Comments:

Mobile

+639212279363

Blog Site

http://www.freeprogrammingtricks.com/

Facebook Fan Page

http://www.facebook.com/emondsoft/

Skype

My status




Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

cidfrey's picture

Let me try this master !!

emond's picture

hehehe,,cge ba

thank you!

emond's picture

welcome..Hope it will help you..

all the best

cedrick blas's picture

wow astig. this is wat ive looking for :) salamat sir. galing mo tlaga!

emond's picture

ehehehh.. welcome, Improve nyo nlng lgyan nyo ng error handlers, modem time out, etc.

all the best,

cedrick blas's picture

sir pa help naman sa mysql. how do i configure a remote connection.
how can i connect to other pc.
4 instance PC-1 and PC-2

PC-1 is my server where my database located
PC-2 a client wants to access on the database(PC-1)

im using mysql as my database. navicat as my database management.
connector -ODBC v: 5.1.6

help on my connection string! or any idea sir?

emond's picture

make sure you can access your network in order to communicate with the remote database on PC-1. and use these connection strings.

Remote database

Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;

Specifying TCP/IP port

Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;

The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL.

hope it will help you..

cedrick blas's picture

thank you boss :) love it :)
same poh ba sa sql server? im using sql server 2008. attached db nga lang. but iwant it also in a server client connection. i tried it but i cant connect it it says der that " cant connect to ASHEN-PC"

ashen-pc - name of my pc1.
pc 2- trying to connect to pc1

emond's picture

Attach a database file on connect to a local SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;

Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

Attach a database file, located in the data directory, on connect to a local SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;

Using an User Instance on a local SQL Server Express instance
The User Instance functionality creates a new SQL Server instance on the fly during connect. This works only on a local SQL Server 2005 instance and only when connecting using windows authentication over local named pipes. The purpose is to be able to create a full rights SQL Server instance to a user with limited administrative rights on the computer.

Data Source=.\SQLExpress;Integrated Security=true; AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;

======================================
Standard Security

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.

Standard Security alternative syntax
This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

Trusted Connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

Trusted Connection alternative syntax
This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Connecting to an SQL Server instance
The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.

Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;

Connect via an IP address

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.

CEDRICK BLAS

"Use serverName\instanceName as Data Source to connect to a specific SQL Server instance"

sir im always using the instance name "SQLEXPRESS" but when i remove it cant connect to sqlserver.

can u please solve this:

assume i have 2 pc's PC1 and PC2
i dont have net connection. i just want to test my application. i used crossover-cable to connect my 2 pc's. i can ping each other.

PC1 as server
PC2 as client

my database is located at pc1 and pc2 want to access it i used this connection string but ive got an error saying...

" A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections".......

im using windows 7, sqlserver 2005, visual studio 2008
tnx..please help. i need it to my server client voting system

sir do you know how to make CAI tutoring system?

how about i'm not using odcb object....

i'm using this piece of code to connect app to the mysql database...

dim conn as mysqlconnection
conn = New MySqlConnection("server=localhost; user id=root; password=; database=datase")
conn.Open()

but like cedrick....

i want to connect my server to another pc

nice, very nice emond!

Well done for your coding

(i am a fan from Greece)

Anastasios
Senior Developer

emond's picture

thank you so much,
can i have your email address?

all the best,

jaysfall's picture

Sir gumagana po ba yan..?:)

emond's picture

It is tested in several GPRS/GSM modems, Nokia E63, N70, moto L7, with Bluetooth PC connectivity.

jaysfall's picture

tenx sir.. :D

using System;
using System.Collections.Generic;
using System.Text;
using System.IO.Ports;
using System.Windows.Forms;
namespace smsTest
{
class SmsClass
{
SerialPort serialPort;
public SmsClass(string comPort,string cellNo,string messages)
{
this.serialPort = new SerialPort();
this.serialPort.PortName = comPort;
this.serialPort.BaudRate = 9600;
this.serialPort.Parity = Parity.None;
this.serialPort.DataBits = 8;
this.serialPort.StopBits = StopBits.One;
this.serialPort.Handshake = Handshake.RequestToSend;
this.serialPort.DtrEnable = true;
this.serialPort.RtsEnable = true;
this.serialPort.Open();
try
{
this.serialPort.WriteLine(@"AT" + Environment.NewLine);
this.serialPort.WriteLine(@"AT+CMGF=1" + Environment.NewLine);
this.serialPort.WriteLine(@"AT+CMGS=""" + cellNo + @"""" + Environment.NewLine);
this.serialPort.WriteLine(@">" + messages + (char)(26));
System.Threading.Thread.Sleep(120);
}
catch (Exception ex)
{
MessageBox.Show(ex.Source);
}
}
}
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;

namespace smsTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
SmsClass sm = new SmsClass("COM8",
"+8801719347580", "this is my test sms from pc");
}
}
}

Sir good day can i ask you a favor kng ok lang pwede po bah ma used ung program nyu bwt SMS recieve gamitin namin sana sa Texter choice..thank you.

cedrick blas's picture

nabuhay c jay hahah musta rocket jan tol?

jaysfall's picture

ok lang nman..add mo nga ko sa fb account pra chitchat..

cedrick blas's picture

sure hehehe yan post mo email yan ba email mo sa fb?

hi, im searching for project on travel agency in vb.net 2003

emond's picture

major update for the .NET version, C and C++ version is coming up.

Hi Can you mail the code at pankajmatta@gmail.com

Thanks

Pankaj

dear emond
i am looking send/receive sms code on c#.net if u dont mind could u please send the code to my emial id (lok.bunny@gmail.com) u are solving all others requests, i hope u will full fill my request ,
great thankful to u

bunny.

You done greate job man.

You are genious person in mobile communication.

I have download ur code but not found project file to open project. can you please send me on following email address.

jc.mca1985@gmail.com

Thanks and Regards,
Jignesh

+91 9998999756

Hi, thank's for you great job
But I have some problem here
I'm using A nokia 6300 (connected with USB cable on port 19)
I change the port number in the application to 19
But the application stop at this line
.Write("AT" & vbCrLf)

any help please?

..thanks pu..pwde pconvert sa php??super thanks poh..pls email me:
ansuprekprek_11@yahoo.com..more powerness..:p

Cool

Where is the link for download your code?

Pls send me this code. My email : hafij_cse@yahoo.com

please help....

how to display the time in a web page using .net C#?
how to set the time expiration?
for example if i have an integer number that retrieve from database...

I have this code already

DateTime timeExpire= new DateTime();
timeExpire= DateTime.Now.AddMinutes(integerNo);

I need to match the timeExpire to the ticking current time so that it will expire. How to do this in .Net C#?

hi, where to download the source code? thanks.

emond's picture

email me @ dark_raditz0825@yahoo.com

this is project is very goo can you end to source on

hari_kris11@yahoo.co.in

plz do send me the code of .NET SMS SERVER with database(sending and receiving SMS using AT commands via GSM Modem/GSM phone)
email me at triamb18@gmail.com

Hi
Can u send me the code of your project, as i m trying to do the same project but it is finding very difficult to get the information.
My email:ketandalvi1989@gmail.com

hi

Doing a Gsm and Gps Vehicle tracking system as my final year project so could u send me this code on evannoelchi@gmail.com

Can i have the source code sir? kentlytears@yahoo.com from pampanga.

Hie..
Can u please send me Read code for SMS In C# using AT commands..Wud be very pleased to get ur reply..

Please i need the code in c# too.

Mi mail is: jluisz3@yahoo.com.mx

Where is download link?
pls send code @
ravi.kumar.sahu06@gmail.com

pls send code @
jjudson82@ymail.com

Hi,
plz send me the code of .NET SMS SERVER with database(sending and receiving SMS using AT commands via GSM Modem/GSM phone)

email me at-- aanantraj@yahoo.com

thanks a lot

please send me the code at
ijc_info@yahoo.com

Sir Emond,

Good day po sir, pwede ko pong mahingi ang source code ng program nyo. Email address ko po; danonuevo@gmail.com.

Thank you very much and more power po.

darius

Sir Emond,

Good day po sir, pwede ko pong mahingi ang source code ng program nyo. Email address ko po; danonuevo@gmail.com.

Thank you very much and more power po.

darius

Pages

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.