I have began making progress on my remote car starter project. The basic concept is to build a home brew version of the Viper SmartStart system. My version will utilize text messages to relay the commands from my cell phone to the car via the Motorola c168i pay-as-you-go phone.
The first steps to getting this project started are learning the ropes of communicating with the c168i via the TTL serial port in the 3/32" headset jack on the top of the phone. The phone uses what are called "AT commands." Many phones can be controlled using these commands but each phone will not necessarily work with every command. There are also other quirks to account for such at the excessive power management of the c168i that requires sending something over the serial connection to wake the phone up before sending an actual command.
To connect your Arduino to the c168i you will need a 3/32" headset plug. I used part 274-0298 from Radio Shack. The connection uses three wires: ground, TX (transmit) and RX (receive). The tip on the 3/32" headset plug is the TX signal and connects to pin 1 on the Arduino, the ring is connected to the RX signal or pin 0 and the shield is connected to ground.
Below you will find the basic test sketch I used. Every line except for the repeated delay commands is commented to explain what it does. Eventually the delays will be removed and I will program the Arduino to listen for an ok response or error from the phone before proceeding to the next command.
void setup() {
pinMode(13, OUTPUT); // Initialize pin 13 as digital out (LED)Serial.begin(4800); // Open serial connection at baud rate of 4800delay(500); // Wait half a secondSerial.println("AT"); // Sends AT command to wake up cell phonedelay(500);Serial.println("AT+CMGF=1"); // Puts phone into SMS modedelay(1000); // Wait a secondSerial.println("AT+CMGW=\"+15555555555\""); // Creates new message to numberdelay(1000);Serial.print("This message was generated by Arduino!"); // Message contentsdelay(1000);Serial.println(26, BYTE); //equivalent (signals end of message) delay(1000);Serial.println("AT+CMSS=1"); // Sends message at index of 1delay(10000);Serial.println("AT+CMGD=1"); // Deletes message at index of 1
}
void loop(){
digitalWrite(13, HIGH); // set the LED ondelay(250); // wait for 1/4 a seconddigitalWrite(13, LOW); // set the LED offdelay(250); // wait for 1/4 a second
}
Useful Resources
Hey, what did you set the phone c168i in video?
ReplyDeleteCan you only use the c168i phone, or can you use other phones to send the SMS message?
ReplyDeleteIs it possible to work with older Motorola phone like C119
ReplyDeletenice work! hello, it is the same code you use in your actual demonstration? can you please send me the actual code of your project? please.. i need it badly.. thank you so much... XD
ReplyDeletethis is my email.. rhaelalit@gmail.com
ReplyDeletedisculpa podrías enviarme el código a mi correo (e-mail) arpiga2089@hotmail.com también me podrías decir que librerías utilizaste y como las agregaste?
ReplyDeleteits really cool project.
ReplyDeleteyou could "hear" the phone with the arduino?
Could you post an example?
salut
ReplyDeletes'il vous plait est ce que quelqu'un pourrait m'envoyer le code de ce projet.
c'est mon e-mail:gaidimehdi@gmail.com
Merci d'avance
Have you used unlocked C168i phones on carriers other than AT&T? T-Mobile, or other prepaid carriers?
ReplyDeleteCan I use any other type of phone or just Motorola C168i?
ReplyDeleteWow!nice blog and very interesting and helpful for the Remote car starter it good work.
ReplyDeleteRemote car starter
Great Blog. Thanks for your valuable information. A remote car starter has many benefits as it maintains the surrounding temperature. These starters are not only good for your car but also safe, as it prevents freezing and will not let harm any person or animal. Before buying a remote car starter you must do deep research on the internet. Some starters are made according to your car, so read reviews on remote car starters before buying them.
ReplyDelete