- Posts: 22012
- Thank you received: 4
Linux will not recognize my BOB no matter WHAT I try to do
- tommylight
-
- Offline
- Administrator
-
Also, i never ever got a port not found and have a port working, but that was always with RTAI kernel.
And before anyone goes OFF, i do this every day, i have over 15 PC/laptops at all times, i run machines every day, done over 60 parallel port controlled machines, have several add ons in use (always NetMos/MosChip), so please DON'T!
Please Log in to join the conversation.
- BeagleBrainz
- New Member
-
- Thank you received: 0
With regards to a Parallel Port being reserved, it is only reserved, claimed is the parlance used by the code & docs, when another app has asked for it to be claimed. The port can either be claimed for exclusive or non-exclusive use.
No if the kernel has no record of a particular hardware port/address belonging to a parallel port there is no way of knowing if it is in use by another device driver or free to use.
Now, this may not be a real life example but a typo could cause it, a port/address used by the disk subsystem or ethernet subsystem was specified. I suspect nothing good would happen.
Just grabbing a port/address is not a polite way of doing things, either by a user space application or another driver.
That is not my scheme, that is how it works with PCI\PCIe cards that have a PCI ID match to parport_pc. After loading the udev loads parport_pc driver the udev infrastructure loads ppdev to create the device file. This is also what happens with on board parallel ports. The only difference bu adding a file to /etc/modprobe.d/ is that we forcing this behaviour.
If the parport_pc driver was modified with the PCI ID of cards known to work, but not in the current driver, the udev infrastructure would do this as per normal.
Maybe hal_port could do what what parport_pc does when it loads. It writes then reads back a byte to the DATA & CTR ports, if if gets the same byte on the read the port exists if it doesn't there is essentially nothing physically there.
This can be seen thus.
With a malformed conf file in /etc/modprobe this is the message you get.
Even tho the file is called asla_base.conf parameters for any module can be put in there. It just makes things a little easier to maintain if you group things logically.
Please Log in to join the conversation.
- BeagleBrainz
- New Member
-
- Thank you received: 0
tommylight wrote: Beagle, i really admire your persistence, but if this is the topic with 4 different PC's and several add on boards/built in ports not working, it is a user error on all cases fuelled by repeating the same steps (wrong ones) over and over again in the setup/stepconf/hal files.
Also, i never ever got a port not found and have a port working, but that was always with RTAI kernel.
And before anyone goes OFF, i do this every day, i have over 15 PC/laptops at all times, i run machines every day, done over 60 parallel port controlled machines, have several add ons in use (always NetMos/MosChip), so please DON'T!
Sorry, I neglected this from the first couple of edits. Thanks for those words tommy. Just a little explanation from diving into into kernel & Linuxcnc code.
If the NETMOS chips PCI ID matches one of the PCI IDs known to the parport_pc kernel module you wont get that message. Each driver contains a list of supported PCI IDs, that's how the kernel\udev system knows which driver to load when it discovers a piece of hardware. USB is similar as well, it matches a driver & device via the ID.
I can bet that if you were to run lspci -vnn you would see the driver associated with that card is parport_pc. ppdev would also load and create an entry in /dev/.
There would also be an entry in /proc/sys/dev/parport/ such as parport0 (assuming one PP) which also would contain the base address of the parallel port in /proc/sys/dev/parport/parport0/base-addr
That logic would also dictate that you could use either
loadrt hal_parport cfg="base addr out"
or
loadrt hal_parport cfg="0 out"
Supported Oxford semi card.
forum.linuxcnc.org/18-computer/42826-par...hread?start=0#211997
Unsupported MOS Chip card, from my research it's the subsystem id that is causing the expected drivers not to load.
forum.linuxcnc.org/18-computer/42826-par...hread?start=0#212168
A supported combo Serial\Parallel card should also have parport_serial loaded as well.
For any one who wants some info on the driver PCI ID relationship:
wiki.archlinux.org/title/Modalias
Please Log in to join the conversation.
tommylight wrote: Also, i never ever got a port not found and have a port working, but that was always with RTAI kernel.
I get that error with a MosChip card yet it works fine on a parport config. It won't talk to a 7i90 though. ¯\_(ツ)_/¯
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22012
- Thank you received: 4
Please Log in to join the conversation.
- Kidkasual1
- Topic Author
- Offline
- Senior Member
-
- Posts: 43
- Thank you received: 0
You are correct, Mr Beagle. I did have the folder in the directory named Linux_parport.conf. I have changed the name of the folder to "parport setup" and have left the file within it named Linux_parport.conf. I have retried the command in the terminal, but I do not get the same script that you showed in your post. This is what I am getting in the command terminal now:
kidkasual@Mill:~$ sudo cp Linux_parport.conf /etc/modprobe.d
[sudo] password for kidkasual:
cp: cannot stat 'Linux_parport.conf': No such file or directory
kidkasual@Mill:~$
I am not understanding why I get different outputs than you do when I use the same command inputs that you do. What am I STILL doing wrong with this code???
Please Log in to join the conversation.
It can't copy the file if it isn't where you specify it to be. If you have a directory named "parport setup" in your current directory, and your Linux_parport.conf is in it, then tell cp where to find the file:
kidkasual@Mill:~$ sudo cp parport\ setup/Linux_parport.conf /etc/modprobe.d/
(Note that you need to "escape" the space in the directory name with a backslash or the computer will get confused. It's a perfect opportunity to try tab completion! Type 'sudo cp parport' and then press tab, and the '\ setup' part should fill in by itself, unless you have several files/directories that start with parport so that it's ambigous which one you want. Hmm, unless sudo messes things up... well, you can try!
Please Log in to join the conversation.
- BeagleBrainz
- New Member
-
- Thank you received: 0
Kidkasual1 wrote: Hello all. I hope you all had a great Father's Day weekend. We just got back from 5 days of camping. I hope everyone else had some great family time, as well.
You are correct, Mr Beagle. I did have the folder in the directory named Linux_parport.conf. I have changed the name of the folder to "parport setup" and have left the file within it named Linux_parport.conf. I have retried the command in the terminal, but I do not get the same script that you showed in your post. This is what I am getting in the command terminal now:
kidkasual@Mill:~$ sudo cp Linux_parport.conf /etc/modprobe.d
[sudo] password for kidkasual:
cp: cannot stat 'Linux_parport.conf': No such file or directory
kidkasual@Mill:~$
I am not understanding why I get different outputs than you do when I use the same command inputs that you do. What am I STILL doing wrong with this code???
If you are not in the directory your are running the the cp command from you need to give the full path to the file, this also includes the file name.
I have a directory called foo & file called bar and need to copy that to tmp.
cp -r ~/foo /tmp
will copy the directory foo to tmp and the file bar.txt
Before the command /tmp has no contents
After the command /tmp will have a new directory called foo with a file called bar.txt in the foo directory.
cp ~/foo/bar.xt /tmp
Will only copy the file contained in the directory called bar.txt that is in the foo directory.
After the command /tmp will have a new file called bar.txt in the /tmp directory.
Read this article:
www.cyberciti.biz/faq/copy-command/
if you have space in the directory or file name you can use this form.
cp "file name with spaces.txt" "/tmp/dir with spaces"
Please Log in to join the conversation.
- Kidkasual1
- Topic Author
- Offline
- Senior Member
-
- Posts: 43
- Thank you received: 0
So, I can navigate to the new file in the modprobe/d. directory and can open and view the new file that was just added, and the information appears to be correct according to the directions in that other string pointed to by Mr. Beagle. I then changed my parallel port back to "0" as suggested in the other string, and tried to start the Axis GUI. I was given the white debug screen saying that parallel port 0 can not be found, so I went back into the Stepconf Wizard and changed the port address back to e010 and again tried starting the Axis GUI. The GUI opened, but I got the apparently incorrect and spurious "Linux parallel port @57360 cannot be found" error message again. I changed the address to 0xe010 in the Stepconf Wizard, but still got the same erroneous error message in the GUI screen. From reading the comments in this post where others were able to X out of that error and then control their machine, I figured I would give it a go. When I X out of the error and try to jog my machine, I have still have no control and no motion. The steppers are powered on and are locked up, but I have no control over them, just like before.
And it's funny that you have a folder and file name foo and bar, Mr. Beagle. I have one of those too, expect my folder is called FU and my file BAR. It's where I am keeping all of my everything from this troubleshoot....... Tongue-in-cheek wink wink...
Please Log in to join the conversation.
- BeagleBrainz
- New Member
-
- Thank you received: 0
Beware this is a long post and worth scrolling thru, even the sections that have their own little scroll windows.
Let's start with the basics of what I have found in my research of Parallel Ports and Linux in general. Unfortunately I can't seem to find my cache of parallel port cards.
For this explanation a kernel module in Linux jargon is equivalent to a driver in Windows jargon.
To use a parallel port in Linux there are 3 modules at play.
1. parport - this provides the basic functions
2. parport_pc - this provides additional function for the parallel port on a PC platform
3. ppdev - a simple description is that it creates the device file under dev.
For a supported parallel port, a supported parallel port is one that has a PCI ID that matches those that parport_pc knows about. Examples of these are ports built into the motherboard.
The first module that is loaded by udev (this is responsible for loading kernel modules for add in cards and usb devices) is parport_pc, during the loading of this module parport is loaded as well as parport_pc depends on code in parport. This is common that one kernel module requires the code of another.
Upon recognising a PP card udev will load parport_pc as well as parport.
parport_pc will then try to find info relating to the card.
Now one thing I have found strange on one machine ppdev will load after parport_pc and on another it needs loading manually.
Anyways I'm loading parport_pc for a card that doesn't exist on my system and whose address is not actually connected to another piece of harware.
Please scroll thru this and the others.
As you can see before loading the kernel modules I did not have an entry in /dev for a parallel port, afterwards I do. The presence of this entry is required by hal_parport.
Starting Linuxcnc with PP 0x378 (which doesn't exist) (Ignore the latency messages)
Changing the address to 0xe100 (The fake parallel port)
Changing to cfg="0" (The fake parallel port)
Removing the kernel module parport_pc results in no entry under /dev
Trying again with cfg="0xe100"
Note that once /dev/parport0 does not exist there are issues. As this is used by hal_parport to retrieve information regarding the parallel port and, crucially to claim exclusive use of that port. This would stop some thinking there was a printer or other device connected and trying to print, which would cause all sorts of issues.
Now, any entries in /etc/modprobe.d/ will not take affect until you reboot.
But we can emulate this behaviour by not having an entry in /etc/modprobe.d/ and loading the modules are selves.
Loading parport_pc requires usually 2 arguments the address and the irq (tho you can get away without the irq argument).
Now before we discuss how to implement this I want you to be sure of what I have explained and if not, ask any questions you may have.
After that we will attempt to load the modules via the command line and try the parallel port tester. Yes I know you have had the parallel port tester work and then Linuxcnc not, which is strange as running a linuxcnc config and the parallel port tester both use hal_parport.
Just for completeness would you be bale to post your current (as of today .ini & .hal files) ?
Please Log in to join the conversation.
