8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  1 [2] 3
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
Ajay
Fri May 30 2008, 12:46AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3529
Thanked 644 times in 609 posts
for this you need to do some string manipulation functions..
see the response you get from AT Commands will always be in the above format.
after the above string you will have the sms data.. and then OK
something like this.

+CMGR: "REC UNREAD", "0146290800",
"98/10/01,18:22:11+00", ABCdefGHI
OK


you can create function which can break this string into parts so that you can get extract information from it.
so do this..
look for index of first "," (comma) and then after that keep reading the string from starting quote to ending quote. you have your number in between that.

c example:
CODE:
while(*response != ',')
        response++;
//after you come out of the above loop you reached the starting of number
response++; //bypass the space
response++; //bypass quote
while(*response != '"'){
        *number = *response;
        number++;
        response++;
}
 

now string number will have your number



www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top



This post has been thanked 1 time
 Judgement 
Judgement
Fri May 30 2008, 01:28PM
 User Offline
Registered Member #7820
Joined: Tue May 13 2008, 03:30PM

Posts: 28
Thanked 0 times in 0 posts
Hey, thanks.
I'll try that out.
Back to top


Shailesh NAYAK
Wed Jun 04 2008, 05:21PM

 User Offline
Registered Member #2498
Joined: Mon Jul 23 2007, 01:20AM

Posts: 39
Thanked 9 times in 7 posts
Hi,
You can register yourself in Wavecom Website. and can get downloaded AT Command Interface guide. Also try to get some basic knowledge of GSM modem and phone behavior, so it will be more helpful for you to interface with MICON.

Best Regards

Shailesh S. NAYAK
Back to top


Judgement
Tue Jun 24 2008, 07:07PM
 User Offline
Registered Member #7820
Joined: Tue May 13 2008, 03:30PM

Posts: 28
Thanked 0 times in 0 posts
Alright, I can get my 8051 to communicate with my serial port and now I have another problem. How do I send sms with the GSM in C? I know how to send strings to read and delete SMS but I have a problem with sending SMS.

Sending SMS for my GSM is:
AT+CMGS = +123456789 [enter button]
<sms message here> [control+Z]

The problem is I don't know how to input the enter button and the control+Z into the string. Thanks.
Back to top


say2paul
Tue Jun 24 2008, 10:46PM
 User Offline
Registered Member #8461
Joined: Tue Jun 17 2008, 10:56AM

Posts: 123
Thanked 6 times in 6 posts
Judgement wrote ...

Alright, I can get my 8051 to communicate with my serial port and now I have another problem. How do I send sms with the GSM in C? I know how to send strings to read and delete SMS but I have a problem with sending SMS.

Sending SMS for my GSM is:
AT+CMGS = +123456789 [enter button]
<sms message here> [control+Z]

The problem is I don't know how to input the enter button and the control+Z into the string. Thanks.


\r\n should work here, if don't then you can try with the hex code of Line feed/Carriage return. I had not tried it yet so don't know if it works!
Back to top


Judgement
Wed Jun 25 2008, 12:04AM
 User Offline
Registered Member #7820
Joined: Tue May 13 2008, 03:30PM

Posts: 28
Thanked 0 times in 0 posts
say2paul wrote ...

Judgement wrote ...

Alright, I can get my 8051 to communicate with my serial port and now I have another problem. How do I send sms with the GSM in C? I know how to send strings to read and delete SMS but I have a problem with sending SMS.

Sending SMS for my GSM is:
AT+CMGS = +123456789 [enter button]
<sms message here> [control+Z]

The problem is I don't know how to input the enter button and the control+Z into the string. Thanks.


\r\n should work here, if don't then you can try with the hex code of Line feed/Carriage return. I had not tried it yet so don't know if it works!


Hmm..I've thought of using \r\n as well but I haven't tried it out yet. I don't think it works that way...
Back to top


say2paul
Wed Jun 25 2008, 01:21AM
 User Offline
Registered Member #8461
Joined: Tue Jun 17 2008, 10:56AM

Posts: 123
Thanked 6 times in 6 posts
Judgement wrote ...

say2paul wrote ...

Judgement wrote ...

Alright, I can get my 8051 to communicate with my serial port and now I have another problem. How do I send sms with the GSM in C? I know how to send strings to read and delete SMS but I have a problem with sending SMS.

Sending SMS for my GSM is:
AT+CMGS = +123456789 [enter button]
<sms message here> [control+Z]

The problem is I don't know how to input the enter button and the control+Z into the string. Thanks.


\r\n should work here, if don't then you can try with the hex code of Line feed/Carriage return. I had not tried it yet so don't know if it works!


Hmm..I've thought of using \r\n as well but I haven't tried it out yet. I don't think it works that way...



You are lucky you reached at the point where you are sending AT commands from 8051 to mobile phone.

I am still finding how to connect my mobile phone with microcontroller

Back to top


Judgement
Wed Jun 25 2008, 04:27AM
 User Offline
Registered Member #7820
Joined: Tue May 13 2008, 03:30PM

Posts: 28
Thanked 0 times in 0 posts
say2paul wrote ...

You are lucky you reached at the point where you are sending AT commands from 8051 to mobile phone.

I am still finding how to connect my mobile phone with microcontroller

Well, I'm using a GSM modem instead of a mobile phone. I think its easier to configure the 8051 to communicate with the GSM as compared to a mobile phone. Good luck on your project.
Back to top


Judgement
Wed Jun 25 2008, 06:13PM
 User Offline
Registered Member #7820
Joined: Tue May 13 2008, 03:30PM

Posts: 28
Thanked 0 times in 0 posts
I have 1 more question. I'll post it up with my old question.

Alright, I can get my 8051 to communicate with my serial port and now I have another problem. How do I send sms with the GSM in C? I know how to send strings to read and delete SMS but I have a problem with sending SMS.

Sending SMS for my GSM is:
AT+CMGS = +123456789 [enter button]
<sms message here> [control+Z]

The problem is I don't know how to input the enter button and the control+Z into the string in C language. Thanks.

Also, I want to do something like a timed SMS. The user send an SMS eg. 1 Hour.
Then, the 8051 programs the GSM modem to send an SMS 1 hour later. How can I do something like that in C language? Thanks.
Back to top


Judgement
Thu Jun 26 2008, 12:27AM
 User Offline
Registered Member #7820
Joined: Tue May 13 2008, 03:30PM

Posts: 28
Thanked 0 times in 0 posts
Ok, I've solved the sending SMS problem. However, I still have some problems with the timed SMS thing.
Hope to see some replies soon. Thanks.

[ Edited Thu Jun 26 2008, 12:28AM ]
Back to top


Go to page  1 [2] 3  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems