How to set up a dvb-t ir receiver with its own remote

Hello everybody!

First time ‘poster’ here… :slight_smile:

Beg your pardon if somehow I do a mess on explaining myself…

Without adue:

I am trying to set up a remote control for this usb dvb-t dongle here:

07ca:a835 AVerMedia Technologies, Inc.

link-1

link-2

The dongle works fine for tv reception, but I cannot use its remote control inside osmc.

This is what I get if I use ir-keytable command without any arguments:

$ ir-keytable 
Found /sys/class/rc/rc0/ (/dev/input/event2) with:
        Driver dvb_usb_af9035, table rc-empty
        Supported protocols: NEC 
        Enabled protocols: 
        Name: AVerMedia AVerTV Volar HD/PRO (A
        bus: 3, vendor/product: 07ca:a835, version: 0x0203
        Repeat delay = 500 ms, repeat period = 125 ms

I have been trying to use lirc but I seriously have my doubts if I am heading the right way…

I managed to get to the point of creating a configuration file which I am trying to use right now:

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(devinput) on Sun Mar  5 18:41:10 2017
#
# contributed by 
#
# brand:                       config.conf
# model no. of remote control: 
# devices being controlled by this remote:
#


begin remote


  name  config.conf
  bits           56
  eps            30
  aeps          100


  one             0     0
  zero            0     0
  pre_data_bits   8
  pre_data       0x0
  gap          499959
  toggle_bit_mask 0x0


      begin codes
          KEY_POWER                0x04000400000501
          KEY_AUDIO                0x04000400000513
          KEY_PLAYPAUSE            0x04000400000516
          KEY_STOP                 0x04000400000518
          KEY_FASTFORWARD          0x0400040000051D
          KEY_REWIND               0x0400040000051C
          KEY_RECORD               0x04000400000517
          KEY_EPG                  0x04000400000515
          KEY_DISPLAYTOGGLE        0x0400040000054D
          KEY_VOLUMEUP             0x04000400000504
          KEY_VOLUMEDOWN           0x04000400000505
          KEY_CHANNELUP            0x04000400000502
          KEY_CHANNELDOWN          0x04000400000503
          KEY_1                    0x04000400000509
          KEY_2                    0x0400040000050A
          KEY_3                    0x0400040000050B
          KEY_4                    0x0400040000050C
          KEY_5                    0x0400040000050D
          KEY_6                    0x0400040000050E
          KEY_7                    0x0400040000050F
          KEY_8                    0x04000400000510
          KEY_9                    0x04000400000511
          KEY_0                    0x04000400000512
          KEY_BACK                 0x04000400000507
          KEY_MUTE                 0x04000400000506
          KEY_MENU                 0x04000400000508
      end codes

end remote

I loaded this set up from ‘MyOSMC → Remotes’ menu. (tried both with disable RC6 on and off)

So, my question is:

Am I going in the right way to set it up? Is there a guide which I could follow to make it work (I mean loading and making this configuration file work inside osmc)?

Thank you already for your attention…

Followind advice from fellow @ActionA from the #irc channel, I am updating this post with pertaining dmesg content after (un)plugging the device to its rasperry-pi b+ host:

link to the dmesg log

Thanks again for any insight and for having read thus far… :slight_smile:

Tried to answer you in IRC but you left too quickly.

Test with irrecord first and making your own lirc config is the best bet.

ir-keytable and LIRC are different. One is decoding in kernel space, one is in user space (with an IR bridge), so pick one and use that.

Hello,

Thank you for your answer.

It’s remarkable how you manage to keep up.

Well, as I said in the irc channel, I had already tried to accomplish that. I had made a lircd conf file but I never managed to ‘load’ it onto osmc through the MyOSMC app gui. I don’t know if I actually performed well that task. Maybe I missed something…

Also, can you/someone, explain what does this instruction mean?

ExecStartPost = /bin/sh -c "for f in /var/run/lirc/lircd-*.sh; do if [ -e $f ]; then s=$(basename $f .sh | sed 's/lircd-//g'); systemctl start lircd_helper@$s; fi; done"

It’s in the eventlircd.service file and I tried to locate any lircd-*.sh files in the system but had no luck…

So I lack the documentation for this project.

Can you/someone else post some link to read more about this eventlircd implementation of yours?

Best regards.

I’m not sure why you’re digging in to the systemd part of things.

Stop eventlircd, stop Kodi and use irrecord to record a good configuration. You haven’t said whether you generated the configuration file on Pi or on another system. Then all you need to do is select that configuration file in My OSMC -> Remotes.

This is reasonably well documented on Git, the forums also cover how to set up a custom remote. I don’t think it’s too challenging, we have tried to make things as easy as possible. We bundle default configs for example

Sam

Hello @sam_nazarko,

I am thankful for all your support. The reason why I delved into systemd file was to figure out what was really behind the issue.

I did make up a configuration file with irrecord but I didn’t succeed in loading it up, not even the irw command would acknowledge its existence. Actually I still don’t know how to make the configuration file work under the eventlircd architecture of osmc. That’s why I came here for in the first place, to get some pointers as to how this eventlircd architecture would behave. I’m sorry but I still don’t understand how it works. I haven’t looked thoroughly at git yet. I had intentions of having it accomplished today, but I ended up not having the needed time for it. Still I promise I will look into git and try to only return here if it I run out of self-sufficiency.
At best I’ll be back with a howto
I also tried to adapt an ad hoc lircd solution back from arch linux with the same disappointing result. That is, disabling eventlircd service and adapting an imported lircd service file. This service file does start and keeps loaded with systemd, but even if irw is pointing to the proper lircd socket, there is no output shown in the standard output whatsoever.

Thank you for your time.

See you soon, hopefully with good news.

Best regards.

PS.: I tried both ways, imported or locally generated configuration files. Same result. :frowning:

eventlircd is a uinput aggregator.
If irrecord works, then you don’t need to worry about eventlircd. It’s for ‘quirky’ remotes

My OSMC -> Remotes selector effectively creates a symlink, if I remember off the top of my head, or at least copies it to /home/osmc.

If you have Kodi (and some LIRC services) running, you might not always see output with LIRC. Without logs it’s hard to say what the issue is: does Kodi debug log show keypresses coming through?