Home - Search - Members
Full Version: communication between GSM modem and PIC microcontroller
monika
Apr 8 2008, 10:36 PM
i m using a maestro modem which supports both text and PDU mode. and i m interfacing it with PIC 917.

i m able to send AT-commands using hyperterminal with the modem but when i communicate with the microcontroller, i m not able to get the response of AT-commands.
i m sending a string like this:
putc("AT \r\n");

but it is not giving the required response.....it is not giving OK...
what should i do????
Plz help me on this....
shyam
Apr 9 2008, 12:03 AM
u r using putc ?????
is it meant to send char or string please check and reply!!!
monika
Apr 9 2008, 3:20 AM
i m displaying the output on LCD, for that i have written a code.....
which u can see in the attachment.....
plz tell me where i m wrong.....

one more thing i want 2 know....if i will send msg, then can i write the code for text mode for reading the msg ( no need 4 PDU mode,bcoz my modem supports text mode 2)

include.pdf
Ajay
Apr 9 2008, 8:32 AM
first do check what shyam said.
There are few mistakes you might missed out. There is only carriage return while sending at command. So you don't need \n
also i think you have given space between at and \r which could be the point of error.

to enable text mode do read your modem's manual carefully.

instead of using putc use puts
monika
Apr 9 2008, 9:50 PM
i already did that. i compiled my code without /n. but result was same. No response of AT-command is comming. and there is no space b/w at and /r.

i can't understand what is the problem with my code.....is there any mistake plz guide me...
shyam
Apr 11 2008, 11:15 PM
first of all please check if ur modem and controller can communicate properly..

u have tested modem with the PC ...

now test ur controler the same way see if u can reeive data from PIC(controller) to the hyperterminal..

monika
Apr 13 2008, 3:37 PM
yes i have tested PIC with hyperterminal..and it is responding fine..
problem arises when i interface modem with PIC.then there is no response on LCD.

my hardware connections are ----

for DB-9 connector-
pins 1,4,6 are connected.
pins 7 and 8 are connected.
5 is ground.
pin 2 is connected to TX of MAX and pin 3 is connected to RX.

Plz check the connections and guide me accordingly....
monika
Apr 24 2008, 8:21 PM
can anybody guide me what can can be the correct schematic for interfacing GSM modem with PIC microcontroller......

i hv done the above mentioned connections bt these are not working when used with modem. these are working fine with hyperterminal.
Ajay
Apr 25 2008, 5:13 AM
make DTR and RTS pin of DB9 connector on board high.. and then try sending at commands..
shyam
Apr 25 2008, 5:28 AM
does your maestro modem have a serial DB9 intervace or did it come with some special cable???
Shailesh NAYAK
Apr 27 2008, 10:11 PM
Hi Monika,
Could you give paste response of feve command asked?
1) ATi3
2) AT+WOPEN=2
3)AT+WOPEN?
Please also type ATE0 (it is ATEZERO) and then AT&W. so this will stop echo from MODEM first, then you can use microcontroller. I am sure it will solve your problem. also try to handle unsolicited responses from the modem. Please let us know if it is solve your problem or not.
monika
Apr 29 2008, 8:48 PM
yes my modem has DB9 connector.
can you tell me what do you mean by making pins 4 and 7 high and what is the significance of it?
sashijoseph
Apr 29 2008, 10:25 PM
Making pins 4&7 high means just that......pull the pins high by connecting them to Vcc (preferably through 4.7k pullups).
Pins 4 and 7 are used for flow control and probably are required to be high for comm. to take place.
You can confirm by checking the voltage on the pins when connected to the PC.
monika
May 20 2008, 6:03 PM
Shailesh NAYAK wrote ...

Hi Monika,
Could you give paste response of feve command asked?
1) ATi3
2) AT+WOPEN=2
3)AT+WOPEN?
Please also type ATE0 (it is ATEZERO) and then AT&W. so this will stop echo from MODEM first, then you can use microcontroller. I am sure it will solve your problem. also try to handle unsolicited responses from the modem. Please let us know if it is solve your problem or not.


This is the response of the commands:

ATi3
657c09gg.Q24PL001 1956992 042407 11:29

OK

AT+WOPEN=2
+WOPEN: 2,"AT v03.12","AT v03.12"

OK

what is the significance of these commands?
Ajay
May 20 2008, 7:44 PM
can you tell us your basic application?
and are you using only PIC?

you can also make use of OpenAT to program your modem.

regarding AT+WOPEN:

This specific command allows to start, stop, delete and get information about the
current Open AT® embedded application.
This command also allows to erase the Open AT® flash objects storage place, and
configure the Application & Data (A&D) storage place size. Please refer to the Open
AT® development guides for more information.

AT+WOPEN = 0 : stop application
AT+WOPEN = 1 : Start application
AT+WOPEN = 2 : Get open AT library version
AT+WOPEN = 3 : Erase flash objects
AT+WOPEN = 4 : Erace embedded application

AT+WOPEN? : current state (either OpenAT application running or not)
please do not use the commands unless you know what you are doing.
shyam
May 20 2008, 8:13 PM
the responses tell us the OS used i.e. 3.12
and the firmware is 657c

these help in troubleshooting things!...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Rickey's World © 2003 - 2007