usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Problem running the MPM daemon & MPC Server

PT
philip.tustin@mediatek.com
Mon, Feb 24, 2025 11:40 PM

Hello,

After building the MPM daemon, I am trying (currently unsuccessfully) to execute the MPM daemon & RPC server.

The following MPM build sequence creates the file ‘libusrp-periphs.so.4.8.0’ in the directory  ‘/usr/lib’. In the same directory ‘/usr/lib’, the symlink ‘libusrp-periphs.so’ references ‘libusrp-periphs.so.4.8.0’.

cd uhd/mpm

mkdir build

cd build

cmake ../

sudo make -j2 install

---===
I also see the shared object file ‘libpyusrp_periphs.so‘ located in the sub-directory ‘/usr/lib/python3.10/site-packages/usrp_mpm’.

---===
To start the MPM daemon and RPC server, I am executing the python file ‘uhd/mpm/python/usrp_hwd.py’ using the following command.

python3 ./usrp_hwd.py

Q. Is this how I should be starting the MPM daemon and RPC server ?

Note that this file does the following import.

import usrp_mpm.libpyusrp_periphs as lib

---===

This is the output I see on the command-line (see error at the end).

Traceback (most recent call last):

File "/home/mediatek/uhd2/uhd/mpm/python/./usrp_hwd.py", line 15, in <module>

*import usrp_mpm as mpm*

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/init.py", line 25, in <module>

*from . import periph_manager*

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/init.py", line 14, in <module>

*from .base import PeriphManagerBase*

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/base.py", line 24, in <module>

*from usrp_mpm.xports import XportAdapterMgr*

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/init.py", line 11, in <module>

*from .xport_adapter_mgr import XportAdapterMgr*

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_mgr.py", line 15, in <module>

*from .xport_adapter_ctrl import XportAdapterCtrl*

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_ctrl.py", line 15, in <module>

***from usrp_mpm.sys_utils.uio import UIO***

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/sys_utils/uio.py", line 14, in <module>

***import usrp_mpm.libpyusrp_periphs as lib***

ModuleNotFoundError: No module named 'usrp_mpm.libpyusrp_periphs'.

---===
I confirmed that the directory ‘/usr/lib/python3.10/site-packages‘ is in the path. It SHOULD therefore be found when using the following import statement.

import usrp_mpm.libpyusrp_periphs as lib

Q. Any idea why this is NOT working for me ?

Hello,\ \ After building the MPM daemon, I am trying (currently unsuccessfully) to execute the MPM daemon & RPC server.\ \ The following MPM build sequence creates the file **‘libusrp-periphs.so.4.8.0’** in the directory **‘/usr/lib’**. In the same directory **‘/usr/lib’**, the symlink **‘libusrp-periphs.so’** references **‘libusrp-periphs.so.4.8.0’**. *cd uhd/mpm* *mkdir build* *cd build* *cmake ../* *sudo make -j2 install* ====================================\ I also see the shared object file **‘libpyusrp_periphs.so‘** located in the sub-directory **‘/usr/lib/python3.10/site-packages/usrp_mpm’**. ====================================\ To start the MPM daemon and RPC server, I am executing the python file **‘uhd/mpm/python/usrp_hwd.py’** using the following command. ***python3 ./usrp_hwd.py*** **Q. Is this how I should be starting the MPM daemon and RPC server ?** Note that this file does the following import. ***import usrp_mpm.libpyusrp_periphs as lib*** ====================================\ \ **This is the output I see on the command-line (see error at the end).**\ \ *Traceback (most recent call last):* *File "/home/mediatek/uhd2/uhd/mpm/python/./usrp_hwd.py", line 15, in <module>* *import usrp_mpm as mpm* *File "/usr/local/lib/python3.10/site-packages/usrp_mpm/__init__.py", line 25, in <module>* *from . import periph_manager* *File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/__init__.py", line 14, in <module>* *from .base import PeriphManagerBase* *File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/base.py", line 24, in <module>* *from usrp_mpm.xports import XportAdapterMgr* *File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/__init__.py", line 11, in <module>* *from .xport_adapter_mgr import XportAdapterMgr* *File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_mgr.py", line 15, in <module>* *from .xport_adapter_ctrl import XportAdapterCtrl* *File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_ctrl.py", line 15, in <module>* ***from usrp_mpm.sys_utils.uio import UIO*** ***File "/usr/local/lib/python3.10/site-packages/usrp_mpm/sys_utils/uio.py", line 14, in <module>*** ***import usrp_mpm.libpyusrp_periphs as lib*** ***ModuleNotFoundError: No module named 'usrp_mpm.libpyusrp_periphs'.*** ====================================\ I confirmed that the directory **‘/usr/lib/python3.10/site-packages**‘ is in the path. It SHOULD therefore be found when using the following import statement. ***import usrp_mpm.libpyusrp_periphs as lib***\ \ **Q. Any idea why this is NOT working for me ?**
MB
Martin Braun
Mon, Mar 3, 2025 2:12 PM

Before we go down the rabbit hole of debugging, why are you doing this? Is
this to enable the simulator?

--M

On Tue, Feb 25, 2025 at 12:41 AM philip.tustin--- via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hello,

After building the MPM daemon, I am trying (currently unsuccessfully) to
execute the MPM daemon & RPC server.

The following MPM build sequence creates the file
‘libusrp-periphs.so.4.8.0’ in the directory * ‘/usr/lib’*. In the same
directory ‘/usr/lib’, the symlink ‘libusrp-periphs.so’ references
‘libusrp-periphs.so.4.8.0’.

cd uhd/mpm

mkdir build

cd build

cmake ../

sudo make -j2 install

---===
I also see the shared object file ‘libpyusrp_periphs.so‘ located in the
sub-directory ‘/usr/lib/python3.10/site-packages/usrp_mpm’.

---===
To start the MPM daemon and RPC server, I am executing the python file
‘uhd/mpm/python/usrp_hwd.py’ using the following command.

python3 ./usrp_hwd.py

Q. Is this how I should be starting the MPM daemon and RPC server ?

Note that this file does the following import.

import usrp_mpm.libpyusrp_periphs as lib

---===

This is the output I see on the command-line (see error at the end).

Traceback (most recent call last):

  • File "/home/mediatek/uhd2/uhd/mpm/python/./usrp_hwd.py", line 15, in
    <module>*

  • import usrp_mpm as mpm*

  • File "/usr/local/lib/python3.10/site-packages/usrp_mpm/init.py",
    line 25, in <module>*

  • from . import periph_manager*

  • File
    "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/init.py",
    line 14, in <module>*

  • from .base import PeriphManagerBase*

  • File
    "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/base.py",
    line 24, in <module>*

  • from usrp_mpm.xports import XportAdapterMgr*

  • File
    "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/init.py", line
    11, in <module>*

  • from .xport_adapter_mgr import XportAdapterMgr*

  • File
    "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_mgr.py",
    line 15, in <module>*

  • from .xport_adapter_ctrl import XportAdapterCtrl*

  • File
    "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_ctrl.py",
    line 15, in <module>*

  • from usrp_mpm.sys_utils.uio import UIO*

  • File
    "/usr/local/lib/python3.10/site-packages/usrp_mpm/sys_utils/uio.py", line
    14, in <module>*

  • import usrp_mpm.libpyusrp_periphs as lib*

ModuleNotFoundError: No module named 'usrp_mpm.libpyusrp_periphs'.

---===
I confirmed that the directory ‘/usr/lib/python3.10/site-packages‘ is
in the path. It SHOULD therefore be found when using the following import
statement.

import usrp_mpm.libpyusrp_periphs as lib

Q. Any idea why this is NOT working for me ?


USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com

Before we go down the rabbit hole of debugging, why are you doing this? Is this to enable the simulator? --M On Tue, Feb 25, 2025 at 12:41 AM philip.tustin--- via USRP-users < usrp-users@lists.ettus.com> wrote: > Hello, > > After building the MPM daemon, I am trying (currently unsuccessfully) to > execute the MPM daemon & RPC server. > > The following MPM build sequence creates the file > *‘libusrp-periphs.so.4.8.0’* in the directory * ‘/usr/lib’*. In the same > directory *‘/usr/lib’*, the symlink *‘libusrp-periphs.so’* references > *‘libusrp-periphs.so.4.8.0’*. > > *cd uhd/mpm* > > *mkdir build* > > *cd build* > > *cmake ../* > > *sudo make -j2 install* > > ==================================== > I also see the shared object file *‘libpyusrp_periphs.so‘* located in the > sub-directory *‘/usr/lib/python3.10/site-packages/usrp_mpm’*. > > ==================================== > To start the MPM daemon and RPC server, I am executing the python file > *‘uhd/mpm/python/usrp_hwd.py’* using the following command. > > *python3 ./usrp_hwd.py* > > *Q. Is this how I should be starting the MPM daemon and RPC server ?* > > Note that this file does the following import. > > *import usrp_mpm.libpyusrp_periphs as lib* > > ==================================== > > *This is the output I see on the command-line (see error at the end).* > > *Traceback (most recent call last):* > > * File "/home/mediatek/uhd2/uhd/mpm/python/./usrp_hwd.py", line 15, in > <module>* > > * import usrp_mpm as mpm* > > * File "/usr/local/lib/python3.10/site-packages/usrp_mpm/__init__.py", > line 25, in <module>* > > * from . import periph_manager* > > * File > "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/__init__.py", > line 14, in <module>* > > * from .base import PeriphManagerBase* > > * File > "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/base.py", > line 24, in <module>* > > * from usrp_mpm.xports import XportAdapterMgr* > > * File > "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/__init__.py", line > 11, in <module>* > > * from .xport_adapter_mgr import XportAdapterMgr* > > * File > "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_mgr.py", > line 15, in <module>* > > * from .xport_adapter_ctrl import XportAdapterCtrl* > > * File > "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_ctrl.py", > line 15, in <module>* > > * from usrp_mpm.sys_utils.uio import UIO* > > * File > "/usr/local/lib/python3.10/site-packages/usrp_mpm/sys_utils/uio.py", line > 14, in <module>* > > * import usrp_mpm.libpyusrp_periphs as lib* > > *ModuleNotFoundError: No module named 'usrp_mpm.libpyusrp_periphs'.* > > ==================================== > I confirmed that the directory *‘/usr/lib/python3.10/site-packages*‘ is > in the path. It SHOULD therefore be found when using the following import > statement. > > *import usrp_mpm.libpyusrp_periphs as lib* > > *Q. Any idea why this is NOT working for me ?* > > _______________________________________________ > USRP-users mailing list -- usrp-users@lists.ettus.com > To unsubscribe send an email to usrp-users-leave@lists.ettus.com >
PT
Philip Tustin
Thu, Mar 6, 2025 6:08 PM

Hello Martin,

Thanks for your reply and apologies for my late reply.

I now have the MPM daemon & MPC server up & running by executing the file ‘uhd/mpm/python/usrp_hwd.py’.
There were a few issues, one of which was successfully building & installing the mprpc python module.

I “WOULD” like to start by enabling the simulator.

I have written some C++ code to do this.

I see the following o/p.

Q. Would you be able to help with the exception that I am seeing ?

Many Thanks,

-Phil

====================

Device address: type=sim
1st find()
Number of addresses found = 1
Device 0:
Device address: type=mpm,addr=127.0.0.1,mgmt_addr=127.0.0.1
Creating a USRP device !!!

Exception: Simulator failed to import: ImportError: cannot import name 'usrp_hwd' from 'usrp_mpm' (/usr/lib/python3.10/sitepackages/usrp_mpm/init.py)

At:
/usr/lib/python3.10/site-packages/usrp_mpm/process_manager.py(18): <module>
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap_external>(883): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load

PYTHONPATH: ['', '/usr/lib/python3.10/site-packages', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/mediatek/.local/lib/python3.10/site-packages', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages']

From: Martin Braun martin.braun@ettus.com
Sent: Monday, March 3, 2025 9:12 AM
To: Philip Tustin Philip.Tustin@mediatek.com
Cc: usrp-users@lists.ettus.com
Subject: Re: [USRP-users] Problem running the MPM daemon & MPC Server

External email : Please do not click links or open attachments until you have verified the sender or the content.
Before we go down the rabbit hole of debugging, why are you doing this? Is this to enable the simulator?

--M

On Tue, Feb 25, 2025 at 12:41 AM philip.tustin--- via USRP-users <usrp-users@lists.ettus.commailto:usrp-users@lists.ettus.com> wrote:

Hello,

After building the MPM daemon, I am trying (currently unsuccessfully) to execute the MPM daemon & RPC server.

The following MPM build sequence creates the file ‘libusrp-periphs.so.4.8.0’ in the directory ‘/usr/lib’. In the same directory ‘/usr/lib’, the symlink ‘libusrp-periphs.so’ references ‘libusrp-periphs.so.4.8.0’.

cd uhd/mpm

mkdir build

cd build

cmake ../

sudo make -j2 install

---===
I also see the shared object file ‘libpyusrp_periphs.so‘ located in the sub-directory ‘/usr/lib/python3.10/site-packages/usrp_mpm’.

---===
To start the MPM daemon and RPC server, I am executing the python file ‘uhd/mpm/python/usrp_hwd.py’ using the following command.

python3 ./usrp_hwd.py

Q. Is this how I should be starting the MPM daemon and RPC server ?

Note that this file does the following import.

import usrp_mpm.libpyusrp_periphs as lib

---===

This is the output I see on the command-line (see error at the end).

Traceback (most recent call last):

File "/home/mediatek/uhd2/uhd/mpm/python/./usrp_hwd.py", line 15, in <module>

import usrp_mpm as mpm

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/init.py", line 25, in <module>

from . import periph_manager

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/init.py", line 14, in <module>

from .base import PeriphManagerBase

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/base.py", line 24, in <module>

from usrp_mpm.xports import XportAdapterMgr

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/init.py", line 11, in <module>

from .xport_adapter_mgr import XportAdapterMgr

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_mgr.py", line 15, in <module>

from .xport_adapter_ctrl import XportAdapterCtrl

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_ctrl.py", line 15, in <module>

from usrp_mpm.sys_utils.uio import UIO

File "/usr/local/lib/python3.10/site-packages/usrp_mpm/sys_utils/uio.py", line 14, in <module>

import usrp_mpm.libpyusrp_periphs as lib

ModuleNotFoundError: No module named 'usrp_mpm.libpyusrp_periphs'.

---===
I confirmed that the directory ‘/usr/lib/python3.10/site-packages‘ is in the path. It SHOULD therefore be found when using the following import statement.

import usrp_mpm.libpyusrp_periphs as lib

Q. Any idea why this is NOT working for me ?


USRP-users mailing list -- usrp-users@lists.ettus.commailto:usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.commailto:usrp-users-leave@lists.ettus.com

Hello Martin, Thanks for your reply and apologies for my late reply. I now have the MPM daemon & MPC server up & running by executing the file ‘uhd/mpm/python/usrp_hwd.py’. There were a few issues, one of which was successfully building & installing the mprpc python module. I “WOULD” like to start by enabling the simulator. I have written some C++ code to do this. I see the following o/p. Q. Would you be able to help with the exception that I am seeing ? Many Thanks, -Phil ==================== Device address: type=sim 1st find() Number of addresses found = 1 Device 0: Device address: type=mpm,addr=127.0.0.1,mgmt_addr=127.0.0.1 Creating a USRP device !!! Exception: Simulator failed to import: ImportError: cannot import name 'usrp_hwd' from 'usrp_mpm' (/usr/lib/python3.10/sitepackages/usrp_mpm/__init__.py) At: /usr/lib/python3.10/site-packages/usrp_mpm/process_manager.py(18): <module> <frozen importlib._bootstrap>(241): _call_with_frames_removed <frozen importlib._bootstrap_external>(883): exec_module <frozen importlib._bootstrap>(703): _load_unlocked <frozen importlib._bootstrap>(1006): _find_and_load_unlocked <frozen importlib._bootstrap>(1027): _find_and_load PYTHONPATH: ['', '/usr/lib/python3.10/site-packages', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/mediatek/.local/lib/python3.10/site-packages', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages'] From: Martin Braun <martin.braun@ettus.com> Sent: Monday, March 3, 2025 9:12 AM To: Philip Tustin <Philip.Tustin@mediatek.com> Cc: usrp-users@lists.ettus.com Subject: Re: [USRP-users] Problem running the MPM daemon & MPC Server External email : Please do not click links or open attachments until you have verified the sender or the content. Before we go down the rabbit hole of debugging, why are you doing this? Is this to enable the simulator? --M On Tue, Feb 25, 2025 at 12:41 AM philip.tustin--- via USRP-users <usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com>> wrote: Hello, After building the MPM daemon, I am trying (currently unsuccessfully) to execute the MPM daemon & RPC server. The following MPM build sequence creates the file ‘libusrp-periphs.so.4.8.0’ in the directory ‘/usr/lib’. In the same directory ‘/usr/lib’, the symlink ‘libusrp-periphs.so’ references ‘libusrp-periphs.so.4.8.0’. cd uhd/mpm mkdir build cd build cmake ../ sudo make -j2 install ==================================== I also see the shared object file ‘libpyusrp_periphs.so‘ located in the sub-directory ‘/usr/lib/python3.10/site-packages/usrp_mpm’. ==================================== To start the MPM daemon and RPC server, I am executing the python file ‘uhd/mpm/python/usrp_hwd.py’ using the following command. python3 ./usrp_hwd.py Q. Is this how I should be starting the MPM daemon and RPC server ? Note that this file does the following import. import usrp_mpm.libpyusrp_periphs as lib ==================================== This is the output I see on the command-line (see error at the end). Traceback (most recent call last): File "/home/mediatek/uhd2/uhd/mpm/python/./usrp_hwd.py", line 15, in <module> import usrp_mpm as mpm File "/usr/local/lib/python3.10/site-packages/usrp_mpm/__init__.py", line 25, in <module> from . import periph_manager File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/__init__.py", line 14, in <module> from .base import PeriphManagerBase File "/usr/local/lib/python3.10/site-packages/usrp_mpm/periph_manager/base.py", line 24, in <module> from usrp_mpm.xports import XportAdapterMgr File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/__init__.py", line 11, in <module> from .xport_adapter_mgr import XportAdapterMgr File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_mgr.py", line 15, in <module> from .xport_adapter_ctrl import XportAdapterCtrl File "/usr/local/lib/python3.10/site-packages/usrp_mpm/xports/xport_adapter_ctrl.py", line 15, in <module> from usrp_mpm.sys_utils.uio import UIO File "/usr/local/lib/python3.10/site-packages/usrp_mpm/sys_utils/uio.py", line 14, in <module> import usrp_mpm.libpyusrp_periphs as lib ModuleNotFoundError: No module named 'usrp_mpm.libpyusrp_periphs'. ==================================== I confirmed that the directory ‘/usr/lib/python3.10/site-packages‘ is in the path. It SHOULD therefore be found when using the following import statement. import usrp_mpm.libpyusrp_periphs as lib Q. Any idea why this is NOT working for me ? _______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> To unsubscribe send an email to usrp-users-leave@lists.ettus.com<mailto:usrp-users-leave@lists.ettus.com>