Second LPT port - SOLVED!

More
11 Apr 2020 18:48 #163645 by radek_marko
I have finally solved it

Steps:
1. Add new file
/etc/modprobe.d/alsa-base.conf


2. In the file, I've added BOTH ports - the onboard port by the base address and PCI card by the address from commands
dmesg | grep par
lspci -v



3. Rebooted the PC
sudo reboot

After that operation, I've changed settings in sconf by setting parallel port address as 0 for the first port and 1 for the second port. It also solves the problem with the test reporting port error :D
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Apr 2020 19:25 #163646 by cmorley
Replied by cmorley on topic Second LPT port - SOLVED!
Well that is interesting, how did you figure that out!

Please Log in or Create an account to join the conversation.

More
11 Apr 2020 20:20 #163653 by radek_marko

cmorley wrote: Well that is interesting, how did you figure that out!


Slowly and painfully ;) I'm just determined to get things done and I was not giving up.

The first hint was that the test app (ptest.hal) works OK and that was suggesting that I have fully functional hardware (as it was linked by address). Then I figured out that both ptest and LinuxCNC are giving me the same error saying that port @47104 cannot be loaded - that is the decimal value of the port address 0xb800 in hex. I've checked that it requires a port which is in the sequence of 0,1,2... so I thought that what is missing is mapping of the address to the port number and then I have discovered how it's done...
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
11 Apr 2020 20:22 #163654 by cmorley
Replied by cmorley on topic Second LPT port - SOLVED!
I was thinking about how to add your process into the docs for the next guy..

Good job!

Please Log in or Create an account to join the conversation.

More
11 Apr 2020 21:17 #163659 by tommylight
Nice, and thanks for reporting back.
Yesterday i was experimenting with an add on parallel port and it uses the first address, i have several that use the third address reported by lspci.

Please Log in or Create an account to join the conversation.

More
11 Apr 2020 21:42 - 11 Apr 2020 21:43 #163664 by radek_marko

cmorley wrote: I was thinking about how to add your process into the docs for the next guy..

Good job!


Thank you, expect more lame questions as I'm building my first CNC (Plasma cutter) ;)

My suggestion for future installations would be (correct my phrases as I'm not a Linux guy and English is not my native language):
1. First, run "lspci -v" to check if the device providing additional ports is detected
2. If detect note it's address and IRQ
3. Next, run "sudo dmesg | grep par" - that will give you the list of lp0 (or lpX) ports that are already "mapped"
4. Note port address and IRQ of existing ports
5. Edit or create /etc/modprobe.d/alsa-base.conf and add lines as per my config, where "(...)io="<LPT1 address>,<LPT2 address>" irq="<LPT1 IRQ>,<LPT2 IRQ>,auto"

where <LPT1 address> is the address of lp0 listed on "dmesg | grep par"
where <LPT1 IRQ> is the IRQ of lp0 listed on "dmesg | grep par"

where <LPT2 address> is the SECOND address of PCI card listed on "lspci -v"
where <LPT2 IRQ> is the IRQ of "lspci -v"

I hope it will help others in the future. If you need any help then send me PM.

You can also add the test program I've modified ptest.hal and ptest.xml - published here: LINK
Last edit: 11 Apr 2020 21:43 by radek_marko.
The following user(s) said Thank You: tommylight, Clive S, freemoore

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum