Menu

#382 Making LIRC for RasPi 4, 64bit RaspOS Fails, and ./configuration Options

0.10.2
open
nobody
None
na
2025-07-13
2023-10-06
Jim Kaiser
No

I'm building a new Pi and hoped to use 10.2 that includes the Merge 50 (May 2023) patch for COUNT=. The Pi OS apt has only 10.1 so I thought I'd compile 10.2.

First, the Failure:
./doc/index.html is linked to the non-existent: ./doc/html/index.html
The correct link seems to be to ./doc/html-source/index.html

With that manual re-linking correction, make succeeds (but I really don't care about docs at all).

Then, File Locations:
Now I'm trying to get all the files deployed to their correct locations. I run:

./configure --bindir=/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --localstatedir=/var --runstatedir=/var/run --libdir=/var/lib --datarootdir=/usr/share

I think this corresponds to where 10.1 put its files, but after makeand sudo make install when I launch lircd I get:
can't open or create /var/run/lirc/lircd.pid: No such file or directory
Which key controls where that gets written? /var/run/lirc does not get created through my make process.

Upon manually creating /var/run/lirc then lircd will start. Is it possible that runstatedir does not automatically have /lirc appended when creating it?

Then, (and maybe not an issue), but sudo systemctl start lircd starts the daemon, but does not do so asynchronously. I need to hit CTL-C to exit. Should make install run systemctl to start the daemon?

Here is the systemctl status lircd

$ sudo systemctl status lircd
 lircd.service - Flexible IR remote input/output application support
     Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled)
     Active: activating (start) since Fri 2023-10-06 21:17:16 BST; 1min 0s ago
       Docs: man:lircd(8)
             http://lirc.org/html/configure.html
   Main PID: 204354 (lircd)
      Tasks: 2 (limit: 1599)
        CPU: 19ms
     CGroup: /system.slice/lircd.service
             └─204354 /usr/sbin/lircd --nodaemon

If I can get this working I'd be happy to contribute the required configure options to an FAQ if you like.

Any way you can push or recommend 10.2 to the Raspberry Pi folk?

Discussion

  • Jim Kaiser

    Jim Kaiser - 2023-10-08

    When starting lircd.service with systemctl it always adds the --nodaemon flag and times out after about 2 minutes. (See the systemctl status output just above). It then deletes the /var/run/lirc directory. The socket is up and stable.

    (I removed the --runstatedir=/var/run directive from ./configure since run is automatically appended to --localstatedir=/var)

    lirc_options.conf has nodaemon = False but that appears to be ignored. My other items like device and driver and effective_user all are observed.

    I'm close it seems. Any help appreciated.

     

    Last edit: Jim Kaiser 2023-10-08
  • Jim Kaiser

    Jim Kaiser - 2023-10-14

    After changing the Type=notice to Type=simple in lircd.service, the daemon starts and stays running using sudo systemctl start lircd. irsend --count=4 xxx yyy works.

    This was based on using ./configure --bindir=/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --libdir=/var/lib --datarootdir=/usr/share on a RasPi 4 running Raspberry OS.

    Now on to trying the installation on an x86 box running ubuntu.

     
  • Sean Young

    Sean Young - 2025-07-05

    Looks like you don't have systemd development libraries installed - lircd should send ready notifications to systemd, but only if HAVE_SYSTEMD is set by ./configure Do you have the libsystemd-dev package installed and what is the output of ./configure?

     
  • Jim Kaiser

    Jim Kaiser - 2025-07-11

    Here's what I see for that library:

    sudo apt list | grep libsystemd-dev
    
    librust-libsystemd-dev/oldstable 0.2.1-2 arm64
    librust-libsystemd-dev/oldstable 0.2.1-2 armhf
    libsystemd-dev/oldstable-security 247.3-7+deb11u6 arm64
    libsystemd-dev/oldstable-security 247.3-7+deb11u6 armhf
    

    I guess the library's installed. Maybe there's a permissions issue? I need to use sudo a lot.

    Anyway, as per my 2023-10-14 note above. I got it working.

    Actually, the IR messages are generated on an upstream ubuntu x86 machine and relayed to the Pi machine for execution using a usb-uirt I've had for decades. Its at: /dev/serial/by-id/usb-FTDI_USB-UIRT-if00-port0

    I'm happy to run .configure again if that won't muck up my working instance. Actually, I'd much rather get 10.2, et seq, pushed into the distributed linux packages. I really don't need to build executables. Docker images would be even better.

    Or, if it would really be helpful, I could spend a day getting a fresh Pi going and experiment. Again, any chance of pushing 10.2+ to linux distros, or docker?


    As an aside, is there any way to identify specific target IR blasters with LIRC? I have two identical Denon boxes that I would like to address independently using LIRC from the same Pi. Thanks.

    Anyway, COUNT=xxxis huge

     

    Last edit: Jim Kaiser 2025-07-11
  • Sean Young

    Sean Young - 2025-07-12

    Looks like you are running debian oldstable. Trixie has lirc 0.10.2, so if you move to that version you will get lirc 0.10.2.

    You can set the transmitters with irsend set_transmitters ....

     
  • Jim Kaiser

    Jim Kaiser - 2025-07-13

    Thanks for the 10.2 referral. Sorry for veering off a bit here. I've seen set_transmitters. What I don't understand is how to define multiple devices and drivers in (presumably) lirc_options.conf. I suppose those would be transmitter 1 2, etc. based on the order defined? I may also need to connect to another upstream machine. Here's my conf file.

    [lircd]
    nodaemon        = False
    driver          = usb_uirt_raw #devinput
    device          = /dev/serial/by-id/usb-FTDI_USB-UIRT-if00-port0  #auto
    output          = /var/run/lirc/lircd
    pidfile         = /var/run/lirc/lircd.pid
    plugindir       = /var/lib/lirc/plugins
    permission      = 666
    allow-simulate  = No
    repeat-max      = 600
    #effective-user =
    listen         = 0.0.0.0:8765
    connect        = 192.168.2.220:8765 #host[:port]
    #loglevel       = 6
    #release        = true
    #release_suffix = _EVUP
    #logfile        = ...
    #driver-options = ...
    
    [lircmd]
    uinput          = False
    nodaemon        = False
    
    # [modinit]
    # code = /usr/sbin/modprobe lirc_serial
    # code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
    # code2 = ...
    
    
    # [lircd-uinput]
    # add-release-events = False
    # release-timeout    = 200
    # release-suffix     = _EVUP
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.