Click here to Skip to main content
15,917,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello , i would like to communicate with gsm modem using AT commands in vc++ but i unable to do so.I tried in different ways but unable to read data.so please help me....its urgent.......thank you in advance.
Posted
Updated 20-Mar-11 23:25pm
v2

First you have to know about the serial communication in VC ++

Here[^]

Using the serial Port class/object you can send(commands)/receive(responses) from your modem.
 
Share this answer
 
Comments
P S D 18-Mar-11 0:55am    
Hello sir,first of all i would thank for giving me response to my post.sir , i tried in many way but while reaading data it fails.....can you give me a code if possible....
Rajesh Anuhya 22-Mar-11 1:23am    
Here is the code

http://www.codeproject.com/KB/system/serial.aspx
I suggest

1)test your gsm modem with serial port terminal first. Be familiar with baud rate,data bits, error checking...

2)some devices require set bit dtr (data transmit ready?)or rts (ready to send?) to true.

3)In some case you need to send "unsigned char"
 
Share this answer
 
v3
Comments
P S D 18-Mar-11 0:58am    
Hello sir,first of all i would thank for giving me response to my post.Sir i tested my modem on hyperterminal and it is working fine....but through vc++ it is not....can you me a sample code which will connect to gsm modem through vc++...........
Du Sijun 18-Mar-11 3:22am    
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx

http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/6d47261b-27c6-45d4-8c02-81d1490011fd

Please check if it works.

I work around seiarl port with assembly,microcontroller,c#,vb,java but not try c++ yet.
P S D 18-Mar-11 5:57am    
hello sir,In first link which system.dll we have to include.....if possible can you give me a program.........its urgent.....plz...
Du Sijun 18-Mar-11 6:01am    
this may help:
http://www.codeproject.com/KB/system/serial.aspx
P S D 18-Mar-11 8:04am    
Sir ,In above link there is a problem while reading data.....i tried but showing errors....i also made changes according to my databits,baud rate but still giving errors....plz help sir...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900