Hey, I am trying to set up the cloudshell IR receiver for my odroid XU4, but I am having some trouble.
I installed lircd, loaded modules and specified an option:
$this->bbcode_second_pass_code('', '
echo "options gpioplug_ir_recv gpio_nr=24 active_low=1" >> /etc/modprobe.d/odroid-cloudshell.conf
echo "gpio-ir-recv" >> /etc/modules-load.d/ir_device.conf
echo "gpioplug-ir-recv" >> /etc/modules-load.d/ir_device.conf
')
lsmod gives me:
$this->bbcode_second_pass_code('', '
Module Size Used by
cdc_ether 4683 0
usbnet 22626 1 cdc_ether
joydev 9122 0
hid_logitech_dj 12383 0
r8152 51447 0
ina231_sensor 9052 0
s3c2410_wdt 7652 0
fb_ili9340 3608 1
ir_lirc_codec 4392 0
lirc_dev 10466 1 ir_lirc_codec
ir_mce_kbd_decoder 3258 0
ir_sony_decoder 1641 0
ir_sanyo_decoder 1636 0
ir_jvc_decoder 1614 0
ir_nec_decoder 1758 0
ir_rc6_decoder 1982 0
ir_rc5_decoder 1542 0
gpioplug_ir_recv 1343 0
gpio_ir_recv 3089 0
fbtft_device 38771 0
fbtft 33962 2 fb_ili9340,fbtft_device
syscopyarea 3033 1 fbtft
sysfillrect 3442 1 fbtft
sysimgblt 2179 1 fbtft
fb_sys_fops 1348 1 fbtft
spi_s3c64xx 14784 0
ip_tables 11987 0
')
Added a /etc/lirc/hardware.conf:
$this->bbcode_second_pass_code('', '
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="sony_test"
REMOTE_MODULES="meson-ir"
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="/etc/lircd/lircd.conf"
REMOTE_LIRCD_ARGS="--uinput"
#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
#Disable kernel support.
#Typically, lirc will disable in-kernel support for ir devices in order to
#handle them internally. Set to false to prevent lirc from disabling this
#in-kernel support.
DISABLE_KERNEL_SUPPORT="true"
#Enable lircd
START_LIRCD="true"
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"
#Try to load appropriate kernel modules
LOAD_MODULES="true"
# Default configuration files for your hardware if any
LIRCMD_CONF=""
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
')
created a .conf file for my remote using irrecorder and copied it in /etc/lirc/lircd/lircd.conf.d/sony_test.lircd.conf :
$this->bbcode_second_pass_code('', '
begin remote
name sony_test
driver devinput
bits 56
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 8
pre_data 0x2
gap 534
toggle_bit_mask 0x0
begin codes
BTN_START 0x74000001000492
KEY_REWIND 0x720000010004AE
KEY_FASTFORWARD 0x8E000001000238
KEY_STOP 0x8E000001000221
KEY_PLAY 0x7000000100023E
KEY_PAUSE 0x6C000001000496
end codes
end remote
')
Then I start the service I get :
$this->bbcode_second_pass_code('', '
lircd.service - LIRC Infrared Signal Decoder
Loaded: loaded (/usr/lib/systemd/system/lircd.service; disabled; vendor preset: disabled)
Active: active (running) since mer. 2015-11-04 17:32:11 UTC; 2s ago
Main PID: 706 (lircd)
CGroup: /system.slice/lircd.service
└─706 /usr/sbin/lircd --nodaemon
nov. 04 17:32:11 alarm systemd[1]: Started LIRC Infrared Signal Decoder.
nov. 04 17:32:11 alarm lircd-0.9.3[706]: Info: Initial device: /dev/lirc0
nov. 04 17:32:11 alarm lircd-0.9.3[706]: Info: Initial device: /dev/lirc0
nov. 04 17:32:11 alarm lircd-0.9.3[706]: Warning: Running as root
nov. 04 17:32:11 alarm lircd-0.9.3[706]: Info: Using remote: sony_test.
nov. 04 17:32:11 alarm lircd-0.9.3[706]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd
nov. 04 17:32:11 alarm lircd[706]: lircd-0.9.3[706]: Warning: Running as root
nov. 04 17:32:11 alarm lircd[706]: lircd-0.9.3[706]: Info: Using remote: sony_test.
nov. 04 17:32:11 alarm lircd[706]: lircd-0.9.3[706]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd
')
But when I want to check if my remote is working using irw, there is no output to the terminal and 2 lines are added in the status of lircd.service:
$this->bbcode_second_pass_code('', '
nov. 04 17:32:29 alarm lircd-0.9.3[706]: Info: removed client
nov. 04 17:32:29 alarm lircd-0.9.3[706]: Info: closing '/dev/lirc0'
nov. 04 17:32:29 alarm lircd[706]: lircd-0.9.3[706]: Info: removed client
nov. 04 17:32:29 alarm lircd[706]: lircd-0.9.3[706]: Info: closing '/dev/lirc0'
')
I think they don't appear until I call irw.
By messing around a bit with configuration files, I get a 'error reading /dev/lirc0' sometimes but nothing more.
I noticed the driver used by irrecord is devinput so I use that instead of default in hardware.conf.
Lastly, I noticed that cat /proc/bus/input/devices gives:
$this->bbcode_second_pass_code('', '
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio_keys.7"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/gpio_keys.7/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio_ir_recv"
P: Phys=gpio_ir_recv/input0
S: Sysfs=/devices/platform/gpio-rc-recv/rc/rc0/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=100013
B: KEY=1000000 0 0 0 0
B: MSC=10
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="MCE IR Keyboard/Mouse (gpio-rc-recv)"
P: Phys=/input0
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=sysrq kbd mouse0 event2
B: PROP=0
B: EV=100017
B: KEY=30000 0 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: REL=3
B: MSC=10
')
so the remote seems to be detected as a keyboard I guess ? I don't know if it is relevant, but I am not using X.
Any idea why I can't get lirc to work ? It would be much appreciated.