Problems using plugin PCI parallel port as main IO.

More
04 Nov 2016 16:15 #82430 by Mouse
Hi,
I've had linuxCNC running on a flatbed router for several months however after a PC failure the computer was changed and I can not get Linux CNC to communicate with the plug in PCI parallel port. dmesg and lspci suggest the plug in card is being recognised in at some level in both hardware and operating system however I can't get LinuxCNC to work with it.

Details:
Motherboard has no on-board parallel port.
Plug in PCI parallel card has 9865 chipset in it.

I have tried manually changing the .hal file to the address listed below from lspci with no success.

Any pointers to what I may be doing wrong?

Response from dmesg,
awesomearms@debian:~$ dmesg | grep parallel
[   10.720118] PCI parallel port detected: 14f2:0121, I/O at 0x1008(0x0), IRQ 23
[   18.703161] ppdev: user-space parallel port driver

Response from lspci --vv
06:00.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03 [IEEE1284])
	Subsystem: Device a000:2000
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B+ DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32, Cache Line Size: 64 bytes
	Interrupt: pin C routed to IRQ 23
	Region 0: I/O ports at 1008 [size=8]
	Region 1: I/O ports at 1000 [size=8]
	Region 2: Memory at 90001000 (32-bit, non-prefetchable) [size=4K]
	Region 4: Memory at 90000000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: parport_pc

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

More
04 Nov 2016 16:53 - 04 Nov 2016 16:55 #82433 by jmelson
Is this for software-generated steps? If so, any parport card should work fine. You will have to go into the HAL file and change the port address to either 1000 or 1008, which lspci shows as the ranges of I/O prt addresses.

Ahh, one other thing. Newer parallel ports run on 3.3 V, the old (really old) ports ran on 5V. This could cause some step drivers to not see enough voltage/current to operate. If that is the case, a break out board with voltage boosters will be needed.

Jon
Last edit: 04 Nov 2016 16:55 by jmelson.

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

More
04 Nov 2016 17:03 #82434 by Mouse

Is this for software-generated steps?

Yes. Step, Direction and limit stops etc...

You will have to go into the HAL file and change the port address to either 1000 or 1008, which lspci shows as the ranges of I/O prt addresses.

I have tried both 1000 and 1008 as well as converting them to hex 0x3E8 and 0x3F0 and tried those as well but no luck.

I put the address in this line of the .hal file.
loadrt hal_parport cfg="XXXX"

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

More
04 Nov 2016 17:29 #82435 by Todd Zuercher
Replied by Todd Zuercher on topic Problems using plugin PCI parallel port as main IO.
What does this show you?
cat /proc/ioports | grep parport

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

More
04 Nov 2016 17:39 #82437 by Mouse
Thanks, I get.
awesomearms@debian:~$ cat /proc/ioports | grep parport
    1008-100a : parport0
    100b-100f : parport0

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

More
04 Nov 2016 17:49 #82438 by Todd Zuercher
Replied by Todd Zuercher on topic Problems using plugin PCI parallel port as main IO.
It looks like you have a 2 port parallel card and addresses should be 0x1008 and 0x100b. You will have to figure out which is which.

Did you say you already tried loadrt hal_parport cfg="0x1008"?

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

More
04 Nov 2016 18:12 #82439 by Mouse
0x1008 was unresponsive and 0x100b gave the following error on the Linux CNC error window.
Debug file information:
.
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: Device or resource busy
./beastatronVFD.hal:6: exit value: 1
./beastatronVFD.hal:6: insmod for hal_parport failed, returned -1
See the output of 'dmesg' for more information.
8861
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components

I have also noticed that dmesg has the parallel port at 0x1008 but also on IRQ 23, does this need to also be set?
[   10.720118] PCI parallel port detected: 14f2:0121, I/O at 0x1008(0x0), IRQ 23
[   10.720140] parport0: PC-style at 0x1008, irq 23 [PCSPP,TRISTATE,EPP]

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

More
04 Nov 2016 18:26 #82440 by Todd Zuercher
Replied by Todd Zuercher on topic Problems using plugin PCI parallel port as main IO.
Reboot and try 0x100b again.

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

More
04 Nov 2016 18:39 #82442 by Mouse
Same error as I described above. :(

I'm off for the weekend but will try out any further suggestions on Monday.

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

More
04 Nov 2016 19:13 #82444 by Todd Zuercher
Replied by Todd Zuercher on topic Problems using plugin PCI parallel port as main IO.
Just noticed that both the addresses from your above cat /proc/ioports | grep parport are listed as parport 0. When I use that command on a machine with multiple parallel ports I get this.
0378-037a : parport0
        e030-e032 : parport2
        e050-e052 : parport1

Something goofy is going on. Before when you said 0x1008 was "unresponsive" what did you mean? Unresponsive to what?

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

Moderators: PCWjmelson
Time to create page: 0.093 seconds
Powered by Kunena Forum