0

I want to control my RaspberryPi B+ 1.2 using a remote control. I did the steps according to several tutorials but I can't get mode2 -d /dev/lirc0 to output any pulses.

/boot/config.txt

[pi1]
kernel=vmlinuz-3.18.0-trunk-rpi
initramfs initrd.img-3.18.0-trunk-rpi followkernel
# to enable DeviceTree, comment out the next line 
device_tree=
start_x=1
gpu_mem=128

# LIRC
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17
dtparam=gpio_in_pull=up

/etc/lirc/hardware.conf

# /etc/lirc/hardware.conf
#
# 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=""

/etc/modules

snd-bcm2835
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17

Hardware

I connected both 3.3V and GND and put the signal pin on the GPIO 18 as configured.

I did also test the IR Receiver using an Arduino Sketch so I know that both my remote and the receiver work fine.

System

Lirc

lircd --version
lircd 0.9.0-pre1

System

uname -rv 3.18.0-trunk-rpi #1 PREEMPT Debian 3.18.5-1~exp1+rpi19 (2015-08-08)

Debugging

Starting and stopping the service works fine:

# sudo /etc/init.d/lirc start
[ ok ] Loading LIRC modules:.
[ ok ] Starting remote control daemon(s) : LIRC :.
# sudo /etc/init.d/lirc stop
[ ok ] Stopping remote control daemon(s): LIRC:.

LSMOD

# lsmod | grep lirc
lirc_rpi                6890  0 
lirc_dev               10683  1 lirc_rpi
rc_core                17686  1 lirc_dev

GPIO Kernel Debug Here I should see the GPIO pins I guess

# mount -t debugfs debugfs /sys/kernel/debug
# cat /sys/kernel/debug/gpio 
GPIOs 0-53, platform/20200000.gpio, pinctrl-bcm2835:
 gpio-13  (sysfs               ) in  hi IRQ
 gpio-21  (sysfs               ) in  lo IRQ
 gpio-35  (led1                ) out lo    
 gpio-47  (led0                ) out lo    

DSMEG

# dmesg | grep lirc_rpi
[    0.206481] of_dma_get_range: no dma-ranges found for node(/lirc_rpi)
[    9.332416] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[   10.496625] lirc_rpi: auto-detected active low receiver on GPIO pin 18
[   10.598135] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[   10.778155] lirc_rpi: driver registered!

Internal Reference phone#46

GPIO Setup

  • Please add a photo showing the connections to the Pi. – joan Feb 7 '18 at 22:43
  • @joan: You were right about the wiring. I have a sticker on my Pi with the pins and it was flipped so the wiring was wrong all along. You may add an answer and I will gladly accept it. – Besi Feb 8 '18 at 10:37
  • It was only a guess. You can self answer and accept the answer in a day or so. – joan Feb 8 '18 at 11:24
1

The answer to my problem was really silly. I had a sticker with the pins in my device and it turned out that the sticker was flipped to that the receiver was not connected to the right pins.

Once I fixed this I would get signals on my remote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.