Link to home
Start Free TrialLog in
Avatar of pulchson
pulchson

asked on

sending a SMS to a modem Siemens MC35 T via the RS232 using GSM / GPRS. The SMS consists on a format (password;command;parameter)

I am develloping in C  (using Tasking compiler for C16x) a software which consist of data center ,for sending and receiving SMS per GPRS, and making distance diagnostic task.  The idea of the project  is to send an SMS to activate some  specified task such as update eeproom, receiving data from the mobile station(with the modem), sending data from a fix station with a PC (hyperterminal) through rs232 to modem.
My formal collegue realize this task with GSM and it works, so i have to realize now a GPRS  connection and sending an SMS or e.mail with the format (password;command;parameter) which activate a task on the integreted C167 Processor.

The problem is I have no idea for GPRS at the moment.
1) would you mind helping me in such a way to build this GPRS connection ?

2) How can I code the SMS-Message (command part) in order to activate a specified Task (I wrote the c - code for all tasks as functions)?

3) what is the maximum weight (in bytes ) of an SMS that can be sent  using GSM/GPRS Modem MC35T ?
Avatar of Meff
Meff
Flag of Germany image

>1) would you mind helping me in such a way to build this GPRS connection ?
By using of a GPRS module on http://www.gsm-modem.de/tcp-ip-gprs.html
*** The new feature Easy GPRS inside the GPRS module relieves you from writing the TCP/IP code and making your Internet access as simple as dialling a phone number. ***

> My formal collegue realize this task with GSM and it works, so i have to realize now a GPRS  connection and sending an SMS or e.mail with the format (password;command;parameter) which activate a task on the integreted C167 Processor.

Example EMAIL sending application with Easy GPRS on  http://www.gsm-modem.de/tcp-ip-gprs.html
Let' suppose we want to send with our embedded device an EMAIL by using a SMTP server.
Initial data:
Server to be contacted: smtp.xxxx.com
Application Layer Protocol: SMTP (RFC821)
Sender: "XXXXX"<me@me.com>
Receiver: "Receiver"<receiver@text.com>
Subject: Email Test
Message body: this message is sent for test Easy GPRS feature. Hello World!
GPRS settings:
APN: internet.gprs
IP of GPRS device: dynamically assigned by the network
DNS: assigned by the network
USERID: Micky Mouse
PASSWORD: EASY GPRS
Checking on the RFC990 the SMTP service we can found that the port 25 is dedicated for SMTP
service, therefore our SMTP server will be waiting for incoming connections on that port and we
will fix the EASY GPRS port to be contacted on the remote server exactly to 25.
Second thing we have to discover is whether the transport protocol has to be TCP or UDP; on the
RFC821 we can read that the SMTP Application layer protocol is meant to be on top of TCP/IP
protocol, therefore the transport protocol choice will fall on TCP.
Now we have all the information needed to configure our system.
With our microcontroller we issue to the GM862-GPRS the following AT commands:
AT+CGDCONT = 1,"IP","internet.gprs","0.0.0.0",0,0<cr> (1-GPRS context setting)
AT#USERID = "Meff"<cr> (2-Authentication setting)
AT#PASSWD = "EASY GPRS"<cr> (2-Authentication setting)
AT#SKTSET= 0,25,"smtp.roundsolutions.com"<cr> (3-remote host setting)
For our convenience we store all these parameters with the command:
AT#SKTSAV=1<cr>
Now we can activate the GPRS connection and let the GM862-GPRS module contact the server:
AT#SKTOP<cr>
When we receive the CONNECT indication, then we are exchanging data with the SMTP server
program on the remote host machine.

Now following the SMTP protocol we proceed with the HELO presentation and mail delivery
directly over the serial line (in blu the data sent by us, in violet the one received from host):
220 smtp.xxxx.com ESMTP ; Thu, 5 Jun 2003 14:45:11 +0200
HELO XXXXX.com<cr><lf>
250 smtp.xxxx.com Hello [111.111.111.127], pleased to meet you
MAIL FROM: "XXXXXX"<XXXX@XXXXcom><cr><lf>
250 2.1.0 "XXXXXXXX"<XXX@XXXX.com>... Sender ok
RCPT TO: "Receiver"<receiver@XXXXcom><cr><lf>
250 2.1.5 "XXXX@XXXX.net"... Recipient ok
DATA<cr><lf>
354 Enter mail, end with "." on a line by itself
From: "XXXXX"<XXXX@XXXXcom><cr><lf>
To: "Receiver"<XXXXX@XXXXX.com><cr><lf>
Subject: Email Test<cr><lf>
this message is sent for testing Easy GPRS feature. Hello World!<cr><lf>
.<cr><lf>
250 2.0.0 h55CjBVI020859 Message accepted for delivery

That´s all
Meff

Avatar of pulchson
pulchson

ASKER

Hi Meff,

Thank you very much for your answer.
I am going to test your tips and let you know wether it´s works or not.
I think it will take time because I am working presently on another project.
are you able to write me the same in german-language ?
thank you !

see you.
ASKER CERTIFIED SOLUTION
Avatar of Meff
Meff
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial