Running pyadi-iio/examples/phaser/phaser_minimal_example.py (and all others) from a remote host configured with Ubuntu 22.04 connected a Phaser I get the following TimeoutError:
(venv_phaser) rbolling@Antenna:~/Phaser/pyadi-iio/examples/phaser$ python3 phaser_minimal_example.py
Attempting to connect to CN0566 via ip:localhost...
CN0566 on ip.localhost not found, connecting via ip:phaser.local...
Found CN0566. Connecting to PlutoSDR via shared context...
Found SDR on shared phaser.local.
file not found, loading default 10.5GHz
No signal freq file found, setting to 10.525 GHz
Traceback (most recent call last):
File "/home/rbolling/Phaser/pyadi-iio/examples/phaser/phaser_minimal_example.py", line 108, in <module>
my_sdr._ctrl.debug_attrs["adi,frequency-division-duplex-mode-enable"].value = "1"
File "/home/rbolling/venv_phaser/lib/python3.10/site-packages/iio.py", line 704, in <lambda>
lambda self, x: self._write(x),
File "/home/rbolling/venv_phaser/lib/python3.10/site-packages/iio.py", line 789, in _write
_d_write_debug_attr(self._device, self._name_ascii, value.encode("ascii"))
File "/home/rbolling/venv_phaser/lib/python3.10/site-packages/iio.py", line 62, in _check_negative
raise OSError(-result, _strerror(-result))
TimeoutError: [Errno 110] Connection timed out
This happens with all scripts attempting to control the Pluto SDR on the Phaser board. It is repeatable even within the Python command lind interpreter:
(venv_phaser) rbolling@Antenna:~$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as n
>>> from adi import ad9361
>>> sdr = ad9361(uri="ip:phaser.local:50901")
>>> sdr._ctrl.debug_attrs["adi,frequency-division-duplex-mode-enable"].value = "1"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rbolling/venv_phaser/lib/python3.10/site-packages/iio.py", line 704, in <lambda>
lambda self, x: self._write(x),
File "/home/rbolling/venv_phaser/lib/python3.10/site-packages/iio.py", line 789, in _write
_d_write_debug_attr(self._device, self._name_ascii, value.encode("ascii"))
File "/home/rbolling/venv_phaser/lib/python3.10/site-packages/iio.py", line 62, in _check_negative
raise OSError(-result, _strerror(-result))
TimeoutError: [Errno 110] Connection timed out
>>>
What can be causing this? The only possible issue I can see is that the host machine is running PyAdi 0.0.16 which is the latest available on git while the Phaser R-Pi is running a different PyAdi that displays as pip show pyadi-iio Version:0.0.17.
Host computer: HP Elite Book laptop running Ubuntu Jammy Jellyfish. Installed libiio with python bindings and pyadi-iio per ADI "PyADI-IIO" wiki. Here's its configuration:
(venv_phaser) rbolling@Antenna:~$ cat /etc/os-release
VERSION="22.04.4 LTS (Jammy Jellyfish)"
(venv_phaser) rbolling@Antenna:~$ pip freeze
contourpy==1.2.1
cycler==0.12.1
fonttools==4.53.0
kiwisolver==1.4.5
matplotlib==3.3.4
numpy==1.26.4
packaging==24.1
pillow==10.3.0
pyadi-iio==0.0.16
pylibiio==0.25
pyparsing==3.1.2
python-dateutil==2.9.0.post0
scipy==1.13.1
six==1.16.0
(venv_phaser) rbolling@Antenna:~$ iio_info -V
iio_info version: 0.25 (git tag:4aa46db3)
Libiio version: 0.25 (git tag: 4aa46db) backends: local xml ip usb
rbolling@Antenna:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 Antenna
192.168.1.117 phaser
Remote is a Stock Phaser CN0566 Raspberry Pi 4B with fresh ADI Kuiper image configured per ADI wiki "EVAL-CN0566-RPIZ Hardware User Guide". Here's its configuration:
analog@phaser:~ $ cat /etc/os-release
PRETTY_NAME="Kuiper GNU/Linux 11.2 (bullseye)"
NAME="Kuiper GNU/Linux"sdr.sample_rate = int(30e6)
VERSION_ID="11.2"
VERSION="11.2 (bullseye)"
Partial list of pip packages edited to remove from this printout what I believe were unrelated packages:
analog@phaser:~ $ pip freeze
adi-colorimeter==1.0
adidt @ git+github.com/.../pyadi-dt.git@2f53fda5f49f1c2eb251f051aaca855001bba031
attrs==20.3.0
cycler==0.10.0
dbus-python==1.2.16
kiwisolver==1.3.1
matplotlib==3.3.4
numpy==1.26.4
packaging==20.9
Pillow==8.1.2
pyadi-iio @ file:///home/analog/pyadi-iio
pylibiio==0.25
pyparsing==2.4.7
python-dateutil==2.8.1
scipy==1.6.0
si==1.16.0
I'm at a bit of a standstill as the Raspberry Pi doesn't have nearly the processing power to everything locally.