Gampad in EMC2 Question (SOLVED)

More
13 Dec 2011 19:18 #15641 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
andypugh wrote:

cwebs wrote:

How do I copy and paste the error info? I am unable to copy the message. Carl


Select and Ctl-C?

What is the output of
less /proc/bus/input/devices
(the very first step of the process)

I: Bus=0017 Vendor=0001 Product=0001 Version=0100
N: Name="Macintosh mouse button emulation"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=120013
B: KEY=4 2000000 3803078 f800d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=413c Product=3010 Version=0100
N: Name="HID 413c:3010"
P: Phys=usb-0000:00:10.0-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0/input/input2
U: Uniq=
H: Handlers=mouse1 event2
B: EV=17
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103
B: MSC=10

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/devices/platform/pcspkr/input/input3
U: Uniq=
H: Handlers=kbd event3
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=0079 Product=0006 Version=0110
N: Name="DragonRise Inc. Generic USB Joystick "
P: Phys=usb-0000:00:10.2-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:10.2/usb3/3-1/3-1:1.0/input/input4
U: Uniq=
H: Handlers=event4 js0
B: EV=1b
B: KEY=fff 0 0 0 0 0 0 0 0 0
B: ABS=3002f
:

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

More
13 Dec 2011 19:28 #15643 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
This is the error I get

Print file information:
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/share/emc/tcl
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/usr/realtime-2.6.24-16-rtai/modules/emc2
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=/usr/bin/wish8.4
EMC2 - 2.4.6
Machine configuration directory is '/home/carl/emc2/configs/Carl's_CNC'
Machine configuration file is 'Carl's_CNC.ini'
INIFILE=/home/carl/emc2/configs/Carl's_CNC/Carl's_CNC.ini
PARAMETER_FILE=emc.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=halui
DISPLAY=axis
NML_FILE=
Starting EMC2...
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting EMC2 IO program: io
Starting HAL User Interface program: halui
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=5800
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
No input devices could be opened. This usually indicates a misconfigured
system. Please read the section 'PERMISSIONS AND UDEV' in the hal_input
manpage
Carl's_CNC.hal:97: hal_input exited without becoming ready
5800
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 2316.337910] I-pipe: Domain RTAI registered.
[ 2316.337923] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 2316.337926] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 2316.337931] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2316.337934] PIPELINE layers:
[ 2316.337936] dcca4000 9ac15d93 RTAI 200
[ 2316.337938] c0383180 0 Linux 100
[ 2316.352023] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2316.352533] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2316.352538] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 2316.352542] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 2165046000 hz.
[ 2316.352545] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 2316.432566] RTAI[math]: loaded.
[ 2316.564234] config string '0x378 out '
[ 2317.376295] RTAI[math]: unloaded.
[ 2317.437365] SCHED releases registered named ALIEN RTGLBH
[ 2317.451441] RTAI[malloc]: unloaded.
[ 2317.550675] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2317.553674] I-pipe: Domain RTAI unregistered.
[ 2317.553683] RTAI[hal]: unmounted.

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

More
13 Dec 2011 21:01 #15645 by andypugh
Replied by andypugh on topic Re:Gampad in EMC2 Question
cwebs wrote:

N: Name="Macintosh mouse button emulation"

This isn't it.

I: Bus=0003 Vendor=0079 Product=0006 Version=0110
N: Name="DragonRise Inc. Generic USB Joystick "

This is it. Try
loadusr -W hal_input -KRAL DragonRise

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

More
13 Dec 2011 21:06 #15646 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
andypugh wrote:

cwebs wrote:

N: Name="Macintosh mouse button emulation"

This isn't it.

I: Bus=0003 Vendor=0079 Product=0006 Version=0110
N: Name="DragonRise Inc. Generic USB Joystick "

This is it. Try
loadusr -W hal_input -KRAL DragonRise

Sorry but after that post thinking Macintosh was it I went back and see I was wrong. I did try DragonRise with the same problem. I also tried Joystick from that "name". Carl.

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

More
13 Dec 2011 21:52 #15649 by andypugh
Replied by andypugh on topic Re:Gampad in EMC2 Question
cwebs wrote:

I did try DragonRise with the same problem. I also tried Joystick from that "name". Carl.

The error message suggests it might be a problem with the udev and permissions, did they all happen as described?

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

More
13 Dec 2011 21:59 #15650 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
andypugh wrote:

cwebs wrote:

I did try DragonRise with the same problem. I also tried Joystick from that "name". Carl.

The error message suggests it might be a problem with the udev and permissions, did they all happen as described?

To the best of my knowlage, yes. I am compleatly lost with the coding and have been reading the HAL manual. I am getting low on hair. Been pulling it out over this. Not enought for a comb over now. Carl

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

More
13 Dec 2011 22:51 #15651 by cwebs
Replied by cwebs on topic Re:Gampad in EMC2 Question
3. Step 3 Add the hal_input
In your .hal file (the main one) add the following

# for remote joypad
loadusr -W hal_input -KRAL Dual


In your .ini file in the [HAL] section add the following line if you don't have it
HALUI = halui

The instruction for step 3 says "In your .hal file (the main one). Where is the "main one"? I see on another post that it goes in the .ini . Carl

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

More
13 Dec 2011 23:13 #15652 by andypugh
Replied by andypugh on topic Re:Gampad in EMC2 Question
cwebs wrote:

The instruction for step 3 says "In your .hal file (the main one). Where is the "main one"?

Actually, I think it can go in any of the HAL files. But how many do you have? (referenced in the INI file, in the folder in <home>emc2/configs/<the name of your machine>

I see on another post that it goes in the .ini

No, you just need to check that HALUI = halui appears in the [HAL] section of your INI file.

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

More
14 Dec 2011 01:41 #15654 by cmorley
Replied by cmorley on topic Re:Gampad in EMC2 Question
You could use PNCconf to help you make and test the rule for joysticks.
At least then you would know if it works or not.

Its pretty easy to try even if it doesn't work.
on the external controls page select 'USB joystick jogging'
then select 'details'
select add rule - follow the prompts - you need your joystick
after your done you can select 'test device'
it will load the device with HAL_INPUT and start a halmeter so you can test the joystick

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

More
14 Dec 2011 10:54 #15671 by Rick G
Replied by Rick G on topic Re:Gampad in EMC2 Question
Did you have to add this?

If your system won't recognize the joypad you might have to look at hal_input man page and perhaps modify the permissions to access the device. Prepared a one line file as per the description in the man page.


SUBSYSTEM=="input", mode="0660", group="plugdev"

Name the file 51-plugdev.rules and save it in /etc/udev/rules.d


From the bottom of...

wiki.linuxcnc.org/emcinfo.pl?Simple_Remote_Pendant


Chris,

That is a neat idea, I will have to try that.

Rick G

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

Time to create page: 0.237 seconds
Powered by Kunena Forum