1. I've bought a GSM Modem, containing SIM900 module and successfully able to send AT Commands to it through my PC using Hyperterminal.
2. I also have an 8051 circuitboard with Serial interface and programmed it in C to receive/send(exclusively) strings serially though UART. I'd like to control the state of an led(On/Off) on the circuit board as per the message received. i. For reception of strings(what the program does): a. If the string contains 'On', it should turn on the led. b. If the string contains 'Off', it should turn on the led.
ii. For sending strings: Sends AT commands to the modem.
3. I have written a Java program to send AT commands to hte modem and receive and display the responses from the modem on the console which works perfectly.
4. I interfaced the modem and the 8051 circuit board using RS232 and found that it wouldn't work. Sending On/Off message wouldn't trigger the action to put On/Off respectively the led. So I tried to send AT command to delete the message stored at location '1'(AT+CMGD=1) to the modem, but neither would this work.
5. Hence, in order to troubleshoot the problem I developed another Java program to communicate with my 8051 board. So essentially this 2nd Java rogram of mine simulates the modem. The sending program in 8051 sends the strings and are captured by my Java program and displayed on the console. The response strings from my modem(with the message content) that was captured by my earlier JAva program, I've exactly used them in my 2nd program with the carriage return and line feed characters. This time my C program in 8051 seems to be able to capture the input string properly and take the correct action, i.e turning On/Off the led according to the input.
6. i. PC-GSM MOdem connection: 9600 baud, 8 Data bits, No Parity, 1 Stop bit. Flow Control: None
ii. PC-8051 Board connection: 9600 baud, 8 Data bits, No Parity, 1 Stop bit. Flow Control: None
Kindly suggest what the missing link could be? Why is 8051 not able to communicate with the modem and vice versa? Please do let me know if any more details are required.
which SPECIFIC '51? show yout timer init and UART init code, I guess your baudrate may be off