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.

gsm module(sim900a) not working

Status
Not open for further replies.

cheenu02

Junior Member level 3
Joined
Jun 16, 2011
Messages
31
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,500
hi,
I am working with the gsm module(simcom sim900a).
I am trying to connect with this to PC through serial port.
I want to know hoe to connect that gsm module to PC through serial port and how to test that one.
 

ernpao

Advanced Member level 4
Joined
Sep 16, 2010
Messages
100
Helped
26
Reputation
52
Reaction score
24
Trophy points
1,298
Activity points
2,043
We're also working on a sim900 project right now, and we're trying to interface it with a PIC mcu. So far, we've been able to send AT commands using hyperterminal on the laptop through a USB to RS232 converter cable. I've also tried sending AT commands using mikroC's USART tool and that worked as well. maybe we can help :) what exactly is your problem? have you tried connecting it to your pc? have you tried sending AT commands through hyperterminal?
 

jagadeeshvulava

Junior Member level 1
Joined
Dec 10, 2010
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
hyderabad
Activity points
1,426
hi
I'm using SIM900A interfacing with atmega32 controller...
using at commands I'm sending sms through hyper terminal its working fine..
when same commands sending from controller its not working.....

from controller commands are like this

AT(CR)
AT+CMGF=1(CR)
AT+CMGS="+919493929190"(CR)DATA(CNTL+Z)
here modem gives responce like...

AT


OK

AT+CMGF=1


OK

AT+CMGS="+919493929190"
DATA

>
here its waiting for data......
help me to solve this problem
thank you......
 

ernpao

Advanced Member level 4
Joined
Sep 16, 2010
Messages
100
Helped
26
Reputation
52
Reaction score
24
Trophy points
1,298
Activity points
2,043
hi
I'm using SIM900A interfacing with atmega32 controller...
using at commands I'm sending sms through hyper terminal its working fine..
when same commands sending from controller its not working.....

from controller commands are like this

AT(CR)
AT+CMGF=1(CR)
AT+CMGS="+919493929190"(CR)DATA(CNTL+Z)
here modem gives responce like...

AT


OK

AT+CMGF=1


OK

AT+CMGS="+919493929190"
DATA

>
here its waiting for data......
help me to solve this problem
thank you......

Hi, maybe you can post your code so we can try to see how we can help :) have you tried putting small time delays after each command? maybe turning off the GSM module's echo function (ATEO) will help also. From what I understand, it seems as if your microcontroller has already sent the DATA before the GSM module's ">" response. Good luck! :)
 

jagadeeshvulava

Junior Member level 1
Joined
Dec 10, 2010
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
hyderabad
Activity points
1,426
Hi, maybe you can post your code so we can try to see how we can help :) have you tried putting small time delays after each command? maybe turning off the GSM module's echo function (ATEO) will help also. From what I understand, it seems as if your microcontroller has already sent the DATA before the GSM module's ">" response. Good luck! :)


I'm sending commands to modem as shown below



void main()
{
delay_ms(500);
UART_Init();
delay_ms(10000);


GSMInitCommands();
delay_ms(1000);
UART_TransmitString("AT+CMGS=");
delay_ms(100);
UART_TransmitByte('"');
delay_ms(100);
UART_TransmitString("+919493205204");
delay_ms(100);
UART_TransmitByte('"');
delay_ms(100);
UART_TransmitByte(13);
delay_ms(500);
UART_TransmitString("HELLO.....");
delay_ms(100);
UART_TransmitByte(26);
delay_ms(1000);

}

void GSMInitCommands()
{
UART_TransmitString("ATE1");
UART_TransmitByte(GSM_SEND_COMMAND);
delay_ms(1000);

UART_TransmitString(ATCommandArray);
UART_TransmitByte(GSM_SEND_COMMAND);
delay_ms(1000);

UART_TransmitString(smsFormateArray);
UART_TransmitByte(GSM_SEND_COMMAND);
delay_ms(1000);
}
 

ernpao

Advanced Member level 4
Joined
Sep 16, 2010
Messages
100
Helped
26
Reputation
52
Reaction score
24
Trophy points
1,298
Activity points
2,043
I'm not sure but I think this part is causing the problem:

I'm sending commands to modem as shown below




UART_TransmitByte('"');
delay_ms(100);
UART_TransmitString("+919493205204");
delay_ms(100);
UART_TransmitByte('"');
delay_ms(100);



}

maybe you can try transmitting the whole AT command like this:

UART_TransmitString("AT+CMGS=\"+919493205204\"");

or

const char at_command[] = "AT+CMGS=\"+919493205204\""
.
.
.
UART_TransmitString(at_command);
 
Last edited:

apache79

Newbie level 6
Joined
Mar 4, 2012
Messages
14
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,387
Hi,

We are also trying to interface the GSM Module SIMCOM 300 to a Microcontroller. We were able to connect it to the hyperterminal and generate a call.
But we are not able to generate a call through the Microcontroller.

This is the code we are using for sending the data,

