Terobero
Posts: 8
Joined: Tue Dec 12, 2017 11:13 am

Connecting phone to raspberry pi via bluetooth

Thu Feb 28, 2019 9:32 pm

I want to turn a normal home phone (the stable phones) to control my Iphone. I want to do something similar to the new car panels where you can connect to them by bluetooth. I want the following abilities:
1 - See callers name/phone number
2 - Answer the phone (via the home phone mic and get sound too)
3 - Call someone
4 - End the call
5 - Reject a call

How can I send these commands over bluetooth and receive the call and control the call using the raspi? I would like as much explanation as possible. Thanks.

Andyroo

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 2:38 am

None of those are small tasks.

For an iPhone I would start with https://developer.apple.com/bluetooth/ and the ‘Accessories‘ section for HSP and HFP profiles rather than here.

You may do better to ask (in another question) if anyone knows of a hands free phone software (possibly for in-car use) as this is basically what you want to create.

fruitoftheloom
Posts: 23548
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 5:38 am

Terobero wrote:
Thu Feb 28, 2019 9:32 pm
I want to turn a normal home phone (the stable phones) to control my Iphone. I want to do something similar to the new car panels where you can connect to them by bluetooth. I want the following abilities:
1 - See callers name/phone number
2 - Answer the phone (via the home phone mic and get sound too)
3 - Call someone
4 - End the call
5 - Reject a call

How can I send these commands over bluetooth and receive the call and control the call using the raspi? I would like as much explanation as possible. Thanks.

What is a "normal home phone" ???
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Terobero
Posts: 8
Joined: Tue Dec 12, 2017 11:13 am

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 7:21 am

fruitoftheloom wrote:
Fri Mar 01, 2019 5:38 am
What is a "normal home phone" ???
non-mobile phone

fruitoftheloom
Posts: 23548
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 7:35 am

Terobero wrote:
Fri Mar 01, 2019 7:21 am
fruitoftheloom wrote:
Fri Mar 01, 2019 5:38 am
What is a "normal home phone" ???
non-mobile phone

So what country ?

Type of home phone connection, PoTS PTSN ?

https://en.wikipedia.org/wiki/Plain_old ... ne_service

Caller-id is usually a service implemented by your phone line provider !

Normally if you have PTSN you purchase a USB/FXO device and use the computer to replace your phone..........
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 1:37 pm

Terobero wrote:
Thu Feb 28, 2019 9:32 pm
I want to turn a normal home phone (the stable phones) to control my Iphone. I want to do something similar to the new car panels where you can connect to them by bluetooth. I want the following abilities:
1 - See callers name/phone number
2 - Answer the phone (via the home phone mic and get sound too)
3 - Call someone
4 - End the call
5 - Reject a call

How can I send these commands over bluetooth and receive the call and control the call using the raspi? I would like as much explanation as possible. Thanks.
First thing to consider: in most countries it's illegal to connect non-certified equipment to a phone line. It's not like they'll knock on your door to check but if you get it wrong and damage the echange expect a large bill and a possible court appearance.

While not trivial, your list could be acheived by using a vioce modem connected between your phone line and a Pi with the Pi acting as a bluetooth gateway between the modem and your iPhone.

Item 2, especially the requirement "(via the home phone mic and get sound too)" would need some hardware hacking of the phone: at least a connection to a Pi's GPIO in parallel with the "answer switch"

Then you'd need suitable software on the iPhone.

And extra hardware on the Pi for audio input.

