About 2 years ago, I built the Arduin-o-phone using the FONA 800 shield with SIM800L, part no. 2468, and it worked very well and still does. I want to add the ability to receive a call. This means using the RI pin which is not connected to anything on the shield. Also, I need added code and libs that work with the FONA 800 I'm using. I have done a lot of searching and can't find any info on how to add this functionality to the phone. On the shield, RX, TX, RST and RTS are hardwired to the header that connects with the Arduino. The board pads are set up to be easily cut so that they can be wired to different Arduino pins. I have tested RI and when I call the phone, RI goes low while its ringing and returns to high when I drop the call. So, it looks like that would be the source of a falling edge interrupt to the Arduino. I have found some info on answering calls on different FONA shields but nothing for the FONA 800. I also checked the PiPhone project that uses a different FONA shield and it too does not answer calls or use the RI pin.
How can I cause the Arduin-o-phone to sound a ring tone when called and pick up a call by pressing the green button on the touch display and hanging it up by pressing the red button? Can anyone help me with that?
Arduin-o-phone with SIM800L - can it answer a call?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- llryan
- Posts: 15
- Joined: Sun Dec 27, 2009 3:59 am
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Arduin-o-phone with SIM800L - can it answer a call?
Welll... You don't really need RI. The FONA library sets up RI to flag incoming SMS, so you'd have to fiddle with it a bit.
But the FONA will send a "RING" to the serial port when the phone is ringing. You can poll serial and look for that.
Also, you might want to have a look at this thread:
viewtopic.php?f=54&t=110246&hilit=+fona+ring+interrupt
But the FONA will send a "RING" to the serial port when the phone is ringing. You can poll serial and look for that.
Also, you might want to have a look at this thread:
viewtopic.php?f=54&t=110246&hilit=+fona+ring+interrupt
- llryan
- Posts: 15
- Joined: Sun Dec 27, 2009 3:59 am
Re: Arduin-o-phone with SIM800L - can it answer a call?
Thank you for the quick reply! SOLVED! I can now receive a call! So, if I don't really need to use RI, I loaded FONA test and tried picking up with (p) and it worked - the FONA came off hook. FONA test shows the pick up function very clearly. So, I added this to the Arduin-o-phone code supplied in the project description:
//Let's try answering the phone by pressing Ans
if (b == 14) { // press Ans key
status(F("Answering")); //show Answering in the phones text field
fona.pickUp(); // execute the pickup function
}
Basically, if key # 14, the bottom right yellow key with a # in it, is pressed, execute fona.pickUp(). I relabeled key #14, Ans for answer.
When the Arduin-o-phone is called, a default ringtone (chime) plays until I press "Ans" and there is my call. When I press the End key, it hangs up.
If the calling party hangs up, it automatically hangs up.
I don't know how to change the ring tone or how that one got there but its ok.
This was a very simple solution after you explained RI isn't needed. No wiring changes were necessary and the code change was very simple.
For the future: 1. Display "Ringing" in the text field, 2. Change ring tones, 3. Make a case
Thanks for the help! LR
//Let's try answering the phone by pressing Ans
if (b == 14) { // press Ans key
status(F("Answering")); //show Answering in the phones text field
fona.pickUp(); // execute the pickup function
}
Basically, if key # 14, the bottom right yellow key with a # in it, is pressed, execute fona.pickUp(). I relabeled key #14, Ans for answer.
When the Arduin-o-phone is called, a default ringtone (chime) plays until I press "Ans" and there is my call. When I press the End key, it hangs up.
If the calling party hangs up, it automatically hangs up.
I don't know how to change the ring tone or how that one got there but its ok.
This was a very simple solution after you explained RI isn't needed. No wiring changes were necessary and the code change was very simple.
For the future: 1. Display "Ringing" in the text field, 2. Change ring tones, 3. Make a case
Thanks for the help! LR
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Arduin-o-phone with SIM800L - can it answer a call?
There's an AT command for selecting the ring tone. There are 20 possible ring tones. Write the AT+CALS=<n> command to the FONA to select one of them, where <n> is a number between 0 and 19. Make sure to append a newline after the command. For example, to select ring tone 5, you might do something like this:
Code: Select all
mySerial.println("AT+CALS=5");
- kp3463
- Posts: 4
- Joined: Sat Mar 16, 2019 4:39 pm
Re: Arduin-o-phone with SIM800L - can it answer a call?
Hi, can you post a copy of the code that you used? I have been trying to get the phone to answer phone calls but cant seem to get it to work
- llryan
- Posts: 15
- Joined: Sun Dec 27, 2009 3:59 am
Re: Arduin-o-phone with SIM800L - can it answer a call?
Sure, but its been a couple years ago. I was trying to get it to answer a call with no luck until I found this function: fona.pickUp()
I'm not posting the whole sketch but here is what I did:
Change this line of code by substituting Ans for the #. I sacrificed the # so I didn't have to change the keyboard layout. In order to answer a call you need an answer button, right?
char buttonlabels[15][5] = {"Send", "Clr", "End", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "Ans" }; //Replace # with Ans
Next add some lines so you can invoke the fona.pickUp() function with the Ans button. I will include the preceding and following lines of code so you know where to put the added code:
tft.print(textfield); //Don't add this line!
//New stuff goes here:
//Let's try answering the phone by pressing Ans
if (b == 14) { //Is the Ans button pressed?
status(F("Answering")); //then display "Answering" in the little text area
fona.pickUp(); //and execute the pickup-the-call function
}
//End of new stuff
// its always OK to just hang up by pressing End Don't add this line!
Ok, I just tested it and it works really well. It has a pleasant ring and and answered after pressing the Ans key. The phone number display shows an A. That might be part of the fona.pickUp() function. So after all these years, the phone still works great. I never made a case for it other than a rubber band around it. Its one of my more fun and interesting Arduino projects. I hope this works for you.
I'm not posting the whole sketch but here is what I did:
Change this line of code by substituting Ans for the #. I sacrificed the # so I didn't have to change the keyboard layout. In order to answer a call you need an answer button, right?
char buttonlabels[15][5] = {"Send", "Clr", "End", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "Ans" }; //Replace # with Ans
Next add some lines so you can invoke the fona.pickUp() function with the Ans button. I will include the preceding and following lines of code so you know where to put the added code:
tft.print(textfield); //Don't add this line!
//New stuff goes here:
//Let's try answering the phone by pressing Ans
if (b == 14) { //Is the Ans button pressed?
status(F("Answering")); //then display "Answering" in the little text area
fona.pickUp(); //and execute the pickup-the-call function
}
//End of new stuff
// its always OK to just hang up by pressing End Don't add this line!
Ok, I just tested it and it works really well. It has a pleasant ring and and answered after pressing the Ans key. The phone number display shows an A. That might be part of the fona.pickUp() function. So after all these years, the phone still works great. I never made a case for it other than a rubber band around it. Its one of my more fun and interesting Arduino projects. I hope this works for you.
- kp3463
- Posts: 4
- Joined: Sat Mar 16, 2019 4:39 pm
Re: Arduin-o-phone with SIM800L - can it answer a call?
Thank you for the quick reply, once i get service on the phone, ill let you know how it went.
Please be positive and constructive with your questions and comments.