Today is...
Monday, May 21, 2018
Welcome to Control.com, the global online
community of automation professionals.
Featured Video...
Featured Video
A tutorial introduction to programming using the QuickBuilder Programming Environment.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Interfacing GSM module with matlab
My aim is to send SMS using GSM module by interfacing with matlab

Hi,

I am working on project where i am using matlab;
hence i want those results of matlab to be sent as SMS through GSM module;

my question:
is there any way i can Interface GSM modem with Matlab?
i want to send SMS directly from matlab using AT commands ..

& i will be using RS232 cable (serial communication with PC)
pls help..
thanx in advance

were you able to perform it?
if yes, please help me in interfacing the gsm module with matlab. Your work seems similar to what i am trying to do

>I am using matlab to try and send an sms through RS232 cable;
>through GSM module;

thank you

By coldbeer123 on 18 May, 2016 - 10:19 pm

I am working on a similar project and i am unable to send the message from the same. Can anyone help me if you had got a better output...

the code i have used is (which is not working):


ss=serial('COM7');
ss.baudrate=9600;
fopen(ss);
ss.Terminator = 'CR'
tx ='AT';
tx1=char(13);
tx2 ='AT+CMGF=1';
tx3 ='AT+CSCS="GSM"';
tx4 ='AT+CMGS="=+919844806008"';
tx5 ='water';
tx6=char(26);
fprintf(ss,'%s',tx);
fprintf(ss,'%s',tx1);
pause(1);
fprintf(ss,'%s',tx2);
fprintf(ss,'%s',tx1);
pause(1);
fprintf(ss,'%s',tx3);
fprintf(ss,'%s',tx1);
pause(1);
fprintf(ss,'%s',tx4);
fprintf(ss,'%s',tx1);
pause(1);
fprintf(ss,'%s',tx5);
pause(1);
fprintf(ss,'%s',tx6);

try writing
tx4 ='AT+CMGS="9844806008"';

>the code i have used is (which is not working):


>ss=serial('COM7');
>ss.baudrate=9600;
>fopen(ss);
>ss.Terminator = 'CR'
>tx ='AT';
>tx1=char(13);
>tx2 ='AT+CMGF=1';
>tx3 ='AT+CSCS="GSM"';
>tx4 ='AT+CMGS="=+919844806008"';
>tx5 ='water';
>tx6=char(26);
>fprintf(ss,'%s',tx);
>fprintf(ss,'%s',tx1);
>pause(1);
>fprintf(ss,'%s',tx2);
>fprintf(ss,'%s',tx1);
>pause(1);
>fprintf(ss,'%s',tx3);
>fprintf(ss,'%s',tx1);
>pause(1);
>fprintf(ss,'%s',tx4);
>fprintf(ss,'%s',tx1);
>pause(1);
>fprintf(ss,'%s',tx5);
>pause(1);
>fprintf(ss,'%s',tx6);