Testing add on PCI PP, how do I know if it's working properly in test/demo mode?

More
10 May 2022 00:03 - 10 May 2022 00:39 #242434 by Kilohertz
Ok here is how I tried to load the parport using halcmd...

paul@CNCMachine:~$ halrun
.
halcmd: loadrt hal_parport cfg="0x378 out"
halcmd:
halcmd: exit
paul@CNCMachine:~$ dmesg | grep par
[ 0.004105] AppArmor: AppArmor disabled by boot time parameter
[ 0.121682] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
[ 2.443343] parport 0xe000 (WARNING): CTR: wrote 0x0c, read 0xff
[ 2.443351] parport 0xe000 (WARNING): DATA: wrote 0xaa, read 0xff
[ 2.443355] parport 0xe000: You gave this address, but there is probably no parallel port there!
[ 2.443858] parport0: PC-style at 0xe000, irq 5 [PCSPP,TRISTATE]
[ 7.213493] lp0: using parport0 (interrupt-driven).
[ 7.225012] ppdev: user-space parallel port driver
paul@CNCMachine:~$

Ok an update...I have some success....

I switched computers to a Lenovo 3Ghz single core P4 desktop, Then I booted into Deb 10 2.8.2 instead of Wheezy 2.7.14 with the 2.8.2 kernel. I ran the halcmd:  loadrt hal_parport cfg="0x378 out" and this time I got a reply stating it found 0x378 and IRQ7, then I ran the ppdiag.txt script I found on the link from Tommy and it came up with

paul@CNCMachine:~/Downloads$ sh -e ppdiag.txt
 
WARNING:
You are not runnig this script as 'root'. Only a few checks will be done.
No configuration update will be done.
 
S01: parport built as module
 
S02: parport0:
S02:    modes:PCSPP,TRISTATE,EPP
S02:    ADDR :0x378
S02:    IRQ  :7
S02:    DMA  :no DMA used
 
grep: /etc/modules.conf: No such file or directory
paul@CNCMachine:~/Downloads$

Then I rebooted the computer and in BIOS changed the PP to 278 and IRQ5 and ran the halcmd again and got the correct reply and then ran the script ppdiag.txt and got

paul@CNCMachine:~/Downloads$ sh -e ppdiag.txt
 
WARNING:
You are not runnig this script as 'root'. Only a few checks will be done.
No configuration update will be done.
 
S01: parport built as module
 
S02: parport0:
S02:    modes:PCSPP,TRISTATE,EPP
S02:    ADDR :0x278
S02:    IRQ  :5
S02:    DMA  :no DMA used
 
grep: /etc/modules.conf: No such file or directory
paul@CNCMachine:~/Downloads$

YEAH! I would say it is now recognizing the PP in DEB10 2.8.2. I don't know why it doesn't work in Wheezy 2.7.14 with the updated kernel. I would rather use Wheezy as the latency is WAY better than DEB10.

I will now try the parport tests to see if I get the flashy lights working and then move on to the PCI card while still using DEB10. Once I get that sorted out, I will return to Wheezy and pull the remainder of my hair out trying to figure out why it doesn't work.

Cheers


 
Last edit: 10 May 2022 00:39 by Kilohertz.

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

More
10 May 2022 00:59 #242445 by Kilohertz
Here is the result using the PCI card, address detected is 5000-5008.

0a:09.0 XGA compatible controller: Device 1c00:2170 (rev 0f) (prog-if 01)
Subsystem: Device 1c00:2170
Flags: medium devsel, IRQ 3
I/O ports at 5008 [disabled]
I/O ports at 5000 [disabled]

paul@CNCMachine:~/Downloads$ halrun
halcmd: loadrt hal_parport cfg="5000 out"
Waiting for component 'hal_parport' to become ready.........Waited 3 seconds for master. giving up.
.Note: Using POSIX realtime
config string '5000 out'
No parport registered at 0x5000. This is not always an error. Continuing.

halcmd: exit
Note: Using POSIX realtime

Not sure what to make of this.

Going to start dinner, I'll check back later tonight.

Thanks!

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

More
10 May 2022 01:26 #242449 by Kilohertz
Just couldn't wait. I reset the parport to 378 in BIOS and loaded halcmd and ran the little LED test that displays this



AND IT WORKS!!!

Flippin' wonderful.

I'll tackle the PCI card later, must eat.

Cheers

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

More
10 May 2022 02:39 - 10 May 2022 02:44 #242455 by Kilohertz
OKay back to Wheezy 2.7.14 with 2.8.0 kernel...ran the halcmd command as per previous and get the same result...

paul@CNCMachine:~$ halrun
.
halcmd: loadrt hal_parport cfg="0x378 out"
halcmd: exit
paul@CNCMachine:~$ dmesg | grep par
[ 0.004088] AppArmor: AppArmor disabled by boot time parameter
[ 0.238322] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
[ 2.642547] parport 0xe000 (WARNING): CTR: wrote 0x0c, read 0xff
[ 2.642555] parport 0xe000 (WARNING): DATA: wrote 0xaa, read 0xff
[ 2.642558] parport 0xe000: You gave this address, but there is probably no parallel port there!
[ 2.642573] parport0: PC-style at 0xe000, irq 5 [PCSPP,TRISTATE]
[ 6.529948] lp0: using parport0 (interrupt-driven).
[ 6.536398] ppdev: user-space parallel port driver

And with the ppdiag.txt

paul@CNCMachine:~/Downloads$ sh -e ppdiag.txt
WARNING:
You are not runnig this script as 'root'. Only a few checks will be done.
No configuration update will be done.
 
S01: parport built as module
S02: parport0:
S02:    modes:PCSPP,TRISTATE
S02:    ADDR :0xE000
S02:    IRQ  :5
S02:    DMA  :5
 
grep: /etc/modules.conf: No such file or directory
paul@CNCMachine:~/Downloads$

It's obviously not recognizing the halcmd, but picking up the 0ex000 from somewhere?? This is a dual boot with the DEB10 2.8.2...I checked both grubs, nothing in there.

Any thoughts?

Cheers
Last edit: 10 May 2022 02:44 by Kilohertz.

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

More
10 May 2022 12:56 #242486 by Todd Zuercher
I can't say that I understand at all what is going wrong for you, but I know that the Linuxcnc parallel port driver does not need the Linux system parallel port driver to see the parallel port or even be loaded to work. In the distant past, in fact, it was often nessisary to blacklist the Linux system's parallel port driver for the Linuxcnc driver to work properly. But I have never had to do that myself. (and I've been using Linuxcnc since EMC2 v.2.4 and Ubuntu 10.04.) Maybe there is a small chance that trying that might help, (but I kind of doubt it.)

Do you still have the parallel port card installed in the pc when you are finding the 0xe000 address or is this with only the built in parallel port on the pc?

You might be able to simply ignore the fact that the system thinks there is a parallel port at that address, since the Linuxcnc parallel port driver does not use the Linux system parallel port driver.

Is your parallel port card a PCI or PCIe card? (Finding a PCIe card that actually works with Linuxcnc is somewhat difficult.)

What parallel port card are you using? (There are models and chipsets that just don't seem to work.)

If you need a PCIe option, a Mesa 6i25 may be a better choice than hassling with trying to find a PCIe card that actually works. Plus it has two ports and can generate and read/count pulses at Mhz rates without needing a super low latency PC.

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

More
10 May 2022 14:33 #242494 by Kilohertz
Wow, thanks Todd, you stated many things I didn't know, this should help me move forward.

It was late and I can't recall if I had removed the card when it found 0xe000 again, I'll try again tonight.

My card is Axgear, link below, PCI 32 bit. I just found the link in the stickies for PCI PP cards, I'll read thru that and hopefully learn more.

Amazon PCI PP card

Cheers

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

More
10 May 2022 17:40 #242507 by Todd Zuercher
It is entirely possible that that card simply isn't compatible with Linuxcnc. (and maybe not even Linux in general.) Can you read the model numbers off the main chip on the card and post them?
The following user(s) said Thank You: Kilohertz

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

More
11 May 2022 03:00 #242561 by Kilohertz
OK quick update...

I removed the PCI card and lspci doesn't see it, put the card back in and it finds it (new address, new computer) 5000-5008.

0a:09.0 Parallel controller: Device 1c00:2170 (rev 0f) (prog-if 01 [BiDir])
Subsystem: Device 1c00:2170
Flags: medium devsel, IRQ 3
I/O ports at 5008
I/O ports at 5000

And then this command

paul@CNCMachine:~/Downloads$ cat /proc/ioports | grep parport
0000-0000 : parport0
paul@CNCMachine:~/Downloads$


And finally this, but it is expected as I left 378 enabled in BIOS.

paul@CNCMachine:~/Downloads$ sh -e ppdiag.txt

WARNING:
You are not runnig this script as 'root'. Only a few checks will be done.
No configuration update will be done.

S01: parport built as module

S02: parport0:
S02: modes:PCSPP,TRISTATE
S02: ADDR :0x378
S02: IRQ :7
S02: DMA :1

grep: /etc/modules.conf: No such file or directory

I'll post a pic when I get back to the other computer.

Cheers

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

More
11 May 2022 03:05 #242562 by Kilohertz
And after rebooting with 378 on board disabled..

paul@CNCMachine:~/Downloads$ sh -e ppdiag.txt

WARNING:
You are not running this script as 'root'. Only a few checks will be done.
No configuration update will be done.

paul@CNCMachine:~/Downloads$
paul@CNCMachine:~/Downloads$ cat /proc/ioports | grep parport
paul@CNCMachine:~/Downloads$

Neither recognized.

Cheers

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

More
11 May 2022 03:23 #242566 by Kilohertz
picture of the PCI card I have

And here is the one I just bought, several people said this works with Linuxcnc, fingers crossed.
New card from Amazon
Cheers

 

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

Time to create page: 0.098 seconds
Powered by Kunena Forum