Another Newbie with PCIE parallel port problems
26 Mar 2019 02:45 #129638
by cmelojr
Another Newbie with PCIE parallel port problems was created by cmelojr
So it could be that it's my BOB which is the cheap chinese one that gets thrown in with stepperdriver/stepper combos but I'll describe where I'm at.
pcie card I have is the netmos 9900 variety HERE
Following instructions in the wiki and what I found in other threads I run lspci -v and find that the ports are disabled so I run:
sudo modprobe parport_pc
sudo rmmod ppdev
sudo rmmod lp
sudo rmmod parport_pc
Then that is cleared up.
However I can't get it to control anything. So I downloaded the Ptest file here and tried editing the .hal to enter my two possible ports(0xc000 or 0xc010) while monitor the pin I'm trying to activate and get nothing. I've tried probing the BOB and the cable pins themselves with a voltmeter. Putting them on for example pin 2 and ground. I believe I should see 5 volts here if everything were working correctly?
I could also be editing the .hal files incorrectly but from my understanding I find the line that reads:
"loadrt hal_parport cfg="0" and change it to "loadrt hal_parport cfg="0xc0x0" and since I only have the one port it should be good?
I've seen other have trouble with this card so maybe I just need to buy a new one but I feel like I've gotten past the problems that others seem to get hung up on so maybe it's not the card.
Thanks for any help
pcie card I have is the netmos 9900 variety HERE
Following instructions in the wiki and what I found in other threads I run lspci -v and find that the ports are disabled so I run:
sudo modprobe parport_pc
sudo rmmod ppdev
sudo rmmod lp
sudo rmmod parport_pc
Then that is cleared up.
However I can't get it to control anything. So I downloaded the Ptest file here and tried editing the .hal to enter my two possible ports(0xc000 or 0xc010) while monitor the pin I'm trying to activate and get nothing. I've tried probing the BOB and the cable pins themselves with a voltmeter. Putting them on for example pin 2 and ground. I believe I should see 5 volts here if everything were working correctly?
I could also be editing the .hal files incorrectly but from my understanding I find the line that reads:
"loadrt hal_parport cfg="0" and change it to "loadrt hal_parport cfg="0xc0x0" and since I only have the one port it should be good?
I've seen other have trouble with this card so maybe I just need to buy a new one but I feel like I've gotten past the problems that others seem to get hung up on so maybe it's not the card.
Thanks for any help
Please Log in or Create an account to join the conversation.
26 Mar 2019 16:51 #129708
by andypugh
Replied by andypugh on topic Another Newbie with PCIE parallel port problems
Maybe you have an onboard parallel port (as a header) and that is parport 0.
You could try 1.
I assume that you got 0xc000 from lspci?
If you start LinuxCNC then quit it, then look at dmesg in the terminal, is there anything interesting on the last 100 lines or so about parports?
You could try 1.
I assume that you got 0xc000 from lspci?
If you start LinuxCNC then quit it, then look at dmesg in the terminal, is there anything interesting on the last 100 lines or so about parports?
Please Log in or Create an account to join the conversation.
26 Mar 2019 16:59 #129709
by cmelojr
Replied by cmelojr on topic Another Newbie with PCIE parallel port problems
I don't think there's any on board parallel port even as an unused header but I'll double check tonight.
I did find c000 and c010 when using lscpi. Both 8 pin which I assume were the two "halves" of the same card/port? Either way I tried both and neither worked but maybe like us said I need to try parport 1. I assume that's editing the .hal where I see parport 0 to 1s. Or do I have to add additional lines that are 1s?
I'll also restart it and check dmesg when I get home.
I would have copy and pasted all my actual files and information from the terminal but the linux cnc machine isn't connected to the internet.
Thanks for the suggestions
I did find c000 and c010 when using lscpi. Both 8 pin which I assume were the two "halves" of the same card/port? Either way I tried both and neither worked but maybe like us said I need to try parport 1. I assume that's editing the .hal where I see parport 0 to 1s. Or do I have to add additional lines that are 1s?
I'll also restart it and check dmesg when I get home.
I would have copy and pasted all my actual files and information from the terminal but the linux cnc machine isn't connected to the internet.
Thanks for the suggestions
Please Log in or Create an account to join the conversation.
- Richard J Kinch
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 4
26 Mar 2019 18:45 - 26 Mar 2019 18:46 #129718
by Richard J Kinch
I am just starting a project step of integrating the identical PCIe parallel port card as a second port for an already-running LinuxCNC system running on a ASRock Q1900B-ITX motherboard with an on-board port that works well.
What is your situation with BIOS settings? Was that considered in your installation process?
Have you experimented with getting something simpler in Linux to run the port (something similar to the "echo hello > /dev/lp0" of olden days), to isolate yourself from the LinuxCNC complexities?
On the electrical level, it's best to have some conservative test device with +5VDC and pullup resistors, that you've proven to work on a known-working port. Otherwise you can get trapped in a situation where there's more than one problem that single-point diagnosis can't solve.
Replied by Richard J Kinch on topic Another Newbie with PCIE parallel port problems
Thanks for the suggestions
I am just starting a project step of integrating the identical PCIe parallel port card as a second port for an already-running LinuxCNC system running on a ASRock Q1900B-ITX motherboard with an on-board port that works well.
What is your situation with BIOS settings? Was that considered in your installation process?
Have you experimented with getting something simpler in Linux to run the port (something similar to the "echo hello > /dev/lp0" of olden days), to isolate yourself from the LinuxCNC complexities?
On the electrical level, it's best to have some conservative test device with +5VDC and pullup resistors, that you've proven to work on a known-working port. Otherwise you can get trapped in a situation where there's more than one problem that single-point diagnosis can't solve.
Last edit: 26 Mar 2019 18:46 by Richard J Kinch.
Please Log in or Create an account to join the conversation.
26 Mar 2019 21:09 #129722
by cmelojr
Replied by cmelojr on topic Another Newbie with PCIE parallel port problems
I have looked in the BIOS but whatever motherboard is in the PC from Lenovo has very simplistic BIOS settings. Nothing I can change that relates to the PCIe. I do remember reading that someone else had trouble with the BIOS and that's one thing I checked last night.
I'm not at all familiar with "echo hello > /dev/lp0" but what I mentioned trying is using this: wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester
I can't be certain I was using it right nor probing the pins correctly. To better describe what I was doing is I had a DVM probe on pin 2 for example and the other probe on one of the grounds. Then used Ptest to try and activate pin 2. I was looking for 5 volts which I did not see but like you said there are so many other things that could be not working or I could be doing wrong. I suppose another thing I can check is that the cable at least has continuity. I have no other parallel port devices so there's not really anything else I can check that I have on hand.
This gives me more things to check though, thank you.
I'm not at all familiar with "echo hello > /dev/lp0" but what I mentioned trying is using this: wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester
I can't be certain I was using it right nor probing the pins correctly. To better describe what I was doing is I had a DVM probe on pin 2 for example and the other probe on one of the grounds. Then used Ptest to try and activate pin 2. I was looking for 5 volts which I did not see but like you said there are so many other things that could be not working or I could be doing wrong. I suppose another thing I can check is that the cable at least has continuity. I have no other parallel port devices so there's not really anything else I can check that I have on hand.
This gives me more things to check though, thank you.
Please Log in or Create an account to join the conversation.
26 Mar 2019 23:52 #129733
by cmelojr
Replied by cmelojr on topic Another Newbie with PCIE parallel port problems
So I've started to do more digging. For those that may be interested it's a Lenovo K450e desktop with a CIB85M Motherboard. No onboard parallel ports.
Restarted and looked at dmesg which I'll attach as well as lspci
I also retried starting a new stepconf with a 1 for parport base address
Restarted and looked at dmesg which I'll attach as well as lspci
I also retried starting a new stepconf with a 1 for parport base address
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19198
- Thank you received: 6434
26 Mar 2019 23:54 #129734
by tommylight
"loadrt hal_parport cfg="0xc000"
or
"loadrt hal_parport cfg="0xc010"
The parallel port tester that comes with Linuxcnc is very good at testing ports, it has no "complexities", and parallel port is a Direct Memory Access device, so can not be tested same as serial port.
You can use a piece of wire and insert it on pins 2 and 10,11,12,13,15, so when you press pin 2 on hal pp tester you get a response on the input.
The thing with modprobe is not OK, i never had to do that to load the driver for parallel port.
Replied by tommylight on topic Another Newbie with PCIE parallel port problems
"loadrt hal_parport cfg="0xc0x0" <<< is wrong, "x" there is not to substitute a number, it is an actual address bit, it should beI could also be editing the .hal files incorrectly but from my understanding I find the line that reads:
"loadrt hal_parport cfg="0" and change it to "loadrt hal_parport cfg="0xc0x0" and since I only have the one port it should be good?
"loadrt hal_parport cfg="0xc000"
or
"loadrt hal_parport cfg="0xc010"
The parallel port tester that comes with Linuxcnc is very good at testing ports, it has no "complexities", and parallel port is a Direct Memory Access device, so can not be tested same as serial port.
You can use a piece of wire and insert it on pins 2 and 10,11,12,13,15, so when you press pin 2 on hal pp tester you get a response on the input.
The thing with modprobe is not OK, i never had to do that to load the driver for parallel port.
Please Log in or Create an account to join the conversation.
27 Mar 2019 00:01 #129736
by cmelojr
Replied by cmelojr on topic Another Newbie with PCIE parallel port problems
The x in 0xc0x0 was just me trying to say I tried both 0xc000 and 0xc010 exactly like you say.
For the ptest what do you mean by response? I tried placing a jumper on 2 and a ground but couldn't get anything to happen. By clicking on pin 2 in ptest or not. I'll test the cable itself and retry now.
Interestingly about the modprobe you mention is I didn't have to do it this time I started the computer. The lspci I just posted is from a couple minutes ago without running those lines of code I mentioned.
Thanks, still trying to wrap my head around all this.
For the ptest what do you mean by response? I tried placing a jumper on 2 and a ground but couldn't get anything to happen. By clicking on pin 2 in ptest or not. I'll test the cable itself and retry now.
Interestingly about the modprobe you mention is I didn't have to do it this time I started the computer. The lspci I just posted is from a couple minutes ago without running those lines of code I mentioned.
Thanks, still trying to wrap my head around all this.
Please Log in or Create an account to join the conversation.
27 Mar 2019 00:06 #129739
by andypugh
Replied by andypugh on topic Another Newbie with PCIE parallel port problems
Nothing in the dmesg that I was expecting, so perhaps you are using the uspace build of LinuxCNC with a preempt-rt kernel?
In that case the relevant info should be in the terminal window that you start the p-port tester from.
Are you definitely using a relatime kernel (uname -a will tell us)
In that case the relevant info should be in the terminal window that you start the p-port tester from.
Are you definitely using a relatime kernel (uname -a will tell us)
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19198
- Thank you received: 6434
27 Mar 2019 00:14 #129740
by tommylight
Replied by tommylight on topic Another Newbie with PCIE parallel port problems
From your dmesg:
[ 16.623196] lp: driver loaded but no devices found
[ 16.908926] ppdev: user-space parallel port driver
Can you use "sudo lspci -v"
[ 16.623196] lp: driver loaded but no devices found
[ 16.908926] ppdev: user-space parallel port driver
Can you use "sudo lspci -v"
Please Log in or Create an account to join the conversation.
Time to create page: 0.193 seconds