I am designing an application where I am interfacing SIM900 with PIC18F2520. I am making a call to a number using ATD
. Now if the receiver end do not answer the call, or if its busy, or the call cannot be made. So the current call needs to be diverted to another number. Following are the response of ATD
OK Command Executed
ERROR Invalid Command
BUSY Receiving end is currently on other call
NO ANSWER Connection failed upto time out
NO CARRIER Call failed to connect or disconnected
CONNECT Connection set up(ATX=0)
So in my condition, I need to check if the receiver end is BUSY
or NO ANSWER
or NO CARRIER
then make another call.
if(
(strstrrampgm(rxData,(const far rom char *)"NO CARRIER") != NULL) ||
(strstrrampgm(rxData,(const far rom char *)"BUSY") != NULL) ||
(strstrrampgm(rxData,(const far rom char *)"NO ANSWER") != NULL)
)
{
serialSendString("ATD91xxxxxx78;\r");
}
Now whats happening is when I didnt answer the current call NO ANSWER
or BUSY
or NO CARRIER
so the if condition become true it makes another call. But if I accept the first call, GSM does not send CONNECT
response instead while disconnecting the call it send NO CARRIER
due to which, the if condition becomes true and second call is made (which is not required). I searched for it and found out the we need to enable ATX
using ATX0
, then it shows CONNECT
response. I tried it but it didn't showed up the CONNECT
.
Also I want to know that in which cases NO CARRIER
is received. Whenever there is any network issue, it says NO CARRIER
. If after connecting the call, we disconnect it, it again shows NO CARRIER
. If I cut the call, sometimes it shows BUSY
but sometimes (in another SIM) it shows NO CARRIER
. What does NO CARRIER
actually means. What conditions should I check for in my application.
Please help.!