Ok guys. I cant talk with this modem at all.
It has ttl logic so i use an RS232 to TTL converter.
Ground pin goes to ground
Transmit of modem goes to receive of converter
Receive of modem to transmit of converter
Then convertr Tx output at arduino pin 2 set to receive
Converter Rx output at arduino pin 3 set to transmit
I am using this code:
#include <SoftwareSerial.h>
int state=0;
const int rxpin = 2; // pin used to receive
const int txpin = 3; // pin used to transmit
SoftwareSerial gsm(rxpin, txpin); // new serial port on pins 2 and 3
void setup()
{
Serial.begin(9600);
gsm.begin(9600);
delay(8000);
gsm.print("AT+CPIN=2955"); //or gsm.print("AT+CPIN="); gsm.print(2955);
Serial.write(gsm.read());
delay(35000);
//PIN!!!
}
void loop()
{
if (state==0){
gsm.print("AT+CMGF=1\r"); //Set text mode
delay(100);
gsm.print("AT+CMGS="); //Send message
gsm.write((byte)0x22); //"
gsm.print("Phone number goes here"); //Phone no, i have digits, not the text i have now inside
gsm.write((byte)0x22); //"
gsm.write((byte)0x0D); //Enter
gsm.print("Arduino talking to ya!");//Text message
gsm.write((byte)0x0D); //Enter
gsm.print("Enter has been pressed");//Text message
gsm.write((byte)0x1A); //Ctrl+Z
state=1;
}
}
Well i cant get back nothing. I cant even talk to it...
Any ideas?
Thanks!