And good luck finding a voice modem in these days of broadband internet. (and if you do manage to find one, make sure it's a hardware modem not a soft/winmodem)

Oh, and your software will need to cope with a bunch of complex cases if it's not the only device on the line that can make and answer calls.
Arguing with strangers on the internet since 1993.

Andyroo

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 5:01 pm

Folks, the OP wants to use his desk phone
to control my Iphone
Hence my lack of modem info in my first post. Apple have only published the Bluetooth or MFi interfaces for control :twisted: Some functionality is not available for App development or is at carrier level only :twisted: :twisted:

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 5:32 pm

Andyroo wrote:
Fri Mar 01, 2019 5:01 pm
Folks, the OP wants to use his desk phone
Ah. My mistake. The answer he's looking for is "probably not easily" then. It's not just a question of which APIs apple have published but what the capabilities of his desk phone are, whether he's prepared to hack it at a hardware level, and whether or not the desk phone still needs to be connected to the PSTN line.

What's needed is for the Pi to appear to the iPhone as a bluetooth device with the required features and, at the same time, appear to the desk phone as the exchange. Or you're still looking at hacking the desk phone to read button presses and transfer audio.

Either way you've got both hardware and software protocol translation going on.

Asuming the "pi as fake exchange" approach some of the stuff it'll have to do is send ring signals, generate and send caller display signals, detect when call is answered/ended, decode DTMF tones to pass the dialed number(s) to the iPhone, send audio between bluetooth and analogue. And don't forget that the desk phone will be expecting signals on the incoming line somewhere in the region of 50v
Arguing with strangers on the internet since 1993.

drgeoff
Posts: 10831
Joined: Wed Jan 25, 2012 6:39 pm

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 10:15 pm

An OBi200 (or OBi202) plus an OBiBT. No RPi or computer needed.

Plug the desk phone into the OBi200/202. Pair the OBiBT with the iphone. You can then use the desk phone to make and receive calls over your mobile/cellular number.

If you want the deskphone to also make/receive calls on conventional landline (POTS/PSTN) you need an OBi212 instead of 200/202.

https://www.obitalk.com/info/products
Quis custodiet ipsos custodes?

Andyroo

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 10:56 pm

Other thought I had was to rip the insides of the phone out and put a zero inside :lol:

Still have the software issue though...

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Connecting phone to raspberry pi via bluetooth

Fri Mar 01, 2019 11:41 pm

drgeoff wrote:
Fri Mar 01, 2019 10:15 pm
An OBi200 (or OBi202) plus an OBiBT. No RPi or computer needed.

Plug the desk phone into the OBi200/202. Pair the OBiBT with the iphone. You can then use the desk phone to make and receive calls over your mobile/cellular number.

If you want the deskphone to also make/receive calls on conventional landline (POTS/PSTN) you need an OBi212 instead of 200/202.

https://www.obitalk.com/info/products
Interesting. Though I couldn't work out whether outgoing calls via the cell phone use its voice plan or its data plan. That could make a difference in the cost per call

The primary purpose of the OBi devices appears to be bridging POTS/PSTN handsets to VOIP. so I'd need to see some real world examples of bluetooth/cell phone use before dropping t5he money.

Still, if you can afford it, it's going to be a lot simpler than rolling your own.
Arguing with strangers on the internet since 1993.

Terobero
Posts: 8
Joined: Tue Dec 12, 2017 11:13 am

Re: Connecting phone to raspberry pi via bluetooth

Sat Mar 02, 2019 12:57 am

Sorry for the confusion but I will just use the hardware of the phone. I only need to know how can I receive the things I listed from phone to raspberry pi and how to process them.

User avatar
Douglas6
Posts: 4874
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Connecting phone to raspberry pi via bluetooth

Sat Mar 02, 2019 1:08 am

Terobero wrote:
Sat Mar 02, 2019 12:57 am
Sorry for the confusion but I will just use the hardware of the phone. I only need to know how can I receive the things I listed from phone to raspberry pi and how to process them.
Ah. In that case, then no, you can't do that.

drgeoff
Posts: 10831
Joined: Wed Jan 25, 2012 6:39 pm

Re: Connecting phone to raspberry pi via bluetooth

Sat Mar 02, 2019 9:26 am

thagrol wrote:
Fri Mar 01, 2019 11:41 pm
drgeoff wrote:
Fri Mar 01, 2019 10:15 pm
An OBi200 (or OBi202) plus an OBiBT. No RPi or computer needed.

Plug the desk phone into the OBi200/202. Pair the OBiBT with the iphone. You can then use the desk phone to make and receive calls over your mobile/cellular number.

If you want the deskphone to also make/receive calls on conventional landline (POTS/PSTN) you need an OBi212 instead of 200/202.

https://www.obitalk.com/info/products
Interesting. Though I couldn't work out whether outgoing calls via the cell phone use its voice plan or its data plan. That could make a difference in the cost per call

The primary purpose of the OBi devices appears to be bridging POTS/PSTN handsets to VOIP. so I'd need to see some real world examples of bluetooth/cell phone use before dropping t5he money.

Still, if you can afford it, it's going to be a lot simpler than rolling your own.
To the iphone the OBi is just an enhanced Bluetooth hands-free device - microphone, earpiece, display and dial pad. Whether the call goes on the voice or data plan is entirely dependent on how the iphone is configured.

The primary purpose of the OBi devices is to connect POTS/PSTN phones to VoIP services. The OBi212 has the additional FXO interface which can connect to POTS/PSTN phone lines (or analogue PBX extensions). The VoIP capability would not be used in the OP's case. Doesn't even need the ethernet connection plugged in except for initial setup.

Another option is the Xlink BT or BTTN. http://www.myxlink.com/xlink_bt.aspx
Quis custodiet ipsos custodes?

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Connecting phone to raspberry pi via bluetooth

Sat Mar 02, 2019 10:25 am

Douglas6 wrote:
Sat Mar 02, 2019 1:08 am
Terobero wrote:
Sat Mar 02, 2019 12:57 am
Sorry for the confusion but I will just use the hardware of the phone. I only need to know how can I receive the things I listed from phone to raspberry pi and how to process them.
Ah. In that case, then no, you can't do that.
Clearly it can be done otherwise devices like those mentioned by drgeoff wouldn't exist. Whether it's worth the time, effort, and expense of rolling your own compared to purchasing a readymade product is up to the OP.

As I've said rolling your own won't be trivial in hardware or software.
Arguing with strangers on the internet since 1993.

Andyroo

Re: Connecting phone to raspberry pi via bluetooth

Sat Mar 02, 2019 11:19 am

Start with this document https://support.apple.com/en-gb/HT204387 and check your device can handle the protocol you want the head to the document in my first post to see how to implement it.

User avatar
Douglas6
Posts: 4874
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Connecting phone to raspberry pi via bluetooth

Mon Mar 04, 2019 1:40 am

Ah, so I was responding to the OP's statement that
Sorry for the confusion but I will just use the hardware of the phone.
Unless his phone includes Bluetooth capabilites, and a programmable display or Text-to-Speech abilities, it will not be possible to meet his requirements.

That is why there is a market for additional hardware such as drgeoff mentioned.

Return to “Graphics, sound and multimedia”