Using AT commands with C

there is a AT commands here

suppose i want to work with C visual or ++, how can i use this AT commands in a what that it will be sent to the mobile phone that will be connected to the computer

for example this is the at command to read unread sms
how i can write it inside the c code, in a way that it will send this command to the mobile phone?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sasha85Author Commented:
how to open socket or port?
how to send the at commends to this port?
You can use a COM port.
A good article on windows serial communication:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sasha85Author Commented:
i tried every part of the code in the link but it somehow not work...when i look inside the settings 'phone and modems' i see the nokia and the motorola that i tried to connect on com 4
i set it on com 4 inside the string but i realy got no idea in what order this code need to be...msdn give only part and not the all code example:(
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

sasha85Author Commented:
i want to do this in C#
sasha85Author Commented:
what is the diffrences in coding  between serial rs232 cable and USB cable?
There is no difference. Applications manage a modem as a serial device using a COM port; the phisical layer differences are managed at driver level.
sasha85Author Commented:
there is no even speed deiffrences??
I don't know... i think performance may be different
sasha85Author Commented:
and how i transfer the at commands to the phone?
System.IO.Ports.SerialPort port = new System.IO.Ports.SerialPort( "COM4", 115200, Parity.None, 8, StopBits.One);
port.ReadTimeout = 500;
  string str = port.ReadLine();
offcourse there is a speed difference between COM port and USB communication. anyhow, you can use the createfile to open comport and write function to send output. you can get the code of win32 example in this link(download link is there).
sasha85Author Commented:
for example i got 10,000 sms at a income limit is 200 sms
the program will need to read each sms than to procces it and delete it and read the new one...

speed is highly important...may be i will need a special GSM modem and not a regular mobile phone?
10,000 SMS happens frequently then its a design flaw, why GSM modem is choosen instead of going for GPRS/data connection?
sasha85Author Commented:
i ment to write 1000 sms and not 10000...
i manage to get
Sierra Wireless AirCard 875U USB

i got it here it looking at me and i don't know how to communicate with this...cause i don't know what at command i have to use...i am sure it want to say something to me:)

*for gsm/data connection, as i understand i need to pay the service provider company...because it for study project and my budget limitted i cannot do this...
u can use the 3G AT commands as your card is 3G card.
u can check both of the following link.
sasha85Author Commented:
i realy tried to understand what i am reading on this link but i realy do not understand how 3G and my
Sierra Wireless AirCard 875U USB  connected?
sasha85Author Commented:
its gsm card...
did u try to use the commands listed in the link? it will serve your purpose..
I suggest first trying to establish comminications manually.  Use the Windows program named "Hyperterminal"  to see if the device accepts simple AT commands.  Start > All Programs > Accessories > Communications

Once you know that you can "converse" with the device manually, you've taken the first "baby step"  towards writing code to do the same thing programamtically.
sasha85Author Commented:
ok...i just lost 2 weeks:(
this system have to run on linux...that means that c# or visual not good for this...

i will have to start all over again with c++
someone can please help me only with the part of communicating with the phone modem?
i mean opening the port and talking to the device...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.