PhatFil
Posts: 1481
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

tools to control a mobile phone (android) via usb

Fri Dec 20, 2019 7:06 am

Can anyone signpost me to some tools to make , drop, and record phone calls via a usb developer debug connection to an andriod mobile phone?

Ive only found gui tools in my search and as im intending to script the calling of a short list of numbers to establish an audio only connection (not advertising or marketing)

many thanks in advance

Lewis-H
Posts: 22
Joined: Thu Oct 31, 2019 12:45 pm

Re: tools to control a mobile phone (android) via usb

Wed Jan 15, 2020 2:00 pm

My approach to this would be to do everything I possibly could to avoid interfacing the Pi directly with the phone line. It's definitely achievable, but it sounds a lot harder than I like my spare time.

Some Googling suggests that it shouldn't be too difficult or expensive to get hold of something that looks like this £16 adapter from Maplin. It accepts (I'm pretty sure) an RJ11 in from the phone socket, and outputs audio to a 3.5mm jack. That particular device, I note, is extremely badly reviewed - I suspect there may be better alternatives on eBay. Also, you can check the Microsoft website for phone system in office 365.

Now you have to get the audio into the Pi. I'd recommend a USB soundcard.

Now, all we have to do is listen to the audio input and trigger a recording if the incoming amplitude peaks over a threshold.

By specifying the right parameters to SoX’s silence command, sound can be monitored effectively trimming all noise until the noise is detected, and then trim everything after so many seconds of silence.

This can be achieved with the following command:

rec - c1 -r 192000 record.wav silence 1 0.1 1% 1 5.0 1% : newfile : restart

I hope this helps!
Regards,
Lewis

PhatFil
Posts: 1481
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: tools to control a mobile phone (android) via usb

Wed Jan 15, 2020 10:56 pm

Hi Lewis

good point regarding a usb soundcard to handle the audio. thanks for the input and the pointer to record the sound.

Its a 2g mobile phone call i want to initiate via a usb/serial connection to a 2/3/4g andriod phone. a little further browsing around led me to a stack exchange roadmap to exploit AT commands at the andriod shell.. this does require the jailbreaking of the phone so a specific path will depend on the cheapest (functional) phone i can find to play with..

Return to “General programming discussion”