Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: error connecting arduino with the Sony Ericsson K700 on: February 16, 2013, 02:00:33 am
Mr. Antkan

I am still confused ,
can you make simple sketch control led 13 trun on/off via sms for k700 format PDU.
I would like to know where my skecth errors. i used arduino 022

thanks
2  Using Arduino / Networking, Protocols, and Devices / Re: error connecting arduino with the Sony Ericsson K700 on: January 28, 2013, 07:56:52 am
Dear Antkan,

I still tried to continue, but I am confused reading sms differences in hyperterminal and serial monitor.
sms received "LED ON"
reading of serial monitor arduino, below



reading of HyperTerminal, below


on serial monitor arduino
+CMGR: 0,,25
06912618010000240C91261852583207000031108291231
on HyperTerminal
+CMGR: 0,,25
06912618010000240C9126185258320700003110829125352306CC2211F47402

differences nothing "CC2211F47402" this for text "LED ON"
why this differences and how to fix ?




 
3  Using Arduino / Networking, Protocols, and Devices / Re: error connecting arduino with the Sony Ericsson K700 on: January 26, 2013, 06:12:58 am
Dear Antkan,

I try and I still could not , and i try to use the sketch from http://power7.net/ this my modification code

//GSM SMS Remote control  V 3.0
//Created by Antonis G. Kanaris, January 27, 2012.
//I use cellphone Sony Ericsson K700i (work serial communication).


#include <NewSoftSerial.h>

NewSoftSerial phone(2,3);       // phone connected to pins 2,3

int ledPin = 13;           // LED on pin 13
String readString;
String admin="261852583207"; //admin number pdu code example 30123456 -> 03214365

 //read http://www.dreamfabric.com/sms/

 char c;
 
 void delsms(){
    phone.println("AT+CMGD=1");//Delete sms
    }
 void readsmsAT(){
   phone.println("AT+CMGR=1");//Read sms AT command
   delay(3000);
 }
 
  // phone.println("AT+CMGF=0");//Start send sms with temperature to pdu format
   //delay(3000);
   //phone.println("AT+CMGS=16");//Maybe for you is 15 or 17 read http://www.dreamfabric.com/sms/
  // delay(3000);
  // phone.print("0011000C912618525832070000AA02");//pdu sms temp to admin,
   

//read http://www.dreamfabric.com/sms/
 
  // delay(3000);
  // phone.write(0x1A);//Ctrl-z
  // delay(20000);

 
   void setup() {
         
  //pinMode(IRledPin,OUTPUT);
  pinMode(ledPin,OUTPUT);
  delay(3000);//first time connect cable arduino with phone...
  Serial.begin(9600);
  phone.begin(9600);
  delay(3000);
  phone.println("AT+CPMS=\"ME\",\"SM\"");//Set memory phone
  delay(3000);
  phone.println("ATE=0");//Echo off
  delay(3000);
 
}

   void loop()
  {
       readString=0;//format readString...
       readsmsAT();
     
      // read phone reply if available
    while(phone.available() > 0)
            {
                c=phone.read(),BYTE;
                readString+=c;
            }
               delay(1000);
               
               Serial.println(readString);//serial monitor display sms pdu format
               
               delay(3000);
              if (readString.indexOf(admin)>0 && readString.indexOf("36F770C")>0)// admin number and     //pdu on1
              {
                 //digitalWrite(indicatorPin, HIGH);//only for test
                 digitalWrite(ledPin, HIGH); // pin 13 on
                 delay(5000);
                 //sendsms_temp();//send sms to admin temperature room
                 //digitalWrite(indicatorPin, LOW);//only for test
              }
              if (readString.indexOf(admin)>0 && readString.indexOf("44FA33106")>0)// admin number and //pdu OFF1
              {               
                 digitalWrite(ledPin, LOW); // pin 13 off
                 delay(3000);
               
              }
             
             // if (readString.length()>40)//delete sms if sms received
           //   {
          //    delsms();
          //}
              delay(10000);//delay start loop again for check new sms...

  }


then i send sms on1 the ledPin = 13 does not want on, can you show me an example of the right of the code above, I am confused by reading the correct PDU code, and how read
4  Using Arduino / Networking, Protocols, and Devices / Re: error connecting arduino with the Sony Ericsson K700 on: January 25, 2013, 07:53:40 am
Dear Antkan,

this below new edit :
#include <SoftwareSerial.h>

SoftwareSerial phone(2,3);       // phone connected to pins 2,3

const int ledPin = 13;           // LED on pin 13
String input;                    // phones response is saved into this string
int state = 0;                   // current state of the LED

void setup ()
{
  // Serial connection
  Serial.begin(9600);
  Serial.println("Arduino connected.");
  delay(200);

  // phone connection
  phone.begin(9600);
  Serial.println("Ericsson T610 connected.");
  delay(500);
 
  // LED pin init
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);

  // phone init
  Serial.println("Start of phone init...");
  phone.println("AT+CPMS=\"ME\",\"ME\",\"ME\"");   // phone memory used for SMS storage
  delay(2000);
  phone.println("AT+CNMI=2,3,0,0,0");              // forward all received stuff into terminal window
  delay(2000);
  phone.flush();
  Serial.println("End of init. Waiting for command SMS...\n");
}

void loop ()

  while (phone.available() == 0);         // waiting for phones response 

  while (phone.available() > 0)           // read incoming data from phone and save it into input string
  {
    char aChar = phone.read();
    input += aChar;
  }

  // phones (partial) response displayed in serial window
  Serial.println(input);

  // "decoding" received SMS
  int index1 = input.indexOf("CC2211");
  int index2 = input.length() - 2;
 
  // if received SMS "LED ON" turn on LED
  if (input.substring(index1,index2) == "CC2211F47402")
  {
  delay(3000);
    digitalWrite(ledPin, HIGH);
delay(3000);
    state = 1;
  }
 
  // if received SMS "LED OFF" turn off LED
  else if (input.substring(index1,index2) == "CC2211F4341A01")
  {
delay(3000);
    digitalWrite(ledPin, LOW);
delay(3000);
    state = 0;
  }
 
  input = "";                                 // reset input string
}



i send sms "LED ON" ok and led on, but when i send "LED OFF" led not off still on, this new problem Mr.Antkan
5  Using Arduino / Networking, Protocols, and Devices / Re: error connecting arduino with the Sony Ericsson K700 on: January 24, 2013, 09:24:38 pm
Dear Antkan,

sorry can replay now, acces internet in my home problem.

i can now connect to sonny ericsson K700,
step,
 i no use resistor try and in my program for Ctrl + z , i can't use At command Serial.write(26);//Ctrl-z but i use  Serial.write(0x1A); //Ctrl-z CTRL-Z and now i can send sms via K700

Thanks Mr. Antkan

But i now have new problem,
i try sketch below,

#include <SoftwareSerial.h>

SoftwareSerial phone(2,3);       // phone connected to pins 2,3

const int ledPin = 13;           // LED on pin 13
String input;                    // phones response is saved into this string
int state = 0;                   // current state of the LED

void setup ()
{
  // Serial connection
  Serial.begin(9600);
  Serial.println("Arduino connected.");
  delay(200);

  // phone connection
  phone.begin(9600);
  Serial.println("Ericsson T610 connected.");
  delay(500);
 
  // LED pin init
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);

  // phone init
  Serial.println("Start of phone init...");
  phone.println("AT+CPMS=\"ME\",\"ME\",\"ME\"");   // phone memory used for SMS storage
  delay(2000);
  phone.println("AT+CNMI=2,3,0,0,0");              // forward all received stuff into terminal window
  delay(2000);
  phone.flush();
  Serial.println("End of init. Waiting for command SMS...\n");
}

void loop ()

  while (phone.available() == 0);         // waiting for phones response 

  while (phone.available() > 0)           // read incoming data from phone and save it into input string
  {
    char aChar = phone.read();
    input += aChar;
  }

  // phones (partial) response displayed in serial window
  Serial.println(input);

  // "decoding" received SMS
  int index1 = input.indexOf("CC2211");
  int index2 = input.length() - 2;
 
  // if received SMS "LED ON" turn on LED
  if (input.substring(index1,index2) == "CC2211F47402")
  {
    digitalWrite(ledPin, HIGH);
    state = 1;
  }
 
  // if received SMS "LED OFF" turn off LED
  else if (input.substring(index1,index2) == "CC2211F4341A01")
  {
    digitalWrite(ledPin, LOW);
    state = 0;
  }
 
  input = "";                                 // reset input string
}


when the K700 recive sms "LED ON" the ledPin = 13 not HIGH,
please help me
6  Using Arduino / Networking, Protocols, and Devices / Re: error connecting arduino with the Sony Ericsson K700 on: January 23, 2013, 02:03:22 am
hallo,

please help me
7  Using Arduino / Networking, Protocols, and Devices / error connecting arduino with the Sony Ericsson K700 on: January 22, 2013, 06:34:17 am
I have a problem connecting with the Sony Ericsson K700 arduino.
I first connect the K700 to the computer and use the hyper terminal no problem I can perform such commands with the AT command.
then i try to connect arduino with serial Software to K700 and upload multple serial test. to test connection

#include <SoftwareSerial.h>

SoftwareSerial gsm(2, 3); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  gsm.begin(9600);
  gsm.println("Hello, world?");
}

void loop() // run over and over
{
  if (gsm.available())
    Serial.write(gsm.read());
  if (Serial.available())
    gsm.write(Serial.read());
}


problems can't connect k700 to the arduino, as shown below


i try to send AT command  and no respon, error

this my connection arduino with k700




for connection i use same like this tread http://arduino.cc/forum/index.php/topic,52794.0.html
Phone Tx (Transmit -pin5) connect to Arduino Rx (Receive);
Phone Rx (pin4) connect with Arduino Tx;
ground Arduino connect to ground of the phone(pin10).

It woks like this but it is probably better to use a voltage divider or resistor to lower the voltage from Arduino’s Tx to around 3V. I use 2kOhm resistor between Arduino Tx and phone Rx and it works fine for K700i.

what any setting at phone k700 ?
please help me
Pages: [1]