Code:
init_serial();
	transmit_data('A');	  				// Transmit 'A' to serial port
	delay(1);
	
	transmit_data('T');	 				// Transmit 'T' to serial port
	delay(1);
	transmit_data(0x0d); 					// Transmit carriage return to serial port
	delay(500);
	lcd_cmd(0x01);
	lcd_data_string("Calling Rizvi");
	delay(100);

	lcd_cmd(0xC0);	 
	lcd_data_string("ATD+ 91838200101");
	delay(100);							// Initialize LCD
	lcd_cmd(0x01);							// Initialize serial port
	

	transmit_data('A');	  				// Transmit 'A' to serial port
	delay(1);
	
	transmit_data('T');	 				// Transmit 'T' to serial port
	delay(1);

	transmit_data('D');	  				// Transmit 'D' to serial port
	delay(1);
	
	transmit_data('+');	  				// Transmit '+' to serial port
	delay(1);

	transmit_data(32);	  				// Transmit Space to serial port
	delay(1);

	transmit_data('9');	  				// Transmit '9' to serial port
	delay(1);

	transmit_data('1');	  				// Transmit '1' to serial port
	delay(1);

	transmit_data('1');	  				// Transmit '1' to serial port
	delay(1);

	transmit_data('9');	 				// Transmit '9' to serial port
	delay(1);
	
	transmit_data('2');	  				// Transmit '2' to serial port
	delay(1);
	
	transmit_data('2');	 				// Transmit '2' to serial port
	delay(1);
	
	transmit_data('8');	  				// Transmit '8' to serial port
	delay(1);
	
	transmit_data('3');	 				// Transmit '3' to serial port
	delay(1);
	
	transmit_data('9');	  				// Transmit '9' to serial port
	delay(1);
	
	transmit_data('2');	 				// Transmit '2' to serial port
	delay(1);
	
	transmit_data('2');	  				// Transmit '2' to serial port
	delay(1);

	transmit_data(';');	  				// Transmit ';' to serial port
	delay(1);

	transmit_data(0x0d);  					// Transmit carriage return to serial port
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	delay(500);
	
	lcd_cmd(0x80);
	lcd_cmd(0x01);
	lcd_data_string("Disconnecting");
	delay(100);
	transmit_data('A');	 				// Transmit 'A' to serial port
	delay(1);
	transmit_data('T');	  				// Transmit 'T' to serial port
	delay(1);
	transmit_data('H');	 				// Transmit 'H' to serial port
	delay(1);
	transmit_data(0x0d); 
	lcd_cmd(0xC0);
	lcd_data_string("DISCONNECTED");
	while(1);
}


Any help would be highly appreciated, Thanks
 

jagadeeshvulava

Junior Member level 1
Joined
Dec 10, 2010
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
hyderabad
Activity points
1,426
HI,

i've configured sim300 with micon and it is working properly for sending sms and generating call to other mobiles........
here your are initiating call and next to that disconnecting(terminating) the initiated path.........
we need to wait untill call is initiated mean it ring on other side............
for that you need to prepare the modem with some commands

AT
AT+CMGF=1
AT+CLIP=1

like this.........
 

nikhildascl

Full Member level 3
Joined
Apr 15, 2012
Messages
150
Helped
15
Reputation
30
Reaction score
14
Trophy points
1,318
Location
Kerala, India
Activity points
2,115
Code:
#include<at89x51.h>
#include<stdio.h>
#include<stdlib.h>
void initialize_GSM_modem(void);
void initialize_serialcommunication(void);
unsigned char Command_AT[]="AT\n\r";
unsigned char Command_IPR[]="AT+IPR=9600\n\r";
unsigned char Command_CMGF[]="AT+CMGF=1\n\r";
unsigned char CtrlZ=0x1A; 
unsigned char Command_CMGS[]="AT+CMGS=\"+91xxxxxxxx\"\n\r"; 
unsigned char msg02[]="data";
void delay2(void)
{
 unsigned int i;

 for(i=0;i<25000;i++); 
}
void initialize_GSM_modem(void)
{
 delay2();
 delay2();
 puts(Command_AT);
 delay2();
 puts(Command_IPR);
 delay2();
 puts(Command_CMGF);
 delay2();
 puts(Command_CMGS);
 delay2();
 puts(msg02);
 delay2();
 while(!TI); TI = 0;SBUF = 0x1A;	  
}

void initialize_serialcommunication(void)
{
 TMOD = 0x20;
 SCON = 0x50; 
 TH1 = 0xFD;  
 TR1 = 1;
 TI=1; 
}
void main (void) 
{
 initialize_serialcommunication(); 
 initialize_GSM_modem();
}
You just try this. This will definitely work.
 

jagadeeshvulava

Junior Member level 1
Joined
Dec 10, 2010
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
hyderabad
Activity points
1,426
HI all
I've worked hard on SIM900.... how ever its working fine now ....
the problem is when i'm sending commands to the module with some delay... but i'm not reading their response from the modem ........
now i'm sending command and wait for the response .....All commands are working fine there's no issues now.......
thankyou to all
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top