diff --git a/28-10-2025-Configuration-Changes.-.md b/28-10-2025-Configuration-Changes.-.md new file mode 100644 index 0000000..cf951c8 --- /dev/null +++ b/28-10-2025-Configuration-Changes.-.md @@ -0,0 +1,67 @@ +This is a work in progress + +## Introduction + +Many of the hardware drivers for the PCI cards used by Pixelator are from the Comedi project, which has been merged into the mainline Linux kernel. One consequence of this change is that the "comedi number" of a device is no longer stable between reboots and we have to switch to using the /sys virtual file system to refer to specific hardware in a stable way. So wherever we used to see things like a "device number", or a "/dev/comedi0", we will now need to set a "deviceName" option with a path string like "/sys/bus/pci/devices/0000:00:00.0/". This has been implemented in commits to the Pixelator repository on October 28th, 2025, and updating your installation after this date will require a change in configuration for both Pixelator and Orocos. + +**WARNING**: This procedure involved compiling a new version of the Orocos modules, which will overwrite the previously compiled ones. Therefore, going back to a previous version will involve more than just switching the link to the previous version since the old Orocos modules will need to be compiled again. + +## Backup Config Files + +It is a good idea to back up your current configuration files (including the start.ops file), just in case things go horribly wrong. + +## Mapping Addresses + +Since you should already have a working configuration, it should be easy to adapt the configuration. The first thing to do is to note the comedi numbers that correspond to the PCI slot numbers using `ls /sys/bus/pci/devices/*/comedi`. For example, at PolLux: +``` +control@x07da-stxm-1:~$ ls /sys/bus/pci/devices/0000*/comedi/ +'/sys/bus/pci/devices/0000:03:01.0/comedi/': +comedi1 + +'/sys/bus/pci/devices/0000:03:02.0/comedi/': +comedi0 + +'/sys/bus/pci/devices/0000:03:03.0/comedi/': +comedi3 + +'/sys/bus/pci/devices/0000:03:04.0/comedi/': +comedi2 +``` + +Here, references to a "comedi number", "devicePath", or "device number" of "0" (or "comedi0", or "/dev/comedi0") will need to be changed to "/sys/bus/pci/devices/0000:03:02.0/" (or "/sys/bus/pci/devices/0000:03:02.0/comedi/"). + +## Installing a New Version + +Please use [these instructions](https://gitea.psi.ch/MicroSpectro/Pixelator/wiki/Update-Pixelator-Version.-) to install the new version. Note that the update includes new code in the Orocos modules, so you will need to do the extra compiling for this. + + + + +## Reconfigure Orocos start.ops + +The Orocos `start.ops` file will need to be updated so that "device_nr" and "deviceNr" declarations are replaced with a "deviceName" declaration. For example, an old config of: +``` +Sensor1.deviceName = "/sys/bus/pci/devices/0000:07:0d.0" +AO1.device_nr = 2 +DO1.device_nr = 2 +DI1.deviceNr = 2 +``` +should be changed to: +``` +Sensor1.deviceName = "/sys/bus/pci/devices/0000:07:0d.0" +AO1.deviceName = "/sys/bus/pci/devices/0000:03:04.0/" +DO1.deviceName = "/sys/bus/pci/devices/0000:03:04.0/" +DI1.deviceName = "/sys/bus/pci/devices/0000:03:04.0/" +``` + +## Update Pixelator Repository With New Config Files + +### With Internet Access + +1. Check your startup script for PixelatorController to see which settings file (probably `settings.json`) file is being used (don't assume you know!). +2. If they are not already there, copy the settings file and any other file that it references into your section of the local git repository. For example, `~/work/stxm/PixelatorController/config/MAXYMUS/` +3. If it is not already there, copy the `start.ops` file that you are using to your section of the local git repository. For example, `~/work/stxm/PixelatorRealtime/startup/Maxymus/` +4. Use `git status` to get a list of + +### Without Internet Access +