Gsm TC35 not initialize At command when connect with arduino uno

#include <SoftwareSerial.h>

/***** Define *****/
SoftwareSerial gsmSerial(11, 12); // RX = 11, TX = 12
const char GSMSYNC = A0;
const char GSMIGT = 3;
const char RX = 11;

/Output*/
const char LED = 5;

/***** Global variables *****/
char gsmResponse[20];
char dataSMS[10];
char hpNoRx[12];
unsigned int i, counter = 0;

/***** Main function *****/
void setup()
{
pinMode(GSMSYNC, INPUT_PULLUP); // Set as input with internal pull up
pinMode(GSMIGT, OUTPUT); // Set as output
pinMode(RX, INPUT_PULLUP); // Set as input with internal pull up
pinMode(LED, OUTPUT); // Set as output

Serial.begin(9600); // Set hardware serial baudrate at 9600bps
gsmSerial.begin(9600); // Set software serial baudrate at 9600bps

Serial.print("Welcome!\r\n");
Serial.print("My Final Project\r\n");

gsmInit(); // GSM Initialize

Serial.print("GSM Ready\r\n\n");
}

void loop()
{
if (gsmSerial.available())
{
gsmReadLine(gsmResponse, '\n'); // Receive enter data
gsmReadLine(gsmResponse, '\n'); // Receive SMS indicator
if (!strncmp("+CMTI: "SM",1", gsmResponse, 12))
{
Serial.print("SMS Receive from ");
for (i = 0; i < 10; i++) dataSMS = ' ';

  • gsmSendCmd("AT+CMGR=1"); // Read SMS at index 1*
  • gsmReadLine(gsmResponse, '"');*
  • gsmReadLine(gsmResponse, '"');*
  • gsmReadLine(gsmResponse, '"');*
  • gsmReadLine(hpNoRx, '"'); // Receive SMS sender no*
  • gsmReadLine(gsmResponse, '\n');*
  • gsmReadLine(dataSMS, '\n'); // Receive SMS content*
  • gsmReadLine(gsmResponse, '\n');*
  • gsmReadLine(gsmResponse, '\n');*
    _ for (i = 0; i < 12; i++) Serial.print(hpNoRx*); // Print sender no*_
    * Serial.print("\r\n> ");*
    * Serial.print(dataSMS); // Print SMS content at monitor*
    * if (!strncmp("LED ON", dataSMS, 6)) // Compare string "LED ON",6 alphabet*
    * digitalWrite(LED, HIGH); // If match, LED turn ON*
    * else if (!strncmp("LED OFF", dataSMS, 7)) // Compare string "LED OFF"*
    * digitalWrite(LED, LOW); // If match, LED turn OFF*
    * delay(1000);*
    * gsmSendCmd("AT+CMGD=1"); // Delete SMS at index 1*
    * gsmReadLine(gsmResponse, '\n'); // Receive OK*
    * Serial.print("\r\n\n");*
    * Serial.print("GSM Ready\r\n\n");*
    * }*
    * }*
    * if (Serial.available())*
    * {*
    * Serial.print("Send SMS to +60133075890\r\n");*
    * Serial.print("> GSM TC35 & My Final Project :)\r\n");*
    * gsmSendCmd("AT+CMGS="+60133075890""); // Send SMS to corresponding no*
    * while (!gsmSerial.available()); // Wait till receive data*
    * if (gsmSerial.read() != '>') // If data not equal to '>'*
    * {*
    * Serial.print("Error"); // Print Error*
    * while (1); // Wait until reset*
    * }*
    * gsmSerial.print("GSM TC35 & My Final Project :)"); // SMS content*
    * gsmSerial.write(0x1A); // Send SMS*
    * delay(5000); // Delay 5 seconds*
    * Serial.print("\r\n");*
    * Serial.print("GSM Ready\r\n\n");*
    * }*
    }
    /***** Sub function *****/
    void gsmInit()
    {
    * // Trigger GSM IGT pin*
    * digitalWrite(GSMIGT, HIGH);*
    * delay(1000);*
    * digitalWrite(GSMIGT, LOW);*
    * delay(1000);*
    * digitalWrite(GSMIGT, HIGH);*
    * // Wait GSM to detect SIM card*
    * Serial.print("Initialize GSM:\r\n");*
    * Serial.print("Read SIM Card: ");*
    * while (1)*
    * {*
    * while (digitalRead(GSMSYNC) == HIGH);*
    * while (digitalRead(GSMSYNC) == LOW);*
    * delay(100);*
    * if (digitalRead(GSMSYNC) == LOW)*
    * {*
    * Serial.print("OK\r\n");*
    * break;*
    * }*
    * }*
    * // Sent AT command*
    * Serial.print("AT ");*
    * gsmSendCmd("AT");*
    * gsmReadLine(gsmResponse, '\n');*
    * if (!strncmp("OK", gsmResponse, 2))*
    * Serial.print("OK\r\n");*
    * else {*
    * Serial.print("Error");*
    * while (1) ;*
    * }*
    * delay(200);*
    * // Set text mode*
    * Serial.print("Set Text Mode ");*
    * gsmSendCmd("AT+CMGF=1");*
    * gsmReadLine(gsmResponse, '\n');*
    * if (!strncmp("OK", gsmResponse, 2))*
    * Serial.print("OK\r\n");*
    * else {*
    * Serial.print("Error");*
    * while (1);*
    * }*
    * delay(200);*
    * // SMS indicator*
    * Serial.print("Set Display SMS Index ");*
    * gsmSendCmd("AT+CNMI=1,1");*
    * gsmReadLine(gsmResponse, '\n');*
    * if (!strncmp("OK", gsmResponse, 2))*
    * Serial.print("OK\r\n");*
    * else {*
    * Serial.print("Error");*
    * while (1);*
    * }*
    * delay(200);*
    * // Delete 1st SMS*
    * Serial.print("Delete SMS Index 1 ");*
    * gsmSendCmd("AT+CMGD=1");*
    * gsmReadLine(gsmResponse, '\n');*
    * if (!strncmp("OK", gsmResponse, 2))*
    * Serial.print("OK\r\n\n");*
    * else {*
    * Serial.print("Error");*
    * while (1);*
    * }*
    * delay(200);*
    }
    void gsmSendCmd(const char *cmd)
    {
    * unsigned char inByte;*
    _ while (cmd) gsmSerial.write(cmd++); // Send command data_
    _
    gsmSerial.print("\r\n");
    _
    * do { // Wait until receive enter*
    * while (!gsmSerial.available());*
    * inByte = gsmSerial.read();*
    * }*
    * while (inByte != '\n');*
    }
    void gsmReadLine(char *buffer, char dataEnd)
    {
    * unsigned char inByte;*
    * do { // Read data, until receive end data*
    * while (!gsmSerial.available());*
    * inByte = gsmSerial.read();*
    _ buffer++ = inByte;_
    _
    }_
    _
    while (inByte != dataEnd);_
    _
    }*_

I KNOW that your code does not look like that! Clearly you couldn't be bothered reading the "How to post in this forum" guidelines. So, why should we be bothered trying to help you?

You haven't even defined what the problem is. What does that code do? What do you expect it to do? How is it failing to meet your expectations?

I have problem with TC35 module. Not goes gsm network. This kind module i have: http://www.goodluckbuy.com/images/detailed_images/sku_79624_1.jpg

  • 6volts dc power supply (4A) to give juice to this module.
  • com cabel to computer
  • computer i use hyperterminal/putty to try AT commands.

I plus power on that module power led goes ON. After that i start hyper terminal open that with right settings (com1, 8,1,N, etc)

After that i push button to board (ign -> gnd i think) Then "indicator" led start flashing 500ms off and 500ms on. (Like manual says initializing gsm). After 6blinks indicator goes off and not start again blink at all. If push button again same goes over and over, after 6blinks indicator leds goes OFF again.

I get AT --> OK message on hyperterminal that time when indicator blinks that 6times (500ms / 500ms). After that no any connection to TC35 module.

Does anyhave get any ideas what i can try with that module. Do i need some hardware jumpers or wires that start working ok. I tested sim card in work with siemens TC35 industrial modem and that goes gsm network ok after couple seconds.

Any tips or thinking what is wrong with this system :frowning:

here is video, if that explain better what happens: - YouTube