Management of non-intelligent RTM

So nice of you, the install went fine !

But sadly I still get the same issue:

$ devkit_ctrl -a get_power
Traceback (most recent call last):
  File "/home/pi/SylvainL/ipmc-tester/ipmc-tester/DevKITControl.py", line 581, in <module>
    IPMCDevObject = IPMCDevCom.IPMCDevCom(umgt_port = umgt_port)
TypeError: __init__() got an unexpected keyword argument 'umgt_port'

Hello,

I just tried it myself from scratch and it works for me. This probably means you are still pointing to the old version of the underlying communication library from ipmc-devkit. Can you please do the following:

cat which devkit_ctrl

And list the contents of the directory that PYTHONPATH points to? In particular the first lines of the following file are of interest:

IPMCDevLib/IPMCDevCom.py

cheers,

Stefan

Hi,

I of course checked all this twice prior to bothering you once more:

$ cat `which devkit_ctrl`
### Original: ###
#python3 /ipmc/ipmc-tester/ipmc-tester/DevKITControl.py "$@"

### As of 2025.04.09 following https://cern-ipmc-forum.web.cern.ch/t/management-of-non-intelligent-rtm/319/15
export PYTHONPATH=/home/pi/SylvainL/ipmc-tester/ipmc-devkit
python3 /home/pi/SylvainL/ipmc-tester/ipmc-tester/DevKITControl.py "$@"

$ devkit_ctrl -a get_power
Traceback (most recent call last):
  File "/home/pi/SylvainL/ipmc-tester/ipmc-tester/DevKITControl.py", line 581, in <module>
    IPMCDevObject = IPMCDevCom.IPMCDevCom(umgt_port = umgt_port)
TypeError: __init__() got an unexpected keyword argument 'umgt_port'

As suggested, I proceed to clean and reinstall everything from scratch, and now I get this:

$ devkit_ctrl -a get_power
[Info] using serial port /dev/ipmc-umgt to communicate with uMGT
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 322, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ipmc-umgt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/SylvainL/ipmc-tester/ipmc-tester/DevKITControl.py", line 581, in <module>
    IPMCDevObject = IPMCDevCom.IPMCDevCom(umgt_port = umgt_port)
  File "/home/pi/SylvainL/ipmc-tester/ipmc-devkit/IPMCDevLib/IPMCDevCom.py", line 28, in __init__
    with serial.Serial(port, 9600, timeout=1, write_timeout=1) as ser:
  File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 244, in __init__
    self.open()
  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 325, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ipmc-umgt: [Errno 2] No such file or directory: '/dev/ipmc-umgt'
$ file /dev/ipmc-umgt
/dev/ipmc-umgt: cannot open `/dev/ipmc-umgt' (No such file or directory)

Is there any installation script or udev rules than I should be aware of ?

Best regards,
Sylvain

Hello Sylvain,

this is actually much better. I assume there is a udev rule missing on your RPi. This will have to wait until Monday when Ralf is back. In the meantime you could try making a symbolic link from /dev/ttyUSB0 to /dev/ipmc-umgt. Also make sure that you have read and write access rights as a normal user. This is what I have on the RPi I’m using:

haass@ipmc-tester14:~/work$ ls -l /dev/ipmc-umgt
lrwxrwxrwx 1 root root 7 Mar 5 16:17 /dev/ipmc-umgt → ttyUSB0

I hope it will work then.

cheers,

Stefan

Yes that made it thank you.

Hi Stefan,

Our updated CERN-IPMC Raspberry Pi is now operational, thanks to your help and patience.

After spending several hours debugging and fixing the code you provided us with line by line to decipher and fix each compilation error I encountered (still strange to me BTW, as you stated that it compiled fine on your side… maybe we use different compilers ?), I am stuck on the error hereafter, that must be linked only to the RTM code (as everything else compile and run fine when removing all the RTM-related code in user_defs.h):

→ Configuration process successfully finished

→ Compile IPMC source code

make: Entering directory ‘/tmp/comp-0UV0gRHQAl’

/usr/local/arm-toolchain/bin/arm-none-eabi-ar: creating ipmc-core/app/libcompat/libcompat.a

/usr/local/arm-toolchain/bin/arm-none-eabi-ar: creating ipmc-core/net/libnet.a

/usr/local/arm-toolchain/bin/arm-none-eabi-ar: creating ipmc-core/hal/libhal.a

/usr/local/arm-toolchain/bin/arm-none-eabi-ar: creating ipmc-core/lib/lib.a

/usr/local/arm-toolchain/bin/arm-none-eabi-ar: creating ipmc-core/hal/actel/libactel.a

crc32 for the cold data is 0xa7e8a6b3 (12 vars total)

compat_record checksums: 0xfc 0xde

File name: ipmc-core/hal/firmware.bin size: 148408

Checksum section offset: 000004

Verify post_sram.c code

File name: ipmc-core/boot/boot.bin size: 18116

Checksum section offset: 0002A0

make: *** No rule to make target ‘ipmc-config/rtm-fru-info.bin’

make: Leaving directory ‘/tmp/comp-0UV0gRHQAl’

Error: IPMC configuration failed. This issue has been automatically reported

Does this message speak to you in any way ?

I attached a zip of the 2 RTM-related files we compile with, if of any help for your investigation.

Maybe can we also appoint a Zoom call at your convenience, to look at this interactively if you think this to be easier/faster ?

We also considered coming at CERN to meet you, but for a productive session we would have to first dismantle, then travel back and forth with, and then reinstall our setup back here, which is obviously not the simplest, safest and preferred solution for us.

Anyway, please tell us what you think ?

Amicalement,
Sylvain L.

PS: I tried to send you this message by mail first, but got rejected for whatever security policy reason…

Hello Sylvain,

unfortunately, Discourse (the tool we use for the forum) also ate your attachments.

I am using exactly the same remote compilation tool as you. However you need to add the following key to the XML:

I realized that I forgot to mention this in my previous messages. I can also send you an archive with the files I use to compile to your e-mail, hoping it will get through. If none of this fixes it, we can arrange a zoom call tomorrow.

cheers,

Stefan

Hello Stefan,

I replied to you by mail with log files attached to go further.

Best regards,
Sylvain L.