LIRC Issue on Pi Zero... IR Receiving, but no action by OSMC

Hi, well, my nice shiny Zero arrived today, so I immediately installed the latest OSMC distro which works very well indeed.

Now, to control it, I want to solder on an IR receiver diode to use LIRC with an Microsoft MCE IR6 remote. Has anyone done this yet on a Zero?

Cheers, Scott

(Following on from here.)

Ok… I’ve soldered the IR reciever to 3.3V power, ground, and GPIO physical pin 12 / GPIO 18, as I had it on my old Pi 1, but am having troubles.

Using a Microsoft MCE remote IR6 type 1039, which also worked on the old Pi, It’s batteries are good and currently works daily on other Pi’s I have in the house using the MCE USB IR receiver, which I’ve tried on the Zero, and had success.

However, it’s not working now on the Zero using LIRC.

In the My OSMC raspberrry pi settings:

  • I did find that this type of remote was disabled in the remotes menu, so have enabled it.
  • I’ve tried setting gpio_in_pull to pull up; pull down; and off, all with no luck (rebooting every time).

Should I mess with W1gpio settings?

(OSMC release April 2016.04-1)

Any help will be awesome…

Thanks, Scott.

Has anyone else had issues with LIRC not working?

I’m going to dig my oscilloscope out later to have a look at what’s going on with the IR receiver, and try it in pull up and pull down modes.

Cheers, Scott

Results with the oscilloscope:

gpio_in_pull = off, pin sits at 2V when idle, switches to 0V when IR signal received.

gpio_in_pull = down, pin sits at 2V when idle, switches to 0V when IR signal received.

gpio_in_pull = up, pin, sits at 3.3V when idle, switches to 0V when IR signal received.

The IR receiver is clearly receiving the signal from what I can see on the scope, but still nothing happening on the Pi Zero. Image below is when in Pull Up mode (0 to 3.3V).

Possible cause?:

I’ve just found that in KODI’s menus listed under System / Settings / Input devices / Peripherals popup box: only CEC adapter is listed, should I also see LIRC listed here??

If there should be a script or something for LIRC, how do I install / activate it?

Out of desperation, I’ve just tried all the MyOSMC W1 overlay options, and SPI support, but no joy.

System Info:

Operating System: OSMC 2016.04-1 (kernel: Linux 4.4.6-3-osmc)
Build: KODI 16.1-RC3
Compiled Apr 3 2016

Please, any help will really be appreciated…

Cheers, Scott.

Pull up is the correct polarity, this is the default.

Do you have the following in your /boot/config.txt ?

dtoverlay=lirc-rpi
dtparam=gpio_in_pin=18
dtparam=gpio_out_pin=17

If you run lsmod do you see:

lirc_rpi                9315  3
lirc_dev               11576  1 lirc_rpi
rc_core                25745  1 lirc_dev

The lirc_rpi module should load automatically when the dtoverlay line is present.

To test that the lirc_rpi driver is receiving data at a low level (before decoding) first stop any running lirc daemon then use mode2:

sudo systemctl stop lircd_helper@lirc0

then

mode2 -d /dev/lirc0

Now press the buttons on any IR remote and you should see lines of space and pulse with numbers.

When you’re finished testing with mode2 you should enable lircd again:

sudo systemctl start lircd_helper@lirc0

It sounds like you have enabled the option for the RC6 kernel decoder. This is something that was always enabled by default in the past but could cause issues with duplicate button presses. I would recommend that you turn that back off again and simply select the RC6 profile from the list of available remote profiles.

This will decode the remote using lircd instead of the kernel decoder.

The number of users that were afflicted with duplicate presses due to RC6 (kernel based) decoding and LIRC (userland) decoding were fewer than the # of users we inconvenienced by disabling this feature. I think I will revert this back to its previous functionality in the near future

Thanks to you both for your help.

Sam, if LIRC is currently disabled, is there an easy way for me to re-enable it, or should I wait for the next release?

If I have to wait for the update, can you give any hints as to when it may be available? I only ask as I have an application that it would be nice to use it for in a couple of weeks.

DB, Do I need to try your suggestions after Sam’s response? If so, how do I get to the command line from OSMC GUI? (No SSH as it’s a Zero, no network).

Massive thank-you by the way for all the work that’s gone into OSMC, aside from this issue, it runs fantastically on my Zero, using an external USB sound card.

Cheers, Scott

Details regarding how to access the command line interface can be found here on our Wiki: Accessing the command line - General - OSMC
But suggest first try the step from Sam.

LIRC isn’t disabled

Kernel based decoding of RC6 signals may be disabled. You can enable it under My OSMC → Remotes. You can verify this is enabled with lsmod | grep rc6.

Ideally you should configure your remote via LIRC (userland).

Hi,

Well, I’ve tried a few things…

lsmod | grep rc6 returned nothing on the screen, and made no difference to the remote working.

mode2 -d /dev/lirc0 worked a treat, lots of numbers flying up the screen upon button presses.

I’ve tried in the MyOSMC menu disabling and enabling the RC6 remote, no difference in either state.

My /boot/config.txt file does match DBM’s above, and lsmod also does, however the sizes are different.

I hope this info may help to see what’s wrong…

Thanks, Scott

Silly question but have you selected an rc6 profile from the list of remotes available ? (This is separate to the enable/disable RC6 option in the bottom right)

If its a Microsoft branded MCE remote its possible the Xbox 360 remote profile may also work.

Dude - you’ve fixed it!!!

Thank you so much, I didn’t fully understand the menu - I guess with a mouse attached it would be more intuitive, but I was only using a keyboard, hence hadn’t “clicked” on the line for my remote… duhh…

Thank you again, so pleased it’s now working well…

Cheers, Scott