How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4?
17 Sep 2024 00:47 - 17 Sep 2024 00:57 #310285
by MomoFab
How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4? was created by MomoFab
Hi at all,I installed LinuxCNC 2.8.4 on an old PC (Asrock M68PV-GS, Athlon II X2 250).
As the jitter values are very bad with standard installation and I only use parallel ports, I changed the kernel
uname -a >> Linux CNC 4.19.195-rtai-amd64...
I previously used LinuxCNC 2.7 and defining the 2 paports in etc/modprobe.d/alsa-case.conf:
alias parport_low level parport_pc
options parport_pc io=0xe480, 0xe880 irq=7,11,auto
But that no longer works with version 2.8 and I get error messages about parallel ports when I start LinuxCNC.
For testing purposes, I added these lines to etc/modprbe.d/ath9k_htc.conf.
I ran the console command
sudo modprobe -a parport_pc
from the >documentation< , which immediately activated the ports and then allowed the machine to be tested successfully
and without errors.
When I restarted the PC, the settings disappeared again.
Can you please help me configure the ports permanently?
Thank you in advance, Yves.
As the jitter values are very bad with standard installation and I only use parallel ports, I changed the kernel
uname -a >> Linux CNC 4.19.195-rtai-amd64...
I previously used LinuxCNC 2.7 and defining the 2 paports in etc/modprobe.d/alsa-case.conf:
alias parport_low level parport_pc
options parport_pc io=0xe480, 0xe880 irq=7,11,auto
But that no longer works with version 2.8 and I get error messages about parallel ports when I start LinuxCNC.
For testing purposes, I added these lines to etc/modprbe.d/ath9k_htc.conf.
I ran the console command
sudo modprobe -a parport_pc
from the >documentation< , which immediately activated the ports and then allowed the machine to be tested successfully
and without errors.
When I restarted the PC, the settings disappeared again.
Can you please help me configure the ports permanently?
Thank you in advance, Yves.
Last edit: 17 Sep 2024 00:57 by MomoFab. Reason: Format
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5056
- Thank you received: 1433
17 Sep 2024 19:53 #310341
by Todd Zuercher
Replied by Todd Zuercher on topic How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4?
I've used multiple parallel port configs with Linuxcnc for years and have never had to do anything like what you are describing. I think you might be making this more difficult than it needs to be. (Often using as many as 3 parallel ports.)
For me all I've ever done is plug in the parallel port card(s) into a PCI slot, and then looked up what port address was assigned to them using "lspci -v". Then used those addresses to to assign the ports in the parport driver config line of the hal file.
Now, that is assuming there are no issues with weird unsupported parallel port cards. I have found PCIe cards in particular to often be problematic, but I have been able to use some of those as well.
For me all I've ever done is plug in the parallel port card(s) into a PCI slot, and then looked up what port address was assigned to them using "lspci -v". Then used those addresses to to assign the ports in the parport driver config line of the hal file.
Now, that is assuming there are no issues with weird unsupported parallel port cards. I have found PCIe cards in particular to often be problematic, but I have been able to use some of those as well.
The following user(s) said Thank You: tommylight, MomoFab
Please Log in or Create an account to join the conversation.
18 Sep 2024 00:43 #310350
by MomoFab
Replied by MomoFab on topic How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4?
Hi,
There are 2 identical cheap Chinese PCI parallel port cards, maybe problematic, I can't judge that.
All I know is that they worked under LinuxCNC 2.7, so why not from version 2.8 onwards.
Of course I also get the addresses of the ports using lspci -v.
I entered these values into the *.hal file, but nothing happened.
Since I want the ports to be active when the PC boots up instead of when LinuxCNC starts,
I decided to enter the configuration of these in any existing *.conf file in the etc/modprobe.d directory.
This is easy to do, the "*.hal" remains untouched, which is what I personally prefer.
lspci -v is an important command, it provides data, but only shows the presence of the computer components,
not whether they are sufficiently configured.
Whether it was due to the "problematic" PCI cards or the swapping of the kernel,
the problem was that the module for the parallel ports was not loaded in the kernel.
lsmod provides information about which modules are loaded, "parport_pc" was not there.
I don't know if there is a simpler or even the right solution,
it works for me and maybe it will help others with the same problem.
Remedy: sudo nano /etc/modules-load.d/modules.conf
Entry: parport_pc
Reboot system
There are 2 identical cheap Chinese PCI parallel port cards, maybe problematic, I can't judge that.
All I know is that they worked under LinuxCNC 2.7, so why not from version 2.8 onwards.
Of course I also get the addresses of the ports using lspci -v.
I entered these values into the *.hal file, but nothing happened.
Since I want the ports to be active when the PC boots up instead of when LinuxCNC starts,
I decided to enter the configuration of these in any existing *.conf file in the etc/modprobe.d directory.
This is easy to do, the "*.hal" remains untouched, which is what I personally prefer.
lspci -v is an important command, it provides data, but only shows the presence of the computer components,
not whether they are sufficiently configured.
Whether it was due to the "problematic" PCI cards or the swapping of the kernel,
the problem was that the module for the parallel ports was not loaded in the kernel.
lsmod provides information about which modules are loaded, "parport_pc" was not there.
I don't know if there is a simpler or even the right solution,
it works for me and maybe it will help others with the same problem.
Remedy: sudo nano /etc/modules-load.d/modules.conf
Entry: parport_pc
Reboot system
Attachments:
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5056
- Thank you received: 1433
18 Sep 2024 14:46 #310371
by Todd Zuercher
Replied by Todd Zuercher on topic How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4?
What advantage would there be to be to have "the ports to be active when the PC boots up instead of when LinuxCNC starts"? If Linuxcnc isn't running then it can't act upon any input or control any output.
I have never even tried to use the "parport_pc" module. I wonder if this is causing some kind of conflict?
Lets try to narrow down exactly what your problem is. So, you are trying to migrate from 2.7 to a newer version? Are you wanting to go to the current 2.9.3? (Just wondered why go to 2.8 vs 2.9?) There are some pretty significant configuration changes required when moving from 2.7 to version 2.8 or greater. Are you copying your old config files to the new version or are you starting fresh creating a new config in the new version. I wonder if your config configuration is running afoul in the auto config conversion and if those are the real issues not anything to actually do with the parallel port.
I have to be honest none of my machines that use parallel ports have been updated beyond version 2.7. Mostly because my my machine configurations are complex enough to not work correctly with the automatic config conversion script that is supposed to update the configuration, and issues with finding new real time kernels that work well with the existing PC running the machine. That said, I just downloaded the current Linuxcnc iso and booted it live on the machine's PC (latency is pretty bad with the stock Preempt-RT kernel), opened the Linuxcnc parallel port test app and the IO to that port worked correctly. Then I copied over the machine's config files, and tried to run it. It took me a few tries to correct the config issues that the conversion script either missed or messed up, but I was able to get the config running and working correctly (didn't even need to change any of the 3 parallel port addresses or settings.) I was able to jog the machine and the inputs are working even with the bad latency.
In conclusion, I really don't know what might be giving you problems, unless it is a problem with what you are doing with the parport_pc module, an issue with 2.7-2.8 config conversion, or a problem with what ever kernel you are trying to use. (I know at some point between 2.7 and 2.9 32-bit kernel support was dropped.)
I have never even tried to use the "parport_pc" module. I wonder if this is causing some kind of conflict?
Lets try to narrow down exactly what your problem is. So, you are trying to migrate from 2.7 to a newer version? Are you wanting to go to the current 2.9.3? (Just wondered why go to 2.8 vs 2.9?) There are some pretty significant configuration changes required when moving from 2.7 to version 2.8 or greater. Are you copying your old config files to the new version or are you starting fresh creating a new config in the new version. I wonder if your config configuration is running afoul in the auto config conversion and if those are the real issues not anything to actually do with the parallel port.
I have to be honest none of my machines that use parallel ports have been updated beyond version 2.7. Mostly because my my machine configurations are complex enough to not work correctly with the automatic config conversion script that is supposed to update the configuration, and issues with finding new real time kernels that work well with the existing PC running the machine. That said, I just downloaded the current Linuxcnc iso and booted it live on the machine's PC (latency is pretty bad with the stock Preempt-RT kernel), opened the Linuxcnc parallel port test app and the IO to that port worked correctly. Then I copied over the machine's config files, and tried to run it. It took me a few tries to correct the config issues that the conversion script either missed or messed up, but I was able to get the config running and working correctly (didn't even need to change any of the 3 parallel port addresses or settings.) I was able to jog the machine and the inputs are working even with the bad latency.
In conclusion, I really don't know what might be giving you problems, unless it is a problem with what you are doing with the parport_pc module, an issue with 2.7-2.8 config conversion, or a problem with what ever kernel you are trying to use. (I know at some point between 2.7 and 2.9 32-bit kernel support was dropped.)
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5056
- Thank you received: 1433
18 Sep 2024 15:25 #310372
by Todd Zuercher
Replied by Todd Zuercher on topic How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4?
Maybe I was miss reading your posts, and you've resolved your issue and loading the parport_pc module as a kernel mod at start up was the solution?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 18767
- Thank you received: 6309
18 Sep 2024 15:37 #310373
by tommylight
Hence the "thank you" under the post.
Replied by tommylight on topic How to setup 2 PCI Parallel Ports on LinuxCNC 2.8.4?
+1Maybe I was miss reading your posts, and you've resolved your issue and loading the parport_pc module as a kernel mod at start up was the solution?
Hence the "thank you" under the post.
The following user(s) said Thank You: MomoFab
Please Log in or Create an account to join the conversation.
Time to create page: 0.424 seconds