Parallel Port Card CH352 Chip
I have been reading and trying stuff for three weeks now and am it wits end.
I have an older dell computer with the integrated parallel port at address 0x378. I want to add a second parallel port to work towards a voltage controlled torch height controller. My machine was working on the existing parallel port rather predictably.
I bought the deal extreme pci parallel port which has come to be know as the CH352 card. It has a single chip, likely some type of programmable ic which made it very inexpensive. Showed up quickly, fit right in, looking good.
After trying every address that I could find for the second parallel port in stepconf nothing worked.
At the terminal prompt, using Desktop Applications Accessories Terminal I could run the lspci -v command.
Holy, that looks nothing like the examples on the web.
Lots of devices were access denied, and there were usb devices, graphics devices, sound devices, serial devices, I got three pages of devices, none of which seemed to say anything about a parallel port.
Back to the net, and after removing the card and running lspci – v, inserting the card and running lspci –v and deductively seeing what was different, I was able to narrow it down to three devices that changed when I added 1 card.
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev81) . . .
Memory behind bridge ff800000-ff9fffff
Prefetchable memory behind bridge fff00000 – 000fffff …..
00:1f.0 ISA bridge …..
And the third,
a serial card 01:07:0 Serial Controller; Device 4348:5053 (rev 10)(prog-if 02)
Subsystem: Device 4348:5053 …..
Region 0:I/O ports at ecf8 [size 8]
Region 1:I/O ports at ece8 [size 8]
Kernel driver in use: serial
Okay, stumped. Now what?
Turns out that there is a disk included with the card with “drivers” for Linux and Windoughs
The instructions are extremely short and read:
. . . .
3 – install and uninstall CH352 PCI to one paraport
<1>-copy install_p_80x86.o to /usr/sbin
<2>-Add /usr/sbin/install_p_80x86 at the end of the /etc/rc.d/rc.local.
The LP1 and LP2 (if you inster two boards) are ready for application.
(2) Uninstall . . . . .
So I think I need to save a “driver file” somewhere and get the program to execute the driver file on startup.
I discovered that you cannot do this copy and paste from the Ubuntu desktop. I could copy the file install_p_80x86.o from the CD to the desktop but trying to copy it into any of the many /usr/sbin directories was not permissible due to the owner of the folder being “root”. WTF?
I read a whole bunch of fairly cryptic webpages and have come to believe that I can only copy this file using the Desktop Applications Accessories Terminal; enter at the top left of the GUI which provides a prompt.
A command called “sudo” then lies to the operating system about my permission level and ownership. Why? I don’t know, it’s my machine in my garage and I am the sole user, admin, installer. Who the heck is this “root” guy and why is he on my computer? I feel like a hacker-burgler in my own computer.
So at the prompt, after searching on the web how to’s and on the Ubuntu file structure I write:
duane@duane-desktop:/usr/sbin$ sudo cp /home/duane/Desktop/install_p_86x80.o /usr/sbin/install_p_80x86
and low and behold, the file copies into /usr/sbin
Okay, now to add the executable line into rc.local. The instructions with the card kind of make sense now, once I sort of understand what I think they want me to do. But I had to search all over the net to find what to do next. And, by the way, I still can’t find this rc.d directory, only rc0.d, rc1.d, rc2.d etc up to 6.
Another search and forum suggested that using rc.local in the directory /etc was really what needed to be done.
So again the root guy owns this too, so using any sort of point and click editor is prohibited and it’s back to the terminal to gedit, rc.local.
rc.local is entirely commented out. # at the beginning of every line.
The comments say the rc.local file does nothing
So I remove the # on the first line and the 0 exit line at the end, and add the line /usr/sbin/install_p_86x80
I assume I don’t need the .o extension, or at least that’s what the instructions(?) with the card say.
Okay, do that, reboot, start up stepconf, add the 0xece8 for the second paraport and save. Start up CNC and CRASH. The errors come up as can’t allocate paraport 0 at 0x378, nevermind the new one at 0xece8.
Wend back to an old stepconf and the 0x378 only setup no longer works.
So, new questions, did this install_p_86x80.o mess up parallel port 0 which was working fine?
Seems to have.
I have also found reference to modifying a script file: The explaination(?) goes something like this:
insmod parport_pc.o io=0x378,0xdf38 //parport I/O base address
Well, I recognize the #!/bin/sh. That was at the top of the local.rc file. BTW I took out the # thinking it was a comment in front of !/bin/sh. Should I have? I only added
/usr/sbin/install_p_80x86 and the "0" at the end cause that what the instructions said. Well actually the local.rc file said have a exit 0 at the end.
Now nothing works, CNC program CRASHES looking for parallel port 0.
Why is this so difficult!
As a suggestion, wouldn’t it make sense if one selected a second parallel port in stepconf, that a second pin assignment page automatically come up?
I don’t even want to think about HAL and the Ladder Logic that is coming up if I ever get this card to work.
What have I missed?
Do I leave the # characters in or take them out?
is exit 0 the right thing at the end of the file or # exit 0?
don't I eventually set the addresses in a hal config line? Whats this insmod rmmod stuff about?
Thanks for reading.
Unfortunately you have chosen a very flakey card, whose parallel port is only usable with a driver.
The 2 addresses you have on the print are what they say they are, serial ports. A lot of parport cards also provide a couple of serial ports too.
This is how to get the driver working
However this will not work with Linuxcnc, because as PCW says, if you use a driver which claims the port or invokes another module which does, in this case parport_pc,
Linuxcnc will not be able to claim the port and your config will fail.
If you are using steppers and software generated steps, get a parport card which is based upon the MosChip 9845 or higher chip.
If using a FPGA card or Gecko drivers which require EPP mode to work, Oxford semiconductors are a good choice
See my FAQ
Time to cut your losses, put it back on ebay and buy one suited to the task
Thanks for your help.
But if you have your heart set on a parallel port card, start with this FAQ to help you choose a usable one.
An IO card will give you advantages, at a price.
I haven't had much luck with the whole charge pump concept either.
If you mean that you can't get the machine to come out of Estop and activate the charge pump, that will be quite simple to fix.
Stepconf used to produce a config that did not work with some charge pump activated BOBs
You will have to be specific about the problem and attach your hal and ini files
Having a know chipset card meant there were no drivers that needed to be installed, even though a disk came with the card.
I can use the hal viewer in axis and successfully "see" all the pin inputs. haven't tested the outputs, other than to see that they light up led's and turn them off during the boot process, so I have no concern that they are working. I am going to start two new threads with a couple of issues. Thanks everyone.
$ lspci -v
01:05.0 Serial controller: Device 4651:5073 (rev 10) (prog-if 02 )
Subsystem: Device 4651:3273
Flags: medium devsel, IRQ 20
I/O ports at e030
I/O ports at e020
I/O ports at e010
I/O ports at e000
Kernel driver in use: serial
I have created this file
$ cat /etc/modprobe.d/parport_CH352L.conf
options parport_pc io=0xe010
and with this command loaded the driver
# modprobe parport_pc
after that output from dmesg
[ 166.771940] parport0: PC-style at 0xe010, irq -2147483648 [PCSPP,TRISTATE]
[ 166.771972] parport0: irq -2147483648 in use, resorting to polled operation
Can this card working with linuxcnc now ?