Does a command exist to list connect I/O modules

Topics about the Software of Revolution Pi
Post Reply
duelingcats
Posts: 11
Joined: 14 Nov 2024, 07:34

Does a command exist to list connect I/O modules

Post by duelingcats »

Is there a command line tool or option available in PiCtory that will list what physical I/O modules are attached to the main controller and in the proper order as well?

I am just thinking of a scenario where I may have an installation where the modules are connected in an order that isn't immediately known to me and having a command or tool to identify the ordering and which side(s) they are connected would be ideal. Does PiCtory not have a way to auto discover what is connected to it?

I also noticed that there appears to be a serial number printed on the I/O modules. Does a command exist to fetch those serials as well? Below I have circled the area what appears to be the serial.
Image
paolom
Posts: 5
Joined: 09 Oct 2024, 14:29

Re: Does a command exist to list connect I/O modules

Post by paolom »

Did you try with piTest -d ?

You should receive the list of the hardware configured and/or connected.

Bye
Paolo
User avatar
Amar
KUNBUS
Posts: 200
Joined: 15 Jul 2019, 12:58

Re: Does a command exist to list connect I/O modules

Post by Amar »

Hi,
Module discovery via CLI
The piTest -d command is your best tool here. It queries the piControl driver directly and lists all physically connected modules in their exact PiBridge chain order, including modules that are present but not yet configured in PiCtory. No auto-populate into PiCtory exists, but piTest -d gives you everything you need to manually replicate the topology.
Serial numbers
Serial numbers are indeed readable via software — the piControl driver exposes them through the KB_GET_DEVICE_INFO_LIST IOCTL on /dev/piControl0. The SDeviceInfo struct returned for each module includes the i32uSerialnumber field, which matches the number printed on the module label (as circled in your photo).
revpi-inventory.py
Try the attached sample Python script that wraps this IOCTL and presents the full system inventory in a readable format — module name, physical position (side + slot), bus address, serial number, and firmware version. Simply copy it to your RevPi and run:

Code: Select all

sudo python3 revpi-inventory.py
revpi-inventory.zip
(3.34 KiB) Downloaded 251 times
Regards,
Amar
KUNBUS
Post Reply