Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread Sebastian Kuzminsky
On 10/05/2011 10:39 PM, Przemek Klosowski wrote:
> On Wed, Oct 5, 2011 at 6:45 PM, Sebastian Kuzminsky  wrote:
>
>>> Unexpected event EV_ABS ABS_48
>>> Unexpected event EV_ABS ABS_49
> That's because the EMC HID driver hal_input doesn't handle all data
> from your USB device.
>
> The regular kernel HID driver defines the EV_ABS events with codes
> (ABS_xxx) up to 63 (0x3f), but hal_input only handles what is defined
> in lib/python/linux_event.py, where the highest event is ABS_MISC
> (0x28 or decimal 40), and throws an error when your USB device sends
> ABS_MT_TOUCH_MAJOR (code 0x30 or decimal 48) and higher.
>
> The Linux kernel driver uses codes defined in
> /usr/include/linux/input.h, so linux_event.py should be modified to
> match it; I enclose a patch that Sebastian can apply directly. I don't
> have the check-in privileges in the EMC2 git repo, so perhaps the
> original author of linux_event.py (Jeff Epler) or someone else could
> apply it there.

Thank you Przemek!

Wow, that's a lot of happy trigger buttons!

I applied it, but reordered BTN_TOOL_QUADTAP to be in sequential order 
with the rest of the BTNs.

My USB jogpad works fine after the patch (it also worked fine before the 
patch).

John, if you pull the 2.4 branch now you should get Przemek's fix.  Or 
if you wait 30 minutes and install the buildbot debs.

I'll try to merge this into the 2.5 branch and master tonight.


Oh yeah, one more thing: the evtest program is super handy for debugging 
these kinds of devices.


-- 
Sebastian Kuzminsky


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread Przemek Klosowski
On Wed, Oct 5, 2011 at 6:45 PM, Sebastian Kuzminsky  wrote:

>> Unexpected event EV_ABS ABS_48
>> Unexpected event EV_ABS ABS_49

That's because the EMC HID driver hal_input doesn't handle all data
from your USB device.

The regular kernel HID driver defines the EV_ABS events with codes
(ABS_xxx) up to 63 (0x3f), but hal_input only handles what is defined
in lib/python/linux_event.py, where the highest event is ABS_MISC
(0x28 or decimal 40), and throws an error when your USB device sends
ABS_MT_TOUCH_MAJOR (code 0x30 or decimal 48) and higher.

The Linux kernel driver uses codes defined in
/usr/include/linux/input.h, so linux_event.py should be modified to
match it; I enclose a patch that Sebastian can apply directly. I don't
have the check-in privileges in the EMC2 git repo, so perhaps the
original author of linux_event.py (Jeff Epler) or someone else could
apply it there.


emc-linux_event.py-patch
Description: Binary data
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread John A. Stewart
Hi Sebastian;

Thanks for the reply, and the ideas. I'm new to EMC, so there is a lot  
to figure out still.

> What device is this, exactly?

lsinput:

/dev/input/event3
bustype : BUS_USB
vendor  : 0x54c
product : 0x268
version : 273
name: "GASIA CORP. PLAYSTATION(R)3 Cont"
phys: "usb-:00:1d.2-2/input0"
uniq: ""
bits ev : EV_SYN EV_KEY EV_ABS EV_MSC

Here is the URL for the product:
http://www.futureshop.ca/en-CA/product/intec-inc-intec-2-pack-wired-controller-playstation-3-g7884/10156935.aspx?path=c2baa19281ba991ddb5a5d020e17ab9ben02

(if that does not work, it is the Intec 2 pack wired controller,   
WebID:  10156935)

> Does the device seem to be working (you can look at its pins with  
> halmeter or 'halcmd show')?

Yes, the halmeter did work for at least one button input - I'm still  
figuring out how best to run these programs so I know what to look for.

I have modified the "hal_input" program to just not print out the  
error message; but, if I have this issue, I wonder how many others  
might, too?

I'll report back on progress; maybe it will help others. Also, any  
debugging you (or anyone else) wants me to do, just ask.

Thanks;

JohnS.



--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Joypad pendant, hal_input errors

2011-10-05 Thread Sebastian Kuzminsky
On Oct 5, 2011, at 16:18 , John A. Stewart wrote:

> Hi all;
> 
> After reading some of the messages on this list, I went out and  
> purchased a wired joypad; it is giving me the following messages when  
> I run:
> 
> halcmd
> loadusr hal_input -KRAL GASIA
> 
> Unexpected event EV_ABS ABS_48
> Unexpected event EV_ABS ABS_49
> Unexpected event EV_ABS ABS_50
> Unexpected event EV_ABS ABS_51
> Unexpected event EV_ABS ABS_52
> Unexpected event EV_ABS ABS_53
> Unexpected event EV_ABS ABS_54
> Unexpected event EV_ABS ABS_55
> Unexpected event EV_ABS ABS_56
> Unexpected event EV_ABS ABS_57
> Unexpected event EV_ABS ABS_58
> 
> Any idea what's happening here?


What device is this, exactly?

My first guess is that the device reports fewer ABS components than it actually 
has, and hal_input is rejecting events from the extra ones.  Does the device 
seem to be working (you can look at its pins with halmeter or 'halcmd show')?

What do you see if you install the input-utils package and inspect the device 
with lsinput and input-events?  Maybe also try the evtest program, from the 
package by the same name.


-- 
Sebastian Kuzminsky


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users