Please help, I need some addvise
- allenwg2005
-
Topic Author
- Offline
- Elite Member
-
- Posts: 310
- Thank you received: 4
I've been reading some of the tutorials/links that have been sent and I have not been able to access the information we are after as yet, the following seemed like a good example of what I get, so let me know what I'm doing wrong and I'll try again.
I typed in halrun and got the halcmd prompt. From that I typed:
halcmd: loadrt hal_parport cfg=”<config-string>”
insmod: error inserting '/user/realtime-2.6.24-16-rti/modules/Linux/hal_parport.ko': -1Device or resource busy
<stdin>:1: exit value: 1
<stdin>:1: insmod failed, returned-1
See the output of 'dmesg' for more information
I've tried different things and got “bash:” complaints or just a “ >” with a flashing cursor.
What am I doing wrong?
Thanks
Please Log in or Create an account to join the conversation.
- allenwg2005
-
Topic Author
- Offline
- Elite Member
-
- Posts: 310
- Thank you received: 4
"Also you have to remember to rename the file ptestx.txt to ptestx.xml. (It had to be renamed because the forum wouldn't let me upoad an xml)"
Where are the ptestx files?
What directory should they be copied to?
Renaming should be straight forward, (I hope).
"You also need to remember that LinuxCNC requires a kernal modified for real time to run properly. If you are using something else you had before it won't work."
I have not had this machine running on this PC, the only program on the new PC is Linuxcnc 8.04.
Do I have to concern myself with the kernal/realtime issue in this case?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
- Posts: 4987
- Thank you received: 1455
loadrt hal_parport cfg="0x378 X"
Then open a terminal and go to the directory that contains these two files and type the command "halrun -I -f ptestx.hal" then press enter then a small screen like the one I posted a picture of earlier in the thread should pop open. If you have the port plugged into your machine and you toggle one of one of the limits connected to that port, you should see one of the red or green circles change color. If nothing happens then the port isn't compatible with x-mode or you did something wrong (like put in the wrong port address.
I am not sure what else you might be doing wrong, but I still consider myself a novice. Maybe someone else with more experience coaching newbies can help.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Away
- Moderator
-
- Posts: 23315
- Thank you received: 4944
Is that _exactly_ what you typed, or did you replace the <config-string> text with an actual config string?I typed in halrun and got the halcmd prompt. From that I typed:
halcmd: loadrt hal_parport cfg=”<config-string>”
This may be a result of not specifying an actual config string, or it may actually be true that the parallel port has been grabbed by another process.insmod: error inserting '/user/realtime-2.6.24-16-rti/modules/Linux/hal_parport.ko': -1Device or resource busy
At the command-line if you type
lsmod
you will get a list of loaded modules. I think you want to _not_ see the "lp" module there. If it is, then I think you can unload it with
modprobe lp
Though that might fail if something else thinks it is using "lp". ("lp" is the line-printer module)
Please Log in or Create an account to join the conversation.
- allenwg2005
-
Topic Author
- Offline
- Elite Member
-
- Posts: 310
- Thank you received: 4
I see what you mean now, I'll try this as soon as I have some time. (Perhaps later today).
Andy, I be-leave that was the way I typed it.
All of this has become a blur, I can't say exactly what I did or were I got the idea to try it to be completely honest.
This is what I'm doing in light of the situation I find myself in.
I have purchased a book on Unix and Linux. (I'm reading it now).
I think my lack of knowledge about the file hierarchy, nomenclature, and basic OS functions is causing the bulk of the problems here.
More important than getting help from you folks is the responsibility to help myself!
There is a difference between asking for help with directions and expecting someone to pick you up and carry you were you need to go. It's my responsibility to do the walking!
As I read through this book I am working my way through the HAL Manual and getting good results.
I will post the results of this ongoing adventure here as soon as I have more questions, or I get the machine to work properly.
(My money is on more questions, but you never know I might get it working, we'll see).
Thanks, Allen
Please Log in or Create an account to join the conversation.
- arvidb
-
- Offline
- Platinum Member
-
- Posts: 512
- Thank you received: 158
That command would load the lp module. To unload do... you will get a list of loaded modules. I think you want to _not_ see the "lp" module there. If it is, then I think you can unload it with
modprobe lp
Though that might fail if something else thinks it is using "lp". ("lp" is the line-printer module)
# modprobe -r lp
Please Log in or Create an account to join the conversation.
- allenwg2005
-
Topic Author
- Offline
- Elite Member
-
- Posts: 310
- Thank you received: 4
Can anyone tell me if there is a command line to locate a parallel port address?
I have three PCI I/O boards loaded on the PC and I need to locate addresses for them.
I have tried "dmesglgrep parport" and got [command not found]. (Ran it from a prompt at boot up).
I tried "/proc/ioports" and got [permission denied], (I'm sure I have missed part of the command on this one).
What little brains I have are cooked going through the HAL Manual, it's been a trip.
It will take a while for all of it to sink in.
Any further advise going forward is appreciated.
Thanx
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
You need to be precise about terminal commands, spacing and spelling
I have tried "dmesglgrep parport" and got [command not found].
The line should be dmesg | grep parport - but even that will not work
Since dmesg is not in the PATH env string, the system has no idea where to look for it.
Also it is a log file, not an executable, so invoking its name does nothing.
An easy way to view the contents of a file to stdout (the screen) is cat
The command cat /var/log/dmesg | grep parport
will output the contents of that file through a pipe (that is what the bar | is) to grep which will search for the string 'parport'
Likewise /proc/ioports is a location of a psuedo file not a command
cat /proc/ioports will get what you wanted
regards
Please Log in or Create an account to join the conversation.
- bjames28
- Offline
- Senior Member
-
- Posts: 77
- Thank you received: 0
Hi
The line should be dmesg | grep parport - but even that will not work
Since dmesg is not in the PATH env string, the system has no idea where to look for it.
Also it is a log file, not an executable, so invoking its name does nothing.
regards
Hi,
I think
dmesg | grep parport
should work, because dmesg is a command existing in most Linux distributions.
Or did I misunderstand something?
Best regards:
James
Please Log in or Create an account to join the conversation.
- andypugh
-
- Away
- Moderator
-
- Posts: 23315
- Thank you received: 4944
I think dmesg is an executable, one that prints the contents of /var/log/kern.logAlso it is a log file, not an executable, so invoking its name does nothing.
Maybe cat /var/log/kern.log | grep parportThe command cat /var/log/dmesg | grep parport
But I tend to prefer cat /proc/ioport or lspci for finding the parport address.
_none_ of these should be necessary, you can just use 0 for the first parport, 1 for the second parport, etc.
Please Log in or Create an account to join the conversation.