Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Connecting MicroController to GSM modem via RS232

Status
Not open for further replies.

mpch_elec

Member level 1
Joined
Jul 22, 2009
Messages
33
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Tehran,Iran
Activity points
1,505
Hi friends,
I connect My micro via RS232 and MAx232 to PC and watch the result in the hyper terminal.
But when i connect my serial port to GSM Modem,the modem does not respond to AT commands...
I think modem not receives any at command...
thanks for your help.
 

check tx and rx connection...use 12V/1A power supply to modem.
put cable and test with terminal.. if you dont get swap tx and rx connection in cable at one end. you will get it
 
Check baud-rate is matching and max232 circuit works well.
 
hi friends,
thanks for your replies,
but i connect my micro-controller to PC and get the AT commands with Hyper terminal...(I see the commands that sent by Micro-controller).
Also i connect my modem to PC and send at command to it and its respond to my commands...
but when i connect my micro to modem, modem not respond.
my ATcommand is: "ATD09367969672;"
after ; i send char(10) and char(13) and i send my character with 300ms delay...
please help me...
tanks

---------- Post added at 10:51 ---------- Previous post was at 10:48 ----------

i connect 7 & 8 pins in DB9 together.
and connect 1 & 4 & 6 together...
 
what is char(10) and char(13)??????????
as i said just execute atd in the format but swap tx and rx pin in cable and try it executing it....

---------- Post added at 15:35 ---------- Previous post was at 15:34 ----------

DB9 connector should be connected with pins 2 , 3 , 5 for tx ,rx and gnd of max232

---------- Post added at 15:36 ---------- Previous post was at 15:35 ----------

check your connections in the pins you mentioned.. seems to be wrong..ou need to use only pin 2,3 , 5 in DB9 connector

y
 

after ur msg send
0x0a //ctrl+z
0x0d //enter
try this too......

combination of these 2 commands are enter. 0x0a is carriage return and 0xod is line feed ... so both signals represent (enter )

---------- Post added at 15:48 ---------- Previous post was at 15:47 ----------

dear mpch_ele post your circuit here... i feel there is problem in your circuit toooo
 

this is my board...
My%20board.png


---------- Post added at 11:48 ---------- Previous post was at 11:47 ----------

i think the problem is DTR and CTS...
Do you know about them?
 

while using hyper terminal,we can use simply ctrl+z to send msg
but while doing with processor we need to send both 0x0a 0x0d
 

Are you using MAX232 between you controller and the MODEM?
If so, then this may be your problem. Some MODEMs/modules work on TTL level (5V & 0V) so, they don't require a level converter (MAX232) as an interface.

Post your MODEM/Module partnumber.
 

@
I use Sim 300 Modem(Not Module).
i think the problem is about DTR and CTS pins...
@abishekmudalur:
i send 0x0a 0x0d that the decimal of thme are 10 and 13 charachters...

---------- Post added at 12:07 ---------- Previous post was at 12:04 ----------

I connect my modem directly to PC so the level of modem is CMOS level.
so if i want to connect my micro to my modem i must use max232.
 

OK, I think you may need to swap the TX & RX pins at the RS232 cable going to the MODEM (i.e: You may need a cross connection). Also, you need the TX, RX and GND pins only.

Hope this helps.
 

yes seadolphin is correct.

Dont send 10 and 13 in decimal format ,,,, send it in hexadecimal format only and no need of delay in sending these characters..........

i did many projects with SIMcom., it does not need those pins mandatory
only tx , rx and ground is enough
 
Hi mpch_elec,

If you have wired DB9 connector as shown in your post#8, then DTR and CTS will not be a problem.

It is configured as Own-handshake Null-modem.(RTS connects to CTS; DSR,DTR,DCD connect together)

You may check that connection also.
 
I Connect My uC to PC with this connection and its work correctly but when i connect My uC to GSM sim300 modem It dont answer...
i send my circuit schematic in #8.
Please help....
 
Its not standard that all connections should be same.. sometimes your controller board may not follow the same connection that in PC when it comes to serial communication..

Understand what we are trying to tell.... If you cannot communicate then swap tx and rx pins in the serial cable and try...

I dont think you are trying what we are telling and going by some theoretical concepts...
until and unless you try what we are telling and you tell ua weather it worked or not it will be very difficult to help you....

I & seadolphin are trying to give you solution but you seems to be not trying it out
 
HI DEAR ckshivaram,
I DO ANYTHING THAT YOU SAY.
i respect to you and everythin that you say.
please dont angry from me...
i do , but its dont answer...
thanks

---------- Post added at 13:58 ---------- Previous post was at 13:55 ----------

i change TX and Rx but it doesn't works...
i send 0x0a and 0x0d bud it doesn't works....

---------- Post added at 14:01 ---------- Previous post was at 13:58 ----------

if the connection is correct when i sen a the modem must be echo it to me...
bu it dosent echo...
if you have the correct circuit and program please send to me to check my uC , connections and etc...
thanks
 
OK, I'll post some thoughts those might be simple to you but may cause your project not to work. Meanwhile, please post your code:
1- Check that the microcontroller, the Max232 and, the MODEM have the same ground.
2- Using oscilloscope, measure the output at the RS232 connector of your board with the MODEM connected to the board. Make sure that the controller is sending the commands.

Hope this helps.
 

Hi,

one thing to add;
Check baud-rate of uC and modem; they must be same.

You can do a simple test to isolate problematic circuitry;

When you send commands from uC to modem, connect another wire to pin-2 of DB9-connector (in your diagram post# 8 ) connect this wire to PC-com port RX.

Same way, connect pin-3 of DB9-connector (in your diagram post# 8 ) to PC com port TX.

So, if uC and max232 works correctly, now you can listen uC commands in PC-hyperterminal.Then give some commands via hyperterminal and check whether uC reads response from modem.

Thank you,
 
Last edited:
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top