CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

SMS protocol!!!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ambivalent
Guest







SMS protocol!!!
PostPosted: Mon Oct 03, 2005 3:33 am     Reply with quote

i was wondering if anyone here has ever implemented SMS and GPRS protocols using the AT command set. if any one has then please can you tell me about the difficulties associated with them.

thankyou
Take care
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Mon Oct 03, 2005 3:53 am     Reply with quote

I'm busy with it in my current project. In the beginning I had problems with receiving data. But I now just buffer it in a string and then evaluate. I also se an interrupt for receiving. It just made life easier...
ambivalent
Guest







SMS protocol!!
PostPosted: Mon Oct 03, 2005 5:19 am     Reply with quote

thankyou Foppie for your reply. i want to implement the SMS protocol using PIC micorcontroller 16f877a as part of my project. can you plz guide me as to how i should start. would you recommend any documents or books that i need to read through.
can you tell me what sort of hardware did you use and how do i get to learn about the AT command set (necessary to implement SMS).
Your help in this regard will be greatly appreciated.

Take care
Bye
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Mon Oct 03, 2005 5:41 am     Reply with quote

I can't tell you much about the hardware, but in our project communication between the PIC (I use a 16F877A also) and the GSM part is done by rs232.

In software terms that made thing relatively easy. I just send something with the printf() statement and receive it with an interrupt. As I said receiving was a bit tricky, I wanted to filter usefull information in the interrupt, but that didn't work out for me. So I just put incoming data in the string (size = 96 bytes) and evaluate later.

What I would recommend that you read the AT commands listing of your GSM part. Especially look for where carriage returns and line feeds are positioned. It will help you to fast filter in the interrupt for the end of the message.

What I basically do is:
- send AT command with printf()
- wait till return message is completed (I use a flag in the interrupt)
- evaluate return
- clear variables for next command

Another note:
I don't use any other interrupt routines, just because I might loose data from the returning message. I don't have done any test on what will happen if there are more interrupts, so that's something you will have to test yourself...
ambivalent
Guest







SMS protocol!!
PostPosted: Mon Oct 03, 2005 6:50 am     Reply with quote

thanx for your reply.

i havent as yet decided on which GSM part i am going to use. i wanted a general overview of the whole software and hardware routine for sending an receiving an SMS using pic16f877a microcontroller.

i want to ask you, what exactly did you implement in your project. were u both sending and receiving SMS or just receiving. and as you said that an interrupt was generated everytime you recieved an SMS. you stored the recieved SMS message in a string, wouldnt that have taken alot of RAM.

i was just concerned about the difficulty involved with sending and receiving an SMS through pic. can you plz tell me where to start with my project. what sort of material to read for AT command set.

if it is possible can you paste your code for SMS so i can examine it.

thankyou and take care
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Mon Oct 03, 2005 7:10 am     Reply with quote

Sorry for being unclear, but I don't use SMS in my project. I have looked into it however and I think the basics are the same as what I do.

What I described above is how I handle AT commands. If you write a program that can handle AT commands you will see it's all basically the same.

If you can send an sms with AT commands then you are also able to receive them and vice versa.

It does take a lot of RAM to receive something via AT commands so you will have to write a good protocol for what you send to your PIC in a SMS.

I cannot paste any code but I can give you the AT commands needed with my GSM part to send a SMS:
AT+CMGF=1
AT+CSMP=17,167,0,0
AT+CMGS="<phonenumber>"<Carriage Return><Message><CTRL-Z/ESC>
but this is dependant on the GSM part. Maybe you can google for an AT command list which you can studie (don't studie everything, just the Syntax Despcription part for a start and after that try to find some usefull commands)

Hopefully this helps
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group