Rpi2 OSMC Alpha 4 and IR GPIO

Glad you sorted it. :smile:

One comment though, make sure you are using the right fstab mount options - with the correct mount options it will wait for nfs to mount on first access to files on the nfs share - the mount options you need are different to raspbmc. Please see my comments in this thread:

In theory this should prevent the problem you saw where lirc started before your nfs share was mounted - because as soon as lirc tried to access a file in your nfs share it would trigger the share to automatically mount and wait until it did so.

x-systemd.automount,noauto are the recommended options for nfs mounts in osmc. (Don’t use auto or _netdev)

I used the post you reference to update /etc/fstab as I was having the problem where it wouldn’t automount.

Here’s my /etc/fstab:

osmc@osmc:~$ cat /etc/fstab
/dev/mmcblk0p1  /boot    vfat     defaults,noatime    0   0
/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
blah:/homes/xbmc        /home/osmc      nfs     defaults,noauto,x-systemd.automount     0       0

I did notice this message on boot today (hadn’t noticed it before). But it boots into OSMC and when I connect via SSH, /home/osmc is mounted.

osmc@osmc:~$ systemctl status home-osmc.mount
* home-osmc.mount - /home/osmc
   Loaded: loaded (/etc/fstab)
   Active: active (mounted) since Thu 1970-01-01 00:00:17 UTC; 45 years 1 months ago
    Where: /home/osmc
     What: blah:/homes/xbmc
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 304 ExecMount=/bin/mount -n blah:/homes/xbmc /home/osmc -t nfs -o defaults,noauto,x-systemd.automount (code=exited, status=0/SUCCESS)

Hi,

Thanks for the screenshot. I think there is a problem with the ordering of system service start-up where it is trying to mount NFS before the network is up (hence the failure in your screenshot) but because x-systemd.automount creates an automounter service for the share, it gets retried later so does eventually get mounted by the time you try to use Kodi.

Thanks to your screenshot I’ve spotted another startup ordering issue - eventlircd needs to start before lircd for remote support to work properly, so I will look at addressing this.

@DBMandrake i just can’t get this to work, it worked seamless in xbian but now i don’t have a clue.
I’m using a GPIO IR receiver and i’m getting pulse and space in mode2.

Can someone please tell me what i’m doing wrong? :smile:

/boot/config.txt

hdmi_ignore_cec=1
core_freq=375
dtoverlay=lirc-rpi-overlay
arm_freq=850
start_x=1
disable_overscan=1
gpu_mem_256=112
gpu_mem_512=144
hdmi_ignore_cec_init=1

/etc/lirc/lircd.conf

begin remote

name Microsoft_Xbox360
bits 16
flags RC6|CONST_LENGTH
eps 30
aeps 100

header 2676 870
one 454 429
zero 454 429
pre_data_bits 21
pre_data 0x37FF0
gap 106291
min_repeat 1
toggle_bit_mask 0x8000

rc6_mask 0x100000000

  begin codes
      KEY_OPEN                 0x8BD7                    #  Was: OpenClose
      XboxFancyButton          0x0B9B
      KEY_POWER                0x8BF3                    #  Was: OnOff
      KEY_STOP                 0x0BE6                    #  Was: Stop
      KEY_PAUSE                0x8BE7                    #  Was: Pause
      KEY_REWIND               0x0BEA                    #  Was: Rewind
      KEY_FASTFORWARD          0x8BEB                    #  Was: FastForward
      KEY_PREVIOUS             0x0BE4                    #  Was: Prev
      KEY_NEXT                 0x8BE5                    #  Was: Next
      KEY_PLAY                 0x0BE9                    #  Was: Play
      Display                  0x8BB0
      KEY_TITLE                0x0BAE                    #  Was: Title
      KEY_MENU                 0x8BDB                    #  Was: DVD_Menu
      KEY_BACK                 0x0BDC                    #  Was: Back
      KEY_INFO                 0x8BF0                    #  Was: Info
      UpArrow                  0x0BE1
      LeftArrow                0x8BDF
      RightArrow               0x0BDE
      DownArrow                0x8BE0
      KEY_OK                   0x0BDD                    #  Was: OK
      KEY_Y                    0x8BD9                    #  Was: Y
      KEY_X                    0x0B97                    #  Was: X
      KEY_A                    0x8B99                    #  Was: A
      KEY_B                    0x0BDA                    #  Was: B
      KEY_CHANNELUP            0x8BED                    #  Was: ChUp
      KEY_CHANNELDOWN          0x0BEC                    #  Was: ChDown
      KEY_VOLUMEDOWN           0x0BEE                    #  Was: VolDown
      KEY_VOLUMEUP             0x0BEF                    #  Was: VolUp
      KEY_MUTE                 0x0BF1                    #  Was: Mute
      KEY_PLAY                 0x0BF2                    #  Was: Start
      KEY_PLAY                 0x8BE9                    #  Was: Play
      KEY_ENTER                0x0BF4                    #  Was: Enter
      KEY_RECORD               0x8BE8                    #  Was: Record
      KEY_CLEAR                0x0BF5                    #  Was: Clear
      KEY_1                    0x8BFE                    #  Was: 1
      KEY_2                    0x0BFD                    #  Was: 2
      KEY_3                    0x8BFC                    #  Was: 3
      KEY_4                    0x0BFB                    #  Was: 4
      KEY_5                    0x8BFA                    #  Was: 5
      KEY_6                    0x0BF9                    #  Was: 6
      KEY_7                    0x8BF8                    #  Was: 7
      KEY_8                    0x0BF7                    #  Was: 8
      KEY_9                    0x8BF6                    #  Was: 9
      KEY_0                    0x0BE2                    #  Was: 100
      KEY_0                    0x8BFF                    #  Was: 0
      Reload                   0x8BE3
  end codes

end remote

dpkg -l | grep lirc

ii liblircclient0 0.9.0~pre1-1.2 armhf infra-red remote control support - client library
ii lirc 0.9.0~pre1-1.2 armhf infra-red remote control support
ii rbp-eventlircd-osmc 1.0.1 armhf eventlircd for OSMC
ii rbp-remote-osmc 1.0.3 armhf Remote support for OSMC, achieved with lirc and eventlircd

sudo systemctl status lircd_helper@lirc0

● lircd_helper@lirc0.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

irw /var/run/lirc/lircd-lirc0

connect: No such file or directory

irw /var/run/lircd

connect: No such file or directory

Only key codes beginning with KEY_ are valid (as we are using eventlircd) so some of your button mappings will not work until fixed.

It seems that you haven’t run an update - GPIO remote is not working in Alpha 4 until you run an update. Here are my package versions:

ii  rbp-eventlircd-osmc                  1.0.13                    armhf        eventlircd for OSMC
ii  rbp-lirc-osmc                        0.9.0-4                   armhf        lirc for osmc
ii  rbp-remote-osmc                      1.0.9                     armhf        Remote support for OSMC, achieved with lirc and eventlircd

This is because of the above - you have outdated package versions.

Also if you have a Raspberry Pi 2 you’ll need to manually load the gpio module - at least until the next release. (dtoverlay is not working on Pi 2 on Alpha 4)

You can do this by adding

modprobe lirc_rpi

into /etc/rc.local before the exit 0 line.

Hi, Was wondering how close you were with IR remote support over GPIO or USB.

mine GPIO IR remote is working, following the First @DBMandrake how-to in this topic. i use harmony one with MCE config.

I’ve updated my how to post in this thread to suggest adding modprobe lirc_rpi (needed only for Pi 2 at the moment) in /etc/rc.local instead of adding it to /usr/bin/mediacenter as this is a much better place to put it which won’t be nuked by an upgrade to the mediacenter package…

I am also looking at the IR interface as used with PI B on GPIO 18. I am having trouble loging in via ssh. I probably missed something in the set up. As soon as I get past that I will insert the lirc.conf file and give it a test. The GUI appears to be better than standard KODI confl. for use with a remote.

I have three of the PI 2’s from Element 14 to compare OS’s and hardware consistancy.

Sam, great work from a 72 yr old engineer-now retired but still busy- this keeps me out of trouble.
The blog responses from the other members are also appreciated–good info and it seems everyone is working in a positive direction.

I’m getting the same versions.
I’ve run apt-get update and apt-get upgrade but don’t see any updates available for lirc.

Also on running apt-get install lirc, I’m told I have the latest version.

Perhaps another repo is needed in sources.list?

You shouldn’t have the lirc package at all, because we replaced it with rbp-lirc-osmc.

There is a lot of work going on in the background with our build system and apt archive that may be causing you not to receive the updated package. All I can suggest is to hang fire and wait for the next release which will be very soon.

yes, but haven’t done new build since then?

dist-upgrade removes the old lirc package however this is probably no longer working (not tested) due to all the package version re-numbering…

Will be fixed in the next build anyway.

Hello, just made apt-get update, upgrade and dist-upgrade.
But my LIRC packages are:

    iroot@osmc:~# dpkg -l | grep lirc
ii  liblircclient0                       0.9.0~pre1-1.2            armhf        
ii  lirc                                 0.9.0~pre1-1.2            armhf       
ii  rbp-eventlircd-osmc                  1.0.1                     armhf       
ii  rbp-remote-osmc                      1.0.3                     armhf       

Need to kill kodi and restart LIRC and Kodi to get the Remote working.
after restarting LIRC IRW also works.

Any clues (maybe the content of my sources list isn’t OK):

deb http://mirrordirector.raspbian.org/raspbian jessie main contrib non-free
deb http://apt.osmc.tv jessie main

Thanks Markus

Hi,

As I’ve said - you won’t be able to upgrade those packages any more because of the behind the scenes restructuring of the package system that is going on right now.

I’ve just checked and there is no rbp-remote-osmc package any more, it’s now called armv6l-remote-osmc, and the names of the eventlircd and lirc packages have also changed. Therefore you won’t get updates for these original packages.

You’re really just best to wait for the next release to come out as there is no easy manual way to work around it just now, and a new release will be out very soon. (Remember this is an Alpha release so everything is in a constant state of flux as the final details are nailed down. It’s better for us to make changes now to the structuring of packages than try to do it later)

OK Thanks
Is it possible to uninstall the old ones and apt-get install armv6l-remote-osmc and eventlircd and lirc for example ?

When is the release of the next Alpha planned? March 5th ?

You might be able to autoremove rbp-remote-osmc (which will remove its dependencies too) and then install armv6l-remote-osmc, but we don’t have any time to test this as our focus has to be on getting the next release out, and the changes that are currently being made break backward compatibility with Alpha 4 and earlier. (And will definitely require a fresh install)

I can’t speak for Sam but I think we’re talking only a matter of days away at most.

Hi all,
I am experimenting with the IR GPIO LIRC. Like DB says though I think I will just wait until the next release to continue–i am patient and considering this is an Alpha release-it works amazingly well. Great work.

Has anyone been successful in using the IR GPIO on Rpi2 with the more recent builds?

Hello,
I cannot kill the “pidof lircd” or run mode2 or irrecord. An reason to this?