Hello,
I am using sim 900 with arduino to make call using basic AT command.
Whenever call is generated, Is their any way to detect whether call is answered or not?
Is their any way to detect whether call is answered or not?
EVERY AT command returns a value. I think it is safe to assume that the return code from an answered call would be different from that of an unanswered call.
So, what are you getting from the AT commands?
I am using serial communication between arduino and sim900.
code is:
SoftwareSerial mySerial(7, 8);
void setup()
{
mySerial.begin(19200); // the GPRS baud rate
delay(500);
}
void loop()
{
DialVoiceCall();
}
void DialVoiceCall()
{
mySerial.println("ATD + +xxxxxxxxxx;");//dial the number
delay(100);
mySerial.println();
}
now two Q's
1.How to collect response from sim900 corresponding to AT command for call generation
2.AT command to call no. from sim card is ATD>. But how to use it.
1.How to collect response from sim900 corresponding to AT command for call generation
Using mySerial.available() and mySerial.read().
Of course, you don't have a device called a mySerial connected to the pins, so why the instance is called mySerial is a mystery. A name like phone or cell would make a lot more sense.
2.AT command to call no. from sim card is ATD>. But how to use it.
Just like it shows in the data sheet for your phone/modem/whatever.
The AT command is ATD followed by some additional data, not including the plus signs. Unless using the phone manually requires them.
Of course, you don't have a device called a mySerial connected to the pins, so why the instance is called mySerial is a mystery. A name like phone or cell would make a lot more sense.
No special reason,anything can be used.
Using mySerial.available() and mySerial.read()
mySerial.read() returns int type and i got series of special character(box like)when tried to display it using serial monitor.
No special reason,anything can be used.
Sure. But, some names, like cell make sense. Other names, like d8RhgWLgpzx, don't. While the program you are developing is called code, it doesn't have to be cryptic.
mySerial.read() returns int type
With a error flag in the high order byte and the data in the low order byte. If you only call Serial.read() after calling Serial.available() to confirm that there is serial data to read, you can store the output in a byte-sized variable, like byte, char, or uint8_t.
and i got series of special character(box like)when tried to display it using serial monitor.
Looking at your code, I can't see why. Of course, the fact that I can't see your code might have something to do with that.