How to send a sms with a Sony Ericsson phone

Hello,
I ordered a cable and received DCU-60 one.
pinout is like the picture. but I cannot make it to work with arduino

How can I test that the serial connection is well working ? i'm on a mac.

I suggest that you try try to connect your phone to the computer by the usb and then use a hyper terminal. Try to type just "AT" , you should get a "OK" back. Remember to set the baud rate to 9600.
If that works then you need to check your connections with the Arduino.
Maybe switch around TX and RX.
I assume that you have connected both the Arduino and the phone to the same grounding point otherwise it will not work.

The cables (2) I have are a Usb to sony connector. I cutted one to connect to the arduino. I still have the other :wink:

I don't know how to make this cable work, because I'm on a mac and I can't find any drivers. Maybe I'll try tomorrow at work on windows.

I also tried to connect to the phone with an empty arduino board .to use only the Serial converter through the serial monitor but I didn't receive any response to AT command.

I checked again here is the sketch I used to test :

#include <NewSoftSerial.h>

NewSoftSerial phone(2, 3);

void setup() {
  Serial.begin(9600);
  Serial.println("Arduino has booted.");
  phone.begin(9600);
  Serial.println("phone connected");
  
}

void loop() {
  if (phone.available()) {
      Serial.print((char)phone.read());    
  }
  if (Serial.available()) {
      phone.print((char)Serial.read());
  }
}

I tried swapping rx/tx .... nothing.

I will try on a windows PC tomorrow...

Let me suggest to connect direct to pins 0 and 1 instead.
Then try below code and see if you get a reply OK from the phone.

void setup() {

  Serial.begin(9600);
  delay(3000);

}

void loop() {

  Serial.println("AT"); //Asking the phone if the connection is working
  delay(3000);

  if (phone.available()) {
      Serial.print((char)phone.read());
  }
  if (Serial.available()) {
      phone.print((char)Serial.read());
  }
}

By the way you need to do some type of serial.read in the loop when not using the software serial library.
Remember to avoid using serial.print to display status text as it will confuse the phone, it can only understand a AT command.

I tried on windows and it is not even recognized by sony suite. So probably it is not possible to use this phone with arduino.

Hello, I have a K750i. I connected the phone on XP with hyperterminal. I had to choose the right COM port, but i can send AT commands and it response. I use your example and can send a sms trough hyperterminal. In computer management I see that there are a few com ports when installing the phone. I had to choose the right one in hyperterminal, otherwise it doesn't work.
I then tried to connect the K750i with arduino. But no result. How does the arduino now witch com port to choose on the phone?
I connected the usb cable to the arduino, except the red (5V) because it than want to charge the phone. I don't now if there is a converter of some kind in the usb cable. Maybe it's better to connect straight to the phone?

Thanks!

Hello,

Thank you for the message :slight_smile:

You said you think it would work all those models, however some don't have serial pins (RX/TX), only USB.

And isn't the DCU-60 cable for USB ? See Sony Ericsson DCU-60 usb self-made cable pinout diagram @ pinoutguide.com.

Am I missing something ?

klaus,

Try using the USB data pins instead as RX/TX, should be the same.

kristof,

No need to set a com port for the Arduino, that is only needed for the computer.
Try to switch the TX/RX pins and remember to use pins 0 and 1 on the Arduino.
You could connect the red+ 5V as well to the Arduino, no problem if it charges the phone.

Thank you for the answer. It doubt it works if the phones uses USB and not RS-232 to communicate, but I'll try, we'll see.

May I ask you which model you did use ?

I can have a Sony Ericsson J220i, do you know if it could work ?

In the mean while i discovered that the K750i doesn't have a straight serial connection. (I tried everything) When installing the phone in windows it creates a few virtual com ports. So it's not possible to connect the arduino to the phone straight away.

The only thing you can use is maybe this:
http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino/
I now bought an old T68i. It came with a KRY 105 192 R2C “USB docking station” :
http://cgi.ebay.co.uk/Sony-Ericsson-KRY-105-192-R2C-KRY-111-117-R6A-Cable-/150544506221
After finding the right driver for this and installed in in xp I saw 1 serial com port. This was the usb to rs232 com port from the docking station. I connected the phone to the docking station, opened HyperTerminal, choose the com port of the docking station and I can send at commands. Later this day I'm going to buy a DCU-11 cable, I will remove the usb to serial converter and will test it when connected the arduino to the T68i. I think I need to use a voltage divider:

I will keep you posted.

moustic,

Sorry do not think it will work, check my first post for modells that i assume will work.

Kristof,

Sorry, do not think that K750 will work that easy but the T68i should do so.

I suggest below connection!

Pin 4: Rx
Pin 5: Tx

Above information found at: Sony Ericsson R520, R310, R320, T28, T39, T68, T68i, T610, T630 and others cell phones cable connector pinout and wiring @ old.pinouts.ru

Try below code and see if you get a OK back from the phone true the Arduino serial monitor.

Arduino pin 0 and 1 connected to T68i pin 4 and 5 .
Try to switch cables both ways.

Let me know how it goes!

  char incomingByte;
  
  void setup() {

  Serial.begin(9600);
  delay(3000);

  }
  
  void loop() {
  
      //check connection with phone
      Serial.println("AT");
      delay(3000);
  
        // read phone reply if available
      if (Serial.available() > 0) {
  
            incomingByte = Serial.read(), BYTE;

            // say what you got:
            Serial.print("I received: ");
            Serial.println(incomingByte);
      }

  }

Hello Hulk, thanks for the reply. In de mean while I bought a cable and removed the “usb to serial converter”. I connected it to the arduino. With newsoftserial I can send at commands with seralmonitor. The next thing I did was loading your example so the arduino will tell the T68i to send an sms. But I get a error while compiling the example. I get some error that newsoftserial not recognize “myserial.write(26); So I changed that line to:
byte ctrlz = 26;
mySerial.print(ctrlz);
And now it will compile and the program works. The arduino sends an sms with the T68i.
I tried the software sserial2mobile, but it will not work because we use PDU?
So I just use your link: http://www.twit88.com/home/utility/sms-pdu-encode-decode to convert to PDU. Can you send me an example how to read an sms from the T68i? for example when I send an sms “output 13 high” to the T68i, is it possible to read this with the arduino and the put digital pin 13 high?
Thanks,

kristof, great that you manged to get it working.
Could you share the code you used with the newsoftserial library?
My code example above was intended to be used without the newsoftseial library.

Yes, it is possible to read a incoming sms and then do something, i did something like that a while ago and could turn on/off lights at home.
Let me share the code for that with you here later today or tomorrow.