Skip to content

OpenPhone on Raspberry Pi Compute Module 4  #6

@emielvanberlo

Description

@emielvanberlo

Hi, I wanted to try OpenPhone on a Raspberry Pi 4.
Current status : I can call from the USB phone to another phone.
When I try to pickup an incoming call the phone keeps ringing.....

Just wanted to write this what I have done so far to make this work on a Raspberry Pi 4:)

Installed Raspberry Pi OS (Legacy) Buster 2022-04-04 (so we have python2 as default)
With Compute Module IO Board, USB ports are disable by default!
(you can find a lot on the internet for this, but you need to add dtoverlay=dwc2,dr_mode=host to the /boot/config.txt to enable)

Then I followed the OpenPhone installation with these modifications :

Enable SPI :

in /boot/config.txt add/change dtparam=spi=on
(or use the raspberry config tool)

Install dependencies.

libttspico-utils is in buster non-free : so add buster non-free to the repo list.

wget -q https://ftp-master.debian.org/keys/release-10.asc -O- | apt-key add -
echo "deb http://deb.debian.org/debian buster non-free" >> /etc/apt/sources.list
apt-get update
apt -y install git libttspico-utils python-dev python-lxml python-requests python-flask python-pyaudio mpd python-mpd python-configparser python-pip python-setuptools libhidapi-libusb0
sudo pip install wheel
sudo pip install flask-bootstrap

Then "sudo pip install hid" will install the wrong python usb hid component.

sudo pip install cython
sudo pip install hidapi==0.9.0
(latest hidapi version doesn't support python2 anymore)

Then follow the rest of the installation but before you start openphone.py make these additional changes.

search openphone.py for spi.open(1,0) # For Neopixels
The raspberry has /dev/spidev0.0 and /dev/spidev0.1 but not 1.0
I changed this in 0,1 but I don't know if this should be 0.0 and if this only means some lights are not working.

search openphone.py for "os.path.dirname(file)" (I got 6 occurrences)
This is used to get the current path but I received an empty string and then files and folders can't be found.
I changed it in : os.path.dirname(os.path.abspath(file))
(on some lines you need to delete a ")" at the end but I assume people reading this know a bit of python to solve such an error :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions