Re: [Emc-users] hal_input question

2017-01-15 Thread Kirk Wallace
On 01/15/2017 10:55 AM, Ken Strauss wrote:
> A little success!
> I substituted an X-box joystick for my test mouse. hal_input now works  as
> expected and show pins displays switch status on the joystick unit. I didn't
> have to use a udev rules.d file; things just worked. I conclude that either
> a mouse doesn't work with hal-input or I have a mistake in my rules file.
>
> Thanks for the help. I'm certain that I'll be back with more questions.

PathPilot is made to cater to customers that may have CNC skills but no 
computer skills. I suspect there are things going on in the background 
that try to make using the Tormach accessories just work.


-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-15 Thread Ken Strauss
A little success!
I substituted an X-box joystick for my test mouse. hal_input now works  as
expected and show pins displays switch status on the joystick unit. I didn't
have to use a udev rules.d file; things just worked. I conclude that either
a mouse doesn't work with hal-input or I have a mistake in my rules file.

Thanks for the help. I'm certain that I'll be back with more questions.

> -Original Message-
> From: Kirk Wallace [mailto:kwall...@wallacecompany.com]
> Sent: Sunday, January 15, 2017 11:45 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] hal_input question
>
> On 01/14/2017 08:00 PM, Ken Strauss wrote:
> > I successfully downloaded and installed hal_input and linux_event.py
> > At least the loadusr hal_input line appears to be accepted without
> > saying that a file is missing.  Thanks Kirk!
> >
> > My homebrew USB device identifies itself as a mouse with three buttons.
> > Thinking that I might have an error in my USB device code I
> > substituted a real mouse my homebrew one. For this real mouse
> > /proc/bus/input/devices
> > gives:
> >  I: Bus=0003 Vendor=1a2c Product=0042 Version=0110
> >  N: Name="SEMICCHIP Usb Mouse"
> >  P: Phys=usb-:02:00.0-3/input0
> >  S:
> > Sysfs=/devices/pci:00/:00:1c.1/:02:00.0/usb3/3-3/3-3:1.0/i
> > nput/i
> > nput5
> >  U: Uniq=
> >  H: Handlers=mouse2 event5
> >  B: EV=17
> >  B: KEY=1f 0 0 0 0 0 0 0 0
> >  B: REL=103
> >  B: MSC=10
> >
> > I added an entry in etc/udev/rules.d
> > SUBSYSTEM=="hidraw'. ATTRS{idVendor}=="1a2c",
> > ATTRS[idProduct}=="0042", MODE="0666"
> >
> > My hal line is:
> >  loadusr -W hal_input -KRAL "vendor=1a2c Product=0042"
> >
> > Now when I process the loadusr line I get:
> >
> > No input devices could be opened.  This usually indicates a
> > misconfigured
> > system.  Please read the section 'PERMISSIONS AND UDEV' in the
hal_input
> > manpage
> > tormach_mill_sim.hal:11: hal_input exited without becoming ready
> > Shutting down and cleaning up LinuxCNC...
> >
> > What have I missed? Can hal_input connect to a mouse that the system
> > knows about? If not, what sort of HID device should I emulate?
>
> ... snip
>
> I haven't done any work on USB devices, so I can't help much.
>
> Some devices such as USB may only be accessed by authorized users or root.
> The udev bit tries set up special permission to allow your normal user
status to
> access a privileged device. I seem to recall that usb or/and serial
devices are
> usually assigned to a group then your user name needs to be added to this
> group and udev is part of the process (?). PathPilot tweaks LinuxCNC to
get
> their supported products to work.
> This may sacrifice other generic features. You might try to use generic
> LinuxCNC and choose a configuration that is known to work with your device
> or is close. When you get this to work transfer this knowledge to PP. If I
had
> the same problem I would tend to use this approach and allocate a day or
> three to the cause.
>
> (.. or not)
>
>
> --
> Kirk Wallace
> http://www.wallacecompany.com/machine_shop/
> http://www.wallacecompany.com/E45/
>
>

--
> Developer Access Program for Intel Xeon Phi Processors Access to Intel
Xeon
> Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-15 Thread Kirk Wallace
On 01/14/2017 08:00 PM, Ken Strauss wrote:
> I successfully downloaded and installed hal_input and linux_event.py  At
> least the loadusr hal_input line appears to be accepted without saying that
> a file is missing.  Thanks Kirk!
>
> My homebrew USB device identifies itself as a mouse with three buttons.
> Thinking that I might have an error in my USB device code I substituted a
> real mouse my homebrew one. For this real mouse /proc/bus/input/devices
> gives:
>  I: Bus=0003 Vendor=1a2c Product=0042 Version=0110
>  N: Name="SEMICCHIP Usb Mouse"
>  P: Phys=usb-:02:00.0-3/input0
>  S:
> Sysfs=/devices/pci:00/:00:1c.1/:02:00.0/usb3/3-3/3-3:1.0/input/i
> nput5
>  U: Uniq=
>  H: Handlers=mouse2 event5
>  B: EV=17
>  B: KEY=1f 0 0 0 0 0 0 0 0
>  B: REL=103
>  B: MSC=10
>
> I added an entry in etc/udev/rules.d
> SUBSYSTEM=="hidraw'. ATTRS{idVendor}=="1a2c", ATTRS[idProduct}=="0042",
> MODE="0666"
>
> My hal line is:
>  loadusr -W hal_input -KRAL "vendor=1a2c Product=0042"
>
> Now when I process the loadusr line I get:
>
> No input devices could be opened.  This usually indicates a
> misconfigured
> system.  Please read the section 'PERMISSIONS AND UDEV' in the hal_input
> manpage
> tormach_mill_sim.hal:11: hal_input exited without becoming ready
> Shutting down and cleaning up LinuxCNC...
>
> What have I missed? Can hal_input connect to a mouse that the system knows
> about? If not, what sort of HID device should I emulate?

... snip

I haven't done any work on USB devices, so I can't help much.

Some devices such as USB may only be accessed by authorized users or 
root. The udev bit tries set up special permission to allow your normal 
user status to access a privileged device. I seem to recall that usb 
or/and serial devices are usually assigned to a group then your user 
name needs to be added to this group and udev is part of the process 
(?). PathPilot tweaks LinuxCNC to get their supported products to work. 
This may sacrifice other generic features. You might try to use generic 
LinuxCNC and choose a configuration that is known to work with your 
device or is close. When you get this to work transfer this knowledge to 
PP. If I had the same problem I would tend to use this approach and 
allocate a day or three to the cause.

(.. or not)


-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-14 Thread Ken Strauss
I successfully downloaded and installed hal_input and linux_event.py  At
least the loadusr hal_input line appears to be accepted without saying that
a file is missing.  Thanks Kirk!

My homebrew USB device identifies itself as a mouse with three buttons.
Thinking that I might have an error in my USB device code I substituted a
real mouse my homebrew one. For this real mouse /proc/bus/input/devices
gives:
 I: Bus=0003 Vendor=1a2c Product=0042 Version=0110
 N: Name="SEMICCHIP Usb Mouse"
 P: Phys=usb-:02:00.0-3/input0
 S:
Sysfs=/devices/pci:00/:00:1c.1/:02:00.0/usb3/3-3/3-3:1.0/input/i
nput5
 U: Uniq=
 H: Handlers=mouse2 event5
 B: EV=17
 B: KEY=1f 0 0 0 0 0 0 0 0
 B: REL=103
 B: MSC=10

I added an entry in etc/udev/rules.d
SUBSYSTEM=="hidraw'. ATTRS{idVendor}=="1a2c", ATTRS[idProduct}=="0042",
MODE="0666"

My hal line is:
 loadusr -W hal_input -KRAL "vendor=1a2c Product=0042"

Now when I process the loadusr line I get:

No input devices could be opened.  This usually indicates a
misconfigured
system.  Please read the section 'PERMISSIONS AND UDEV' in the hal_input
manpage
tormach_mill_sim.hal:11: hal_input exited without becoming ready
Shutting down and cleaning up LinuxCNC...

What have I missed? Can hal_input connect to a mouse that the system knows
about? If not, what sort of HID device should I emulate?

> -Original Message-
> From: Kirk Wallace [mailto:kwall...@wallacecompany.com]
> Sent: Saturday, January 14, 2017 3:54 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] hal_input question
>
> On 01/14/2017 11:58 AM, Ken Strauss wrote:
> > Thanks for the suggestion. I had looked at hidcomp but was hoping to
> > use hal_input since it seems more standard, is simpler and, hopefully,
> > better tested. Failing other ideas I'll give hidcomp a try.
>
> It looks like PP doesn't have hal_input, but this link seems to add it:
> https://en.industryarena.com/forum/vista-cnc-pendant-pp--274252-3.html
>
>
> --
> Kirk Wallace
> http://www.wallacecompany.com/machine_shop/
> http://www.wallacecompany.com/E45/
>
>

--
> Developer Access Program for Intel Xeon Phi Processors Access to Intel
Xeon
> Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-14 Thread Ken Strauss
That gets me further. Hal_input now complains that it cannot access the
device. I guess I now need to figure out the appropriate udev command.

Thanks for the link!

> -Original Message-
> From: Kirk Wallace [mailto:kwall...@wallacecompany.com]
> Sent: Saturday, January 14, 2017 3:54 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] hal_input question
>
> On 01/14/2017 11:58 AM, Ken Strauss wrote:
> > Thanks for the suggestion. I had looked at hidcomp but was hoping to
> > use hal_input since it seems more standard, is simpler and, hopefully,
> > better tested. Failing other ideas I'll give hidcomp a try.
>
> It looks like PP doesn't have hal_input, but this link seems to add it:
> https://en.industryarena.com/forum/vista-cnc-pendant-pp--274252-3.html
>
>
> --
> Kirk Wallace
> http://www.wallacecompany.com/machine_shop/
> http://www.wallacecompany.com/E45/
>
>

--
> Developer Access Program for Intel Xeon Phi Processors Access to Intel
Xeon
> Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-14 Thread Kirk Wallace
On 01/14/2017 11:58 AM, Ken Strauss wrote:
> Thanks for the suggestion. I had looked at hidcomp but was hoping to use
> hal_input since it seems more standard, is simpler and, hopefully, better
> tested. Failing other ideas I'll give hidcomp a try.

It looks like PP doesn't have hal_input, but this link seems to add it:
https://en.industryarena.com/forum/vista-cnc-pendant-pp--274252-3.html


-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-14 Thread Kirk Wallace
On 01/14/2017 11:36 AM, Ken Strauss wrote:
> A little intro:
> I have computer experience with Windows (API programming) and assembler on
> several micros. However I am **very** new to Linux so please excuse my
> stupid newb questions.
>
> I am trying to use a homebrew USB device with LinuxCNC/PathPilot. My device
> appears to the system as a HID and I can see its VID, PID, Name, etc using
> less /proc/bus/input/devices
>
> Reading the man page
> (http://linuxcnc.org/docs/html/man/man1/hal_input.1.html) the hal_input
> component looks like it will do what I need. When I add "loadusr -W
> hal_input..." to the config file it complains that it can't find hal_input.
> Where do I get the hal_input component?

Shooting from the hip, the -W option with loadusr can be tricky to use 
properly. You might want to make sure you are using it properly. Also, 
HAL might change your - to/from _ depending on the context.


-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-14 Thread Ken Strauss
Thanks for the suggestion. I had looked at hidcomp but was hoping to use
hal_input since it seems more standard, is simpler and, hopefully, better
tested. Failing other ideas I'll give hidcomp a try.

> -Original Message-
> From: Andrew [mailto:pkm...@gmail.com]
> Sent: Saturday, January 14, 2017 2:45 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] hal_input question
>
> 2017-01-14 21:36 GMT+02:00 Ken Strauss <ken.stra...@sympatico.ca>:
>
> >
> > I am trying to use a homebrew USB device with LinuxCNC/PathPilot. My
> > device appears to the system as a HID and I can see its VID, PID,
> > Name, etc using less /proc/bus/input/devices
> >
> > Try http://hidcomp.sourceforge.net/
> I haven't used it but AFAIK it does exactly what you need.
>
> Andrew
>

--
> Developer Access Program for Intel Xeon Phi Processors Access to Intel
Xeon
> Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hal_input question

2017-01-14 Thread Andrew
2017-01-14 21:36 GMT+02:00 Ken Strauss :

>
> I am trying to use a homebrew USB device with LinuxCNC/PathPilot. My device
> appears to the system as a HID and I can see its VID, PID, Name, etc using
> less /proc/bus/input/devices
>
> Try http://hidcomp.sourceforge.net/
I haven't used it but AFAIK it does exactly what you need.

Andrew
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] hal_input question

2017-01-14 Thread Ken Strauss
A little intro:
I have computer experience with Windows (API programming) and assembler on
several micros. However I am **very** new to Linux so please excuse my
stupid newb questions.

I am trying to use a homebrew USB device with LinuxCNC/PathPilot. My device
appears to the system as a HID and I can see its VID, PID, Name, etc using
less /proc/bus/input/devices

Reading the man page
(http://linuxcnc.org/docs/html/man/man1/hal_input.1.html) the hal_input
component looks like it will do what I need. When I add "loadusr -W
hal_input..." to the config file it complains that it can't find hal_input.
Where do I get the hal_input component?

This is a Tormach supplied Unbuntu 10.04 system so perhaps the component
comes with a standard distro. If so how do I get the single file?



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users