LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hama lirc infrared. How to install that ? (https://www.linuxquestions.org/questions/linux-hardware-18/hama-lirc-infrared-how-to-install-that-567568/)

frenchn00b 07-08-2007 07:21 AM

Hama lirc infrared. How to install that ?
 
Hello,

I did this
Code:

apt-get install lirc-svga  lirc-x  lirc  lirc-modules-source
& just made this file:
cat /etc/lirc/lircd.conf

my usb hama http://studentscorner.gr/images/00039704abb.jpg
lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 147a:e019 Formosa Industrial Computing, Inc.
Code:

#UNCONFIGURED
#
# To find out how to get a proper configuration file please read:
#
#      /usr/share/doc/lirc/README.Debian
#
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

  name  Streamzap_Remote
  bits            6
  flags RC5|CONST_LENGTH
  eps            30
  aeps          100

  one          907  804
  zero          907  804
  plead        949
  pre_data_bits  8
  pre_data      0xA3
  gap          111344
  toggle_bit      2

      begin codes
          0                        0x00
          1                        0x01
          2                        0x02
          3                        0x03
          4                        0x04
          5                        0x05
          6                        0x06
          7                        0x07
          8                        0x08
          9                        0x09
          Power                    0x0A
          Mute                    0x0B
          Channel+                0x0C
          Volume+                  0x0D
          Channel-                0x0E
          Volume-                  0x0F
          Up                      0x10
          Left                    0x11
          Ok                      0x12
          Right                    0x13
          Down                    0x14
          Menu                    0x15
          Exit                    0x16
          Play                    0x17
          Pause                    0x18
          Stop                    0x19
          Rewind                  0x1A
          Forward                  0x1B
          Record                  0x1C
          Rewind                  0x1D
          Forward                  0x1E
          Red                      0x20
          Green                    0x21
          Yellow                  0x22
          Blue                    0x23
      end codes

end remote

then, ???
# lircd -c ask me for driver, but which one, and whihc config for lirc ?

big question.
pitty that we dont have a normal mac for drivers.


my dmesg:
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
eth0: no IPv6 routers present
hdh: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request.
usb 1-1.1: USB disconnect, address 3
usb 1-1.4: new low speed USB device using ehci_hcd and address 4
usb 1-1.4: configuration #1 chosen from 1 choice
input: Formosa Industrial Computin Formosa RC102-809 USB Remot as /class/input/input4
input: USB HID v1.10 Device [Formosa Industrial Computin Formosa RC102-809 USB Remot] on usb-0000:00:1a.7-1.4


cat /proc/bus/usb/devices
T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#= 4 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=147a ProdID=e019 Rev= 1.02
S: Manufacturer=Formosa Industrial Computin
S: Product=Formosa RC102-809 USB Remot
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=300mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=10ms

maroonbaboon 07-09-2007 09:06 PM

The driver you need is probably the USB HID (Human Interface Driver) hiddev driver. You can see this is already loaded in your /proc/bus/usb/devices output.

This means that LIRC can read the commands from the device /dev/usb/hiddev0 (at least that's what it's called on my machine).

But you may still have to make up a configuration file. It's a while since I looked at LIRC, so I am not sure exactly what is involved. I believe the DVICO remote is now supported in LIRC, and this also uses hiddev, so maybe you could use that as an example.

Edit: I see your driver is called usbhid, not hiddev. Maybe I am out of date on this stuff.

Edit2: Apparently hiddev depends on usbhid. You could try manually loading hiddev ('modprobe hiddev' as root) and see what happens.

frenchn00b 07-10-2007 11:54 AM

Quote:

Originally Posted by maroonbaboon
The driver you need is probably the USB HID (Human Interface Driver) hiddev driver. You can see this is already loaded in your /proc/bus/usb/devices output.

This means that LIRC can read the commands from the device /dev/usb/hiddev0 (at least that's what it's called on my machine).

But you may still have to make up a configuration file. It's a while since I looked at LIRC, so I am not sure exactly what is involved. I believe the DVICO remote is now supported in LIRC, and this also uses hiddev, so maybe you could use that as an example.

Edit: I see your driver is called usbhid, not hiddev. Maybe I am out of date on this stuff.

Edit2: Apparently hiddev depends on usbhid. You could try manually loading hiddev ('modprobe hiddev' as root) and see what happens.

Code:

modprobe hiddev
FATAL: Module hiddev not found.

:jawa:

maroonbaboon 07-10-2007 07:29 PM

Sorry about my rushed reply to your question. I got a DVICO remote a year or two ago and assumed this was similar.

I get the same message from 'modprobe hiddev' because the module is already built into the kernel. I don't know the reason in your case. Did you compile the kernel yourself?

When I plug the device in I get the following dmesg:

usb 4-1: new low speed USB device using uhci_hcd and address 3
usb 4-1: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.10 Device [DVICO DVICO USB HID Remocon V1.00] on usb-0000:00:1d.2-1

This is kernel 2.6.21.6, and I think things may have changed a bit since I first looked at this. Anyway if I run 'cat /dev/usb/hiddev0' and click the remote buttons I can see the codes printed out on-screen. My understanding is that I can then configure LIRC to read from this device.

There is another bunch of device files in /dev/input. You could try reading from those instead while operating the remote.

frenchn00b 07-11-2007 12:49 AM

Quote:

Originally Posted by maroonbaboon
Sorry about my rushed reply to your question. I got a DVICO remote a year or two ago and assumed this was similar.

I get the same message from 'modprobe hiddev' because the module is already built into the kernel. I don't know the reason in your case. Did you compile the kernel yourself?

When I plug the device in I get the following dmesg:

usb 4-1: new low speed USB device using uhci_hcd and address 3
usb 4-1: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.10 Device [DVICO DVICO USB HID Remocon V1.00] on usb-0000:00:1d.2-1

This is kernel 2.6.21.6, and I think things may have changed a bit since I first looked at this. Anyway if I run 'cat /dev/usb/hiddev0' and click the remote buttons I can see the codes printed out on-screen. My understanding is that I can then configure LIRC to read from this device.

There is another bunch of device files in /dev/input. You could try reading from those instead while operating the remote.

The problem is my kernel. I d like the tv with sound, so I am stuck with vanilla one. kernel stuffs are not easy. That' s the present situation of my kernel

http://www.linuxquestions.org/questi...d.php?t=567367

Greetings

frenchn00b 07-12-2007 12:56 AM

Quote:

Originally Posted by frenchn00b
The problem is my kernel. I d like the tv with sound, so I am stuck with vanilla one. kernel stuffs are not easy. That' s the present situation of my kernel

http://www.linuxquestions.org/questi...d.php?t=567367

Greetings

We fixed the kernel, with daws, concerning the infrared device. should I modconf to add this modules or searching for tar.gz , way ? thanks

maroonbaboon 07-12-2007 08:24 PM

You can certainly try 'modprobe hiddev', along with checking the 'dmesg' output after plugging in the remote.

What kernel are you using now? Do you have its configuration file? You can check the status of the hiddev driver by searching for HIDDEV in there - e.g.

$ grep HIDDEV /usr/src/linux/.config

Depending on how the kernel was compiled the gzipped config file might also be stored at /proc/config.gz. I'm just guessing here - maybe this driver is not needed at all.

frenchn00b 07-15-2007 03:33 PM

Quote:

Originally Posted by maroonbaboon
You can certainly try 'modprobe hiddev', along with checking the 'dmesg' output after plugging in the remote.

What kernel are you using now? Do you have its configuration file? You can check the status of the hiddev driver by searching for HIDDEV in there - e.g.

$ grep HIDDEV /usr/src/linux/.config

Depending on how the kernel was compiled the gzipped config file might also be stored at /proc/config.gz. I'm just guessing here - maybe this driver is not needed at all.

dmesg gives:
Code:

TCP: Treason uncloaked! Peer 84.6.151.184:9856/57886 shrinks window 777737388:777739803. Repaired.
TCP: Treason uncloaked! Peer 84.6.151.184:9856/57886 shrinks window 777802923:777806043. Repaired.
TCP: Treason uncloaked! Peer 84.6.151.184:9856/57886 shrinks window 777802923:777806043. Repaired.
hdh: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request.
usb 1-1: USB disconnect, address 4
usb 1-2: new low speed USB device using uhci_hcd and address 6
usb 1-2: configuration #1 chosen from 1 choice
input: Formosa Industrial Computin Formosa RC102-809 USB Remot as /class/input/input6
input: USB HID v1.10 Device [Formosa Industrial Computin Formosa RC102-809 USB Remot] on usb-0000:00:1a.0-2
hdh: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request.

lsusb:
Code:

# lsusb
Bus 001 Device 006: ID 147a:e019 Formosa Industrial Computing, Inc.
Bus 001 Device 001: ID 0000:0000
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 004 Device 002: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 004 Device 003: ID 046d:0928 Logitech, Inc. Quickcam Express
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 005: ID 045e:0084 Microsoft Corp.
Bus 003 Device 004: ID 0556:0001 Asahi Kasei Microsystems Co., Ltd AK5370 I/F A/D Converter
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000

Code:

# uname -r
2.6.20.1-frenchn00b

Code:

# grep HIDDEV /usr/src/linux/.config
grep: /usr/src/linux/.config: No such file or directory

Code:

# grep HIDDEV /usr/src/linux-headers-2.6.20.1-frenchn00b/.config
CONFIG_USB_HIDDEV=y


Code:

# modprobe hiddev
FATAL: Module hiddev not found.

Code:

# modprobe HIDDEV
FATAL: Module HIDDEV not found.


maroonbaboon 07-15-2007 07:38 PM

OK, so the hiddev driver is built into the kernel. It's possible the remote is already delivering codes to some device file. To check, try running

$ cat /dev/usb/hiddev0

and clicking some buttons on the remote. If the 'cat' command shows no output try again for the device files in directory /dev/input, /dev/input/event0 and so on.

frenchn00b 07-16-2007 11:09 AM

Quote:

Originally Posted by maroonbaboon
OK, so the hiddev driver is built into the kernel. It's possible the remote is already delivering codes to some device file. To check, try running

$ cat /dev/usb/hiddev0

and clicking some buttons on the remote. If the 'cat' command shows no output try again for the device files in directory /dev/input, /dev/input/event0 and so on.

I put the irda in the usb
then
Code:

/usb/hiddev0: No such device

cat /dev/usb/hiddev0
cat: /dev/usb/hiddev0: No such file or directory

cat /dev/usb/hiddev0
cat: /dev/usb/hiddev0: No such file or directory

cat /dev/.static/dev/usb/hiddev0
cat: /dev/.static/dev/usb/hiddev0: No such device

next step:
reboot with irda and try again.... let's cross fingers

frenchn00b 07-16-2007 04:02 PM

I tried all the events and nothg but keyboard and mouse
Code:

cat /dev/input/event3

by-id  by-path  event0  event1  event2  event3  mice  mouse0  ts0

cat /dev/input/ts0
nothg too


I put and unplug and it says :
Quote:

usb 3-2: configuration #1 chosen from 1 choice
input: Formosa Industrial Computin Formosa RC102-809 USB Remot as /class/input/input5
input: USB HID v1.10 Device [Formosa Industrial Computin Formosa RC102-809 USB Remot] on u/dev/.udev/db/class@input@input5@event3sb-0000:00:1a.0-2
but nothing as input5
only
and cat /dev/input/event3 gives :
Quote:

E:ID_VENDOR=Formosa_Industrial_Computin
E:ID_MODEL=Formosa_RC102-809_USB_Remot
E:ID_REVISION=0102
E:ID_SERIAL=Formosa_Industrial_Computin_Formosa_RC102-809_USB_Remot
E:ID_TYPE=hid
E:ID_BUS=usb
E:ID_CLASS=mouse
E:ID_PATH=pci-0000:00:1a.0-usb-0:2:1.0

/dev/.udev/db/class@input@input5@event3
/sys/class/input/input5
/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/input:input5


cat /sys/class/input/input5/name gives the name of the IRDA

what should I do now ?
good help :
http://doc.gwos.org/index.php/Hauppa...ntrolinKubuntu
so event3 is my guy


Quote:

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/class/input/input5/event3':
KERNEL=="event3"
SUBSYSTEM=="input"
DRIVER==""
ATTR{dev}=="13:67"

looking at parent device '/class/input/input5':
KERNELS=="input5"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{modalias}=="input:b0003v147ApE019e0110-e0,kramlsfw"
ATTRS{uniq}==""
ATTRS{phys}=="usb-0000:00:1a.0-2/input0"
ATTRS{name}=="Formosa Industrial Computin Formosa RC102-809 USB Remot"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0':
KERNELS=="3-2:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usbhid"
ATTRS{modalias}=="usb:v147ApE019d0102dc00dsc00dp00ic03isc01ip02"
ATTRS{bInterfaceProtocol}=="02"
ATTRS{bInterfaceSubClass}=="01"
ATTRS{bInterfaceClass}=="03"
ATTRS{bNumEndpoints}=="01"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb3/3-2':
KERNELS=="3-2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{product}=="Formosa RC102-809 USB Remot"
ATTRS{manufacturer}=="Formosa Industrial Computin"
ATTRS{maxchild}=="0"
ATTRS{version}==" 1.10"
ATTRS{devnum}=="4"
ATTRS{speed}=="1.5"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{bNumConfigurations}=="1"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceClass}=="00"
ATTRS{bcdDevice}=="0102"
ATTRS{idProduct}=="e019"
ATTRS{idVendor}=="147a"
ATTRS{bMaxPower}=="300mA"
ATTRS{bmAttributes}=="80"
ATTRS{bConfigurationValue}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{configuration}=="HID Device"

looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb3':
KERNELS=="usb3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{serial}=="0000:00:1a.0"
ATTRS{product}=="UHCI Host Controller"
ATTRS{manufacturer}=="Linux 2.6.20.1-frenchn00b uhci_hcd"
ATTRS{maxchild}=="2"
ATTRS{version}==" 1.10"
ATTRS{devnum}=="1"
ATTRS{speed}=="12"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bNumConfigurations}=="1"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceClass}=="09"
ATTRS{bcdDevice}=="0206"
ATTRS{idProduct}=="0000"
ATTRS{idVendor}=="0000"
ATTRS{bMaxPower}==" 0mA"
ATTRS{bmAttributes}=="e0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{configuration}==""

looking at parent device '/devices/pci0000:00/0000:00:1a.0':
KERNELS=="0000:00:1a.0"
SUBSYSTEMS=="pci"
DRIVERS=="uhci_hcd"
ATTRS{msi_bus}==""
ATTRS{broken_parity_status}=="0"
ATTRS{enable}=="1"
ATTRS{modalias}=="pci:v00008086d00002834sv00001043sd000081ECbc0Csc03i00"
ATTRS{local_cpus}=="ff"
ATTRS{irq}=="16"
ATTRS{class}=="0x0c0300"
ATTRS{subsystem_device}=="0x81ec"
ATTRS{subsystem_vendor}=="0x1043"
ATTRS{device}=="0x2834"
ATTRS{vendor}=="0x8086"

looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""


frenchn00b 07-16-2007 04:19 PM

cat /dev/input/event3 wuith pressing key => nothg

And:
Code:

sudo /usr/sbin/lircd -H dev/input -d /dev/input/event3 -n
and $ irw
gives nothg


Quote:

# lircd -d /dev/input/event3 -n
lircd-0.8.0[4182]: lircd(userspace) ready
lircd-0.8.0[4182]: accepted new client on /dev/lircd
lircd-0.8.0[4182]: could not get hardware features
lircd-0.8.0[4182]: this device driver does not support the new LIRC interface
lircd-0.8.0[4182]: major number of /dev/input/event3 is 13
lircd-0.8.0[4182]: LIRC major number is 61
lircd-0.8.0[4182]: check if /dev/input/event3 is a LIRC device
lircd-0.8.0[4182]: caught signal
Terminated



frenchn00b 07-16-2007 04:25 PM

Some progresses:

I remove / replug the irda receiver,

then:
cat /proc/bus/input/devices

read the eventXXXXX value (event3)

then,
Code:

lircd -H dev/input -d /dev/input/event3 -n
then aterm user, $ irw
then

I got this message in hte lircd daemon window:

Quote:

# lircd -H dev/input -d /dev/input/event3 -n
lircd-0.8.0[4228]: lircd(userspace) ready
lircd-0.8.0[4228]: accepted new client on /dev/lircd
lircd-0.8.0[4228]: initializing '/dev/input/event3'
lircd-0.8.0[4228]: devinput_rec
lircd-0.8.0[4228]: time 1184628160.741280 type 0 code 0 value 0
lircd-0.8.0[4228]: code 00000000
lircd-0.8.0[4228]: devinput_decode
and nothing else,
I can press all keys and nothg

So only one single press works to give code 0000

What should I do to let the machine see I press againa and again ... ?

thank you !!

some progresses a bit

frenchn00b 07-16-2007 04:42 PM

so, result:

I unplug / replug, then & pressing remote command gives:
Code:

# cat /dev/input/event3
öFÃó

and nothg else after, pressing pressing gives no changes ...

pfff :confused: :confused: :( :( :(

maroonbaboon 07-16-2007 08:07 PM

Wow, you have been busy! I'm sure you know more about the problem than I do at this point. It seems you are doing all the right things but no success.

I had another look at what I did to get my USB remote working with lirc-0.7.2., and it is very similar to what you have tried, except with 'dvico' driver instead of 'dev/input'. Doing

lircd -H dev/input -d /dev/input/event3 -n

looks correct. I don't know if you have already found the tutorial at

http://www.linuxtv.org/v4lwiki/index...te_controllers

but it would be worth checking the steps described there. Otherwise this situation is quite unfamiliar to me.

EDIT: Another thing to try: if you are compiling lirc from source code you can give the flag --enable-debug to ./configure. It looks like the dev/input driver should then print more information.

frenchn00b 07-18-2007 02:00 PM

Some news...
nothing working:



I launched from root from xterm a single line :
Code:

  killall -e lircd ; for each in $(cat /root/drivers ) ; do killall -e $each ;  echo "------$each-----------"  ; sleep 1s ; echo $each ; printf " " ;  xterm -e  "lircd -H $each  -d /dev/input/event3    " ;  printf "** Not working, enter for next driver? ***"  ;    read kjklfds  ; killall -e lircd ;  sleep .5s  ; done
with /root/drivers:
Code:

        alsa_usb
        atilibusb
        audio_alsa
        bte
        bw6130
        dvico
        creative
        creative_infracd
        default
        dev/input
        dsp
        ea65
        irman
        livedrive_midi
        livedrive_seq
        logitech
        mp3anywhere
        mouseremote
        mouseremote_ps2
        null
        pcmak
        pinsys
        pixelview
        silitek
        tira
        udp
        uirt2
        uirt2_raw

:(

maroonbaboon 07-19-2007 01:48 AM

My guess at this stage is that your remote is operating as an extra USB keyboard. It's possible there are settings in the BIOS for using a USB keyboard that you could play with, maybe in conjunction with 'xev' to see if the X server is capturing any events from the remote. Another poster had the problem that his remote was interfering with the built-in keyboard on his notebook.

I never used a USB keyboard, so I'm not quite sure what to expect.

As a last resort you can recompile lirc with the debug option enabled, and even add extra debugging code to the dev/input driver. There is some documentation about the USB input system in directory Documentation/input of the kernel source code (especially input.txt), but I never got my head around this stuff.:confused:

frenchn00b 10-12-2007 01:13 PM

I found this:
http://web.mat.bham.ac.uk/R.W.Kaye/s...e/rc102remote/
I hope I can make it work

frenchn00b 10-12-2007 01:34 PM

HAMA IRDA,

I think this will work:

http://sac.muzzol.com/doku.php?id=co...t_conceptronic

frenchn00b 10-12-2007 01:48 PM

Almost working, but stuck to :

Quote:

/irzol01-1.3rc1# lircd -n -H udp zol100.conf
Driver `udp' not supported.
Supported drivers:
default


All times are GMT -5. The time now is 06:19 PM.