LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-19-2010, 12:46 PM   #1
brubizu
LQ Newbie
 
Registered: Jun 2010
Posts: 11

Rep: Reputation: 0
Can't properly configure lirc, hexdump shows other bits changing


Hi... recently I'm working with one of these... LM-PC001

it works via /dev/input/event4, so I'm using devinput driver for lirc, the thing is, it works flawlessy when lirc is not running, (via linux-input-layer) but I do need to make it work with lirc...

I can make work almost everything using this lircd.conf (incomplete here)

Code:
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.6(devinput) on Fri Jul 16 12:20:55 2010
#
# contributed by 
#
# brand:                       lm.conf
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote

  name  lm.conf
  bits           32
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  gap          47988
  toggle_bit_mask 0x0

      begin codes
          BTN_6                    0x00020000  #
          BTN_4                    0x00020000  #  Using BTN_2,4,6 and 8 for mouse directions...
          BTN_8                    0x00020001  #
          BTN_2                    0x00020001  #
	  KEY_1			   0x00010002
	  KEY_2			   0x00010003
	  KEY_3			   0x00010004
	  KEY_4			   0x00010005
	  KEY_5			   0x00010006
	  KEY_6			   0x00010007
	  KEY_7			   0x00010008
	  KEY_8			   0x00010009
	  KEY_9			   0x0001000A
          KEY_STOPCD               0x000100A6
      end codes

end remote
the problem is with the mouse (the blue circle in the center of the remote)

that's what I got from hexdump /dev/input/event4

Code:
                           | keycode |
0000060 8cbf 4c44 c4f0 0004 0004 0004 001f 0007
0000070 8cbf 4c44 c50e 0004 0001 0003 0001 0000
0000080 8cbf 4c44 c516 0004 0000 0000 0000 0000
0000090 8cbf 4c44 90d5 0008 0001 0003 0002 0000
00000a0 8cbf 4c44 90ed 0008 0000 0000 0001 0000
The first line is some kind of header, that appears when i press the button but not when i repeat the command (hold the button pressed)


in the second line (repeated on fourth) i can see the keycode itself 0x10003, the code for KEY_2

so far so good, the problem is with the mouse buttons... here is the hexdump for +X and -X

Code:
                           | keycode |
0000280 8dc1 4c44 82b5 0008 0002 0000 0007 0000  \
0000290 8dc1 4c44 82d2 0008 0000 0000 0000 0000   \ +X
00002a0 8dc2 4c44 b43e 0005 0002 0001 0001 0000   /
00002b0 8dc2 4c44 b45b 0005 0000 0000 0000 0000  /
00002c0 8dc2 4c44 6fbd 0006 0002 0000 fff9 ffff  \
00002d0 8dc2 4c44 6fdc 0006 0000 0000 0000 0000   \ -X
00002e0 8dc2 4c44 4a81 0007 0002 0000 fff9 ffff   /
00002f0 8dc2 4c44 4a9b 0007 0002 0001 0007 0000  /
First thing, it doesn't show the header (not a problem really)
but as you can see the bits that differ the direction on the axis is the latter ones, and lirc is not taking them into account so both buttons result in the same direction...

Is there a way that i can make lirc take them into account?

also irrecord doesn't work because of the "0x40004" header, all comands, are detected as "0x400004"...

and since it uses devinput driver, mode2 says "This program doesn't work for this hardware yet."

Last edited by brubizu; 07-19-2010 at 12:50 PM.
 
Old 07-19-2010, 12:48 PM   #2
brubizu
LQ Newbie
 
Registered: Jun 2010
Posts: 11

Original Poster
Rep: Reputation: 0
was explaining an error in the previous post here, but I've corrected there...

Last edited by brubizu; 07-19-2010 at 12:51 PM.
 
Old 07-20-2010, 05:36 AM   #3
brubizu
LQ Newbie
 
Registered: Jun 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Hi, managed to make it work, built from cvs, and used the latest devinput lircd.conf, now it works when manually starting "lircd -u -H devinput -d /dev/input/event4 " does anyone knows how to pass the --uinput ( -u ) argument to the init script? i tried putting "--uinput", "uinput" and "-u" on the REMOTE_LIRCD_ARGS field on hardware.conf but that didn't seem to work....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] is there another way to configure a remote control without using lirc ? Tux Rules Linux - Software 2 06-29-2010 10:09 AM
VFAT Partition Not Working Properly (shows as plugdev) the_new_z Linux - Newbie 8 06-08-2008 12:15 PM
lirc configure error btaylor1988 Linux - Hardware 3 01-27-2008 01:32 PM
LIRC (linux remote control) isn't setting up /dev properly, udev problem? rhauff Slackware 1 11-19-2007 09:48 PM
LXer: How to configure and use LIRC LXer Syndicated Linux News 0 01-10-2006 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration