× Forum Header

Trouble getting StarTech PEX1P2 card to get work with stepconf

More
28 Mar 2023 07:46 - 28 Mar 2023 11:07 #267674 by penguinman
Hello, LinuxCNC newbie here. I just bought a StarTech PEX1P2 PCIe to Parallel port card to add a parallel port to my computer for using with LinuxCNC.

When I launch Stepconf from the terminal I get the error message "No parport found" and no parport can be found in /dev

I have tried most things in these posts: So far I have tried:
  • Enabling the I/O ports with `echo 1 > enable`
  • Enabling parport and parport_pc (with and without the io= irq= parameters). If I specify io=<address> /dev/parport0 appears but doesnt seem to work, as not even the ptest.hal port tester would launch.
  • Compiling the drivers for AX99100 (a patched version that actually could compile) myself and modprobing it.
  • Running ptest.hal with various different addresses
  • Various combinations of the above

I am using LinuxCNC 2.10.0~pre0 and the 4.19.0-23-rt-amd64 kernel

The output of `sudo lspci -v` directly after user login:
03:00.2 Parallel controller: Asix Electronics Corporation Device 9100 (prog-if 03 [IEEE1284])
        Subsystem: Device a000:2000
        Physical Slot: 3
        Flags: fast devsel, IRQ 5
        I/O ports at d010 [disabled]
=8        I/O ports at d000 [disabled]
=8        Memory at ef101000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Memory at ef100000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
        Capabilities: [78] Power Management version 3
        Capabilities: [80] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting

Been stuck trying to get this card to work for about 7 hours now, so all help is greatly appreciated!

Edit:
I enabled the card using the method above and managed to register it with `modprobe parport_pc io=0xd020 irq=19` and double checked with `sudo dmesg` that it registered without error. However I still can't test my axis using Stepconf. My theory is that I screwed up with configuring parport base address.

dmesg output:
[ 5538.624296] parport0: PC-style at 0xd020 [PCSPP,TRISTATE,EPP]
[ 5562.488611] parport0: PC-style at 0xd010 [PCSPP,EPP]
[ 5640.718106] parport0: PC-style at 0xd010, irq 19 [PCSPP,EPP]

Edit 2:
I finally solved it (kinda). I finally removed my parallel cable from my PC and decided to test it with a multimeter and ptest.hal. Turns out after doing the steps below i managed to register the card with the kernel and my multimeter test show that every single pin works flawlessly. Unfortunally for me that means that the issue lies elsewhere, but atleast this problem is solved.

Solution:
sudo sh -c "echo 1 > /sys/bus/pci/devices/0000\:03\:00.2/enable"
sudo modprobe parport_pc io=0xd010 irq=19
                          •  
Last edit: 28 Mar 2023 11:07 by penguinman. Reason: Added solution

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

More
11 Apr 2023 22:30 #268844 by andypugh
You shouldn't need any kind of driver. Now that you know that the base address is 0xd010 remove all the config stuff that you have put in and load the LinuxCNC driver using that address.

(In fact, try editing the parport tester to use that address instead of the default 0x378 and I think it ought to work.)

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

More
17 Jun 2023 08:30 #273737 by mehdidadash

Hello, LinuxCNC newbie here. I just bought a StarTech PEX1P2 PCIe to Parallel port card to add a parallel port to my computer for using with LinuxCNC.

When I launch Stepconf from the terminal I get the error message "No parport found" and no parport can be found in /dev

I have tried most things in these posts:

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

More
25 Jun 2023 20:58 #274208 by andypugh
It looks like you have discovered the delights of the forum editor :-)

(The track is to press the "source" button and edit the tags manually)

Reading between the lines, are you now able to use the card? 

You shouldn't actually need to enable the card in Linux. As long as you know the base address LinuxCNC should be able to work it without any cooperation from the rest of Linux. 
 

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

More
26 Jun 2023 06:41 #274226 by mehdidadash
Oh so the trick was to use source button, i had a really hard time quoting using mobile phone. Thanks.
In my case, linuxcnc didn't through any error but when i was using ptest. Hal , changing input pins did not change physical pins . But after enabling the parallel driver using the code he gave, the pins work greatly.

It looks like you have discovered the delights of the forum editor :-)

(The track is to press the "source" button and edit the tags manually)

Reading between the lines, are you now able to use the card? 

You shouldn't actually need to enable the card in Linux. As long as you know the base address LinuxCNC should be able to work it without any cooperation from the rest of Linux. 

 

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

Time to create page: 0.090 seconds
Powered by Kunena Forum