pythonraspberry-pilirc

Raspberry Pi Zero W - LIRC doesn't work - cannot initiate device


I have installed lirc befor. My file boot/config.txt contains:

dtoverlay=lirc-rpi

The file /etc/lirc/hardware.conf contains:

#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--uinput"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

When I try to start sudo /etc/init.d/lircd status

lircd.service - Flexible IR remote input/output application support
   Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-11-16 17:15:40 GMT; 8min ago
     Docs: man:lircd(8)
           http://lirc.org/html/configure.html
  Process: 640 ExecStart=/usr/sbin/lircd --nodaemon (code=exited, status=1/FAILURE)
 Main PID: 640 (code=exited, status=1/FAILURE)

Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Options: release_suffix: _EVUP
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Options: allow_simulate: 0
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Options: repeat_max: 600
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Options: configfile: /etc/lirc/lircd.conf
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Options: dynamic_codes: (null)
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Current driver: default
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Driver API version: 3
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Driver  version: 0.10.0
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Notice: Driver  info: See file:///usr/share/doc/lirc/pl…t.html
Nov 16 17:15:40 raspberrypi lircd-0.10.1[640]: Info: lircd:  Opening log, level: Info
Hint: Some lines were ellipsized, use -l to show in full.

When i tip in: sudo mode2 -d /dev/lirc0 This error occurs:

Using driver default on device /dev/lirc0

Cannot initiate device /dev/lirc0

Anyone has some suggestion how i can fix that problem?


Solution

  • The last lirc update is a major, disrupting one. There are upgrade notes on usr/share/doc/lirc/README.Debian.gz as a starter. Also, the official docs at http://lirc.org/html/configuration-guide.html has an updated, comprehensive howto.

    Note that hardware.conf isn't used in current lirc version. Also, lirc uses systemd heavily -- the sysV scripts are available but not that well maintained.

    In short: read the docs and make the necessary upgrade steps.