Pages: [1]   Go Down
Author Topic: cant sending message arduino connected to the gsm t35  (Read 896 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
int timetosend=1;
int count=0;
char phone[]="01299949546";
void setup()
{
  Serial.begin(9600);
  delay(2000);
  Serial.println("AT+CMGF=1");
  delay(200);
}
void loop()
{
  while(count<timetosend){
    delay(1500);
    Serial.print("AT+CMGS=\"");
    Serial.print(phone);
    Serial.println("\"");
      while(Serial.read()!='>');
      {
        Serial.print("Test message");
        delay(500);
        Serial.write(0x1A);
        Serial.write(0x0D);
        Serial.write(0x0A);
        
        delay(5000);
      }
      count++;
  }
}

anyone know where line problem this coding.... smiley-eek-blue

i can make calling. but cant sending message

# LED Tx on arduino on when data at+cmgf and at+cmgs send. but no reply from gsm for ">" to type text message. because LED Rx on arduino OFF
« Last Edit: March 17, 2013, 01:34:40 am by MrRidsect » Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I need to ask: are you sure the modem is connected to Serial (i.e. TX / RX)?

As far as I can see, though there is room for improvement, your code should be able to send a message. Possible causes why it doesn't:

1. baud rate: 9600 should be good, but check what is specified as the default for the gms module you are using.
2. garbage: after Serial.begin() and a delay() you send the AT+CMGF command. Try sending an empty line (println("")) before the command, just to be sure that the modem discards any extra characters pending in its receive buffer and starts from a clean one.
3. failure of AT+CMGF command. Since you don't check for a response, we cannot exclude that this command fails. A quick and dirty method to check for the response is to loop until you read() a 'K' or a 'R', as you do later when waiting for the '>' character. Then you may switch on an LED to get some visual feedback.
4. bad phone number. You may try and specify the number using the international format (+<country_code><number>).

You may also try to send everything in a single line (plus ctrl-z):
Code:
Serial.print("AT+CMGS=\"+00phone\"\rMessage Text");
Serial.print(0x1a);

Another possibility is that, because of the different voltage, the gsm TX HIGH is not read as such by the Arduino RX line. This shouldn't happen if the gsm gets its normal voltage, but you may want to check the power source.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i think i connect already correct..

im using gsm modem model TC35. which is GND -GND(arduino), R0 - Rx(arduino), T0-Tx(arduino)

and my adapter is 12V, i plug in to the supply at the GSM board. that need another external supply?
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im using gsm modem model TC35. which is GND -GND(arduino), R0 - Rx(arduino), T0-Tx(arduino)

Don't you need to cross over the Rx and Tx?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im using gsm modem model TC35. which is GND -GND(arduino), R0 - Rx(arduino), T0-Tx(arduino)

Don't you need to cross over the Rx and Tx?

what do u mean??
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im using gsm modem model TC35. which is GND -GND(arduino), R0 - Rx(arduino), T0-Tx(arduino)

Don't you need to cross over the Rx and Tx?

what do u mean??

Transmit of gsm (T0) should go to receive (RX) of arduino; receive of gsm (R0) should go to transmit (TX) of arduino.
 
When you said that you could make a call, did you mean that you can do it by sending and ATDT command from the Arduino, or what?

Apart from the adapter, which seems to be ok, did you make any of the suggested checks (baud rate, send empty line, checking the modem response, send number in international format)?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im using gsm modem model TC35. which is GND -GND(arduino), R0 - Rx(arduino), T0-Tx(arduino)

Don't you need to cross over the Rx and Tx?

what do u mean??


Transmit of gsm (T0) should go to receive (RX) of arduino; receive of gsm (R0) should go to transmit (TX) of arduino.
 
When you said that you could make a call, did you mean that you can do it by sending and ATDT command from the Arduino, or what?

Apart from the adapter, which seems to be ok, did you make any of the suggested checks (baud rate, send empty line, checking the modem response, send number in international format)?


 i aready try to cross over. but the same result. nothing happen..

yes..i make a call, from arduino command. and its function.


i think the problem is GSM not send back command '>', because the LED Rx on arduino board not blink. like as LED Tx
Logged

Pages: [1]   Go Up
Jump to: