the problem is
hw to declared the serial3 for my gsm connection?
here the code
//********make a object of Gsm class********************
/*First you have to make the gsmSMS object, the arguments are in order
*GsmSMS (#1 Name of the serial port connected to GSM (your choice),#2 the address of millis function(just copy whats there) )*/
gsmSMS [color=red]myGsmSMS(Serial3,&millis,&Serial); [/color] //gsmSMS TELIT SMS
//******************************************************
void setup(){
Serial.begin(9600); // used for debugging
Serial3.begin(9600); // used for talking to telit
Serial.println("hello"); // say hello to check serial line
i got error 'Serial3 was not declared in this scope'
db9 pin 1,4,6 not connect together and pin 7,8 is tie together..
i cannot get the resul as shown in this webhttp://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/, what is the problem, i try using the example 26.1
NewSoftSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
Pin 2 on the Arduino is the Rx (receive) pin. Pin 10 on the MAX232 is a receive pin. Pin 3 on the Arduino is the Tx (transmit) pin. Pin 9 on the MAX232 is a transmit pin. You need to swap them, so that data out on one side goes to data in on the other.
/* SparkFun Cellular Shield - Pass-Through Sample Sketch
SparkFun Electronics Written by Ryan Owens CC by v3.0 3/8/10
Thanks to Ryan Owens and Sparkfun for sketch */
#include <NewSoftSerial.h> //Include the NewSoftSerial library to send serial commands to the cellular module.
#include <string.h> //Used for string manipulations
char incoming_char=0; //Will hold the incoming character from the Serial Port.
NewSoftSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
void setup()
{
//Initialize serial ports for communication.
Serial.begin(57600);
cell.begin(57600);
Serial.println("Starting SM5100B Communication...");
}
void loop()
{
//If a character comes in from the cellular module...
if(cell.available() >0)
{
incoming_char=cell.read(); //Get the character from the cellular serial port.
Serial.print(incoming_char); //Print the incoming character to the terminal.
}
//If a character is coming from the terminal to the Arduino...
if(Serial.available() >0)
{
incoming_char=Serial.read(); //Get the character coming from the terminal
cell.print(incoming_char); //Send the character to the cellular module.
}
}
And you aren't exactly using 9600 baud to talk to the GSM module as suggested here:
void setup(){
Serial.begin(9600); // used for debugging
Serial3.begin(9600); // used for talking to telit
Serial.println("hello"); // say hello to check serial line
it still same result, when i try to call my gsm it say not available,
it's my connection error or something?
the tx led on my duemilanove keep blink fast, and my gsm green led blinking every 3s..
when i disconnect my gsm from arduino, i can call my sim from gsm
This looks like an incorrect baudrate setting to me. You might want to cycle through different baud rates to see if it works. Have you tried connecting to Hyperterminal to make sure the GSM module works? If you can make sure the gsm module is not set to autobaud (AT+IPR? will return the baud rate, if it returns 0 that means it's in autobaud).
when i try to call my gsm it say not available
when i disconnect my gsm from arduino, i can call my sim from gsm
It almost sounds like you don't have it wired up correctly.
You have two baud rates here. One to talk to the GSM card which has to match that. The other to talk to your serial monitor, which has to match what you have the serial monitor configured to.
I would leave the Serial.begin(115200) there, checking you have the serial monitor at 115200. Then you should see the message "Starting SM5100B Communication...".
Then try changing the cell.begin () to 9600, and other values. The fact that you are seeing some sort of garbage suggests the wires are the right way around, but you have the wrong baud rate.