Rpi 2 OSMC RC gpio remote with TSOP4838

HI I am looking for a how-to to get my gpio sensor working with OSMC. Via the OSMC settings app Rpi-Config I can set the enable gpio and select the w1-gpio-overlay. If I go into remotes and select the RC6-MCE remote profile and then reboot OSMC all should be well.

However no response to key presses on the remote.

I can ssh into the Rpi2 and run mode2 -d /dev/lirc0 and I can see lots of codes on screen as I press various keys. I tried a couple of mce remotes and both produce results on the terminal screen when keys are pressed.

However there is no response in OSMC. Can anyone help please. The receiver is wired correctly:

Pin 1 Data Pin 12
Pin 2 Ground Pin 6
Pin 3 Power (tried on both Pin 1 and 2 and get results on the terminal on both so used 3.3v)

Many thanks
Spart

Why are you selecting the w1 overlay? It’s not needed for gpio remote, just check the enable box then select your remote in the remote module and it should work. Reboot may be needed.Pin 12 is gpio 18 which is the default for the driver, in later versions of the settings app you need to set pin numbers which should be 18 in and 17 out. I’m not sure if this is released to public or only in testing so thought I’d mention it in case.

Thanks for the reply. I updated OSMC to the latest and rebooted. The new Hardware dialog has the extra settings you mentioned. I currently have Enable GPIO set and the output pin is set to 17 and the input to 18. No overlays are set.

I selected the MCE remote in the remotes app.

On reboot I get no response on screen to any key presses.

I can ssh in cat /etc/lirc/lircd.conf shows the correct mce config mapped as lircd.conf -> /etc/lirc/rc6-mce-lircd.conf

If I kill lircd and run mode2 -d /dev/lirc0 I can still see lots of codes when pressing keys so my receiver is working. Exit and reboot but still nothing in OSMC.

Cheers
Spart

What remote? If it’s a Harmony set up as MCE keyboard you’ll need to change it to MCE Remote

Its a MCE remote that has worked with every version of XBMC for years!

I have gpio_in_pull set to off
w1_gpio is set to none
nothing else is selected.

Cheers
Spart

I’m not sure why it’s not working then, I use a RC6 MCE remote myself and I have no problems with it. If you tail a kodi debug log do you see keypresses??

sudo tail -f /home/osmc/.kodi/temp/kodi.log

Turn on debugging first

Is this a clean RC1 install or did you upgrade from an alpha install?

Hi I see nothing in the log. With debugging on.

This is a clean RC1 install updated via OSMC settings to latest code.

A bit baffled, as the receiver seems to be working at the OS level. Ihave three MCE remotes of various vintages. All seem to get a response at the OS level.

Went back to 5v as the specs said 4.5 - 5.5V checked voltage at 5.25V still getting response at the OS level. Nothing in OSMC.

a bit more info all looks ok…

osmc@osmc:~$ sudo systemctl status lircd_helper@lirc0
● lircd_helper@lirc0.service - lircd remote support
Loaded: loaded (/lib/systemd/system/lircd_helper@.service; static)
Active: active (running) since Tue 2015-03-24 18:53:42 GMT; 4min 17s ago
Process: 231 ExecStart=/bin/sh -c /var/run/lirc/lircd-%I.sh (code=exited, status=0/SUCCESS)
Main PID: 265 (lircd)
CGroup: /system.slice/system-lircd_helper.slice/lircd_helper@lirc0.service
└─265 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd-lirc0 --pidfile=/var/run/lirc/lircd-lirc0.pid /etc/lirc/lircd.conf
osmc@osmc:~$ dmesg |grep -i lirc
[ 4.965616] lirc_dev: IR Remote Control driver registered, major 246
[ 5.013436] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.970801] lirc_rpi: auto-detected active low receiver on GPIO pin 18
[ 5.971256] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[ 5.971284] lirc_rpi: driver registered!
[ 6.751885] input: lircd as /devices/virtual/input/input2
osmc@osmc:~$

Cheers
Spart

It should work and is for everyone else it seems. Try learning a couple buttons on the remote and using that .conf file to see if Kodi recognizes it then. Only other thought is to try a fresh install.

Hmmm, this is a fresh install ! I even tried a new receiver, I bought 3. Same result. Are you thinking maybe that the rc6-mce-lircd.conf file has the wrong codes. I tried loading the keymap editor prog. But no key presses were recognised. Will try on another pi, I have a b+ laying around, although not sure what that will prove above whether the receivers work.

Cheers
Spart

In order to work the keys need to be defined as KEY_*** where the stars are different actions, I’m thinking your particular remote has keys defined wrong or is not included in the RC6 file. Try learning a couple to see if they work

What remotes exactly?? True Microsoft RC6 or ???

Dilligaf,

Thanks for bearing with me. I followed this procedure and programmed the remote.

sudo kill $(pidof lircd)
irrecord --list-namespace | grep KEY

And copy and paste that list to somewhere handy.

Then, run the irrecord command:

sudo kill $(pidof lircd)
irrecord -d /dev/lirc0 ~/newlircd.conf

Irrecord will output to ~/newlircd.conf, a file containing the results of your recording. Follow the instructions given by irrecord exactly, selecting the required buttons from the list you copied and pasted a moment ago.

Once you have recorded all required buttons, press enter to exit irrecord.

I then overwrote the rc6-mce-lircd.conf file in /etc/lirc/ with my newly recorded one. Works perfectly now. I can now use the keymap editor to customise it. Many thanks for your help.

Even though all three MCE remotes were recognised by the receiver 2 are the same and one different brand they are clearly using different codes as after recording the single one the others would not work. I am seriously impressed with how responsive and sensitive the little receiver is, should have done this a while ago.

Still have to figure out how to program the mousepad and right/left click buttons.

Now to figure out the nicest way to incorporate this into the case :smile:

Cheers
Spart

There’s the problem if the remotes have mouse capabilities then they are NOT RC6 MCE remotes

They just work if I use the usb dongle, but wanted to do away with dangly bits as much as possible hence the GPIO receiver.

Will persevere…

Cheers
Spart

Thanks for the info Dilligaf. Had the same issue with a Pi2 I recently set up for my fajer. Everything setup the same as his Pi1 but remote wasn’t being detected. Changed pins from 16-17 to 17-18 and now it works. Maybe there should be default settings for different setups, i.e. hyperion, gpio IR remote, custom (which has sliders). Anyways, thanks for the fix.

This was fixed the pins default to 17 and 18 in the most recent version (probably not released yet)

Great! thanks for the heads up

Thanks Sparticle and all that helped contribute, I wanted to configure my Apple remote A1196 with this and it worked on my RPi2, but am now trying to configure long presses in the remote and was going to follow this http://forum.kodi.tv/showthread.php?tid=115023
but didnt want to break anything on OSMC as this is an old post from an older version of XBMC.

Any input?

@sparticle I’m assuming you have a Hama/VRC1100 remote, can you post a copy of your complete learned lircd.conf so it can be included in the settings app?? Thank you

Hama remote shown here 00052451 Hama Remote Control for Windows Media Center | Hama DE

I am going through the EXACT same thing, however when I try to record my own file it fails about halfway through with a message about knowing it’s one kind of remote. I will try to get a copy of what the error is.

I am using a honeypi receiver with a VRC-1100. When I plug in the USB on another pi it works, but against this GPIO ir receiver I can see the keypresses If I kill lircd and run mode2 -d /dev/lirc0, but not with the irw.

Here is a copy of lircd.conf for that god-forsaken VRC-1100 remote. I bought one for the cheap USB IR receiver back when I first got a Pi. Getting that stupid thing to work put SO MANY head prints on table tops!

Once you have the lircd.conf, lircmap.xml, and remote.xml files in place though, it does work. I use a Logitech Harmony though, so I reprogrammed to MCE remote once I set up the GPIO receiver.
VRC-1100 lircd.conf