OpenELEC:~ # modprobe lirc_rpi debug=1 OpenELEC:~ # cat /sys/kernel/debug/gpio GPIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835: gpio-35 (led1 ) in lo gpio-47 (led0 ) out lo OpenELEC:~ # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 16: 0 0 0 0 ARMCTRL 16 bcm2708_fb dma 24: 98 0 0 0 ARMCTRL 24 DMA IRQ 25: 1539 0 0 0 ARMCTRL 25 DMA IRQ 32: 390117 0 0 0 ARMCTRL 32 dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1 49: 0 0 0 0 ARMCTRL 49 3f200000.gpio:bank0 50: 0 0 0 0 ARMCTRL 50 3f200000.gpio:bank1 65: 30 0 0 0 ARMCTRL 65 ARM Mailbox IRQ 66: 290877 0 0 0 ARMCTRL 66 VCHIQ doorbell 75: 1 0 0 0 ARMCTRL 75 84: 6518 0 0 0 ARMCTRL 84 mmc0 99: 65543 47405 39193 57753 ARMCTRL 99 arch_timer 497: 0 0 0 0 pinctrl-bcm2835 17 lirc_rpi FIQ: usb_fiq IPI0: 0 0 0 0 CPU wakeup interrupts IPI1: 0 0 0 0 Timer broadcast interrupts IPI2: 16388 33373 85486 101209 Rescheduling interrupts IPI3: 1 4 6 5 Function call interrupts IPI4: 2 1 2 6 Single function call interrupts IPI5: 0 0 0 0 CPU stop interrupts IPI6: 0 0 0 0 IRQ work interrupts IPI7: 0 0 0 0 completion interrupts Err: 0 OpenELEC:~ # dmesg | grep -i lirc [ 5.898084] lirc_dev: IR Remote Control driver registered, major 248 [ 5.925459] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned. [ 6.822622] lirc_rpi: auto-detected active high receiver on GPIO pin 17 [ 6.823177] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0 [ 6.823195] lirc_rpi: driver registered! [ 7.268732] input: lircd as /devices/virtual/input/input3 OpenELEC:~ # lsmod | grep irc lirc_rpi 5982 3 lirc_dev 7578 1 lirc_rpi rc_core 14603 1 lirc_dev |
mount -t debugfs debugfs /sys/kernel/debug cat /sys/kernel/debug/gpio The output should be something like this (you should see two gpio pins allocated to the lirc_rpi driver): GPIOs 0-53, bcm2708_gpio: gpio-16 (led0 ) out hi gpio-17 (lirc_rpi ir/out ) in lo gpio-18 (lirc_rpi ir/in ) in hi Check dmesg after loading the module with the debug parameter. modprobe lirc_rpi debug=1 lirc_dev: IR Remote Control driver registered, major 252 lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned. lirc_rpi lirc_rpi.0: lirc_dev: driver lirc_rpi registered at minor = 0 lirc_rpi: driver registered! lirc_rpi: is_right_chip bcm2708_gpio 0 lirc_rpi: to_irq 103 lirc_rpi: auto-detected active low receiver on GPIO pin 18 Run irw then check if the module succesfuly requested an irq. cat /proc/interrupts CPU0 3: 88963 ARMCTRL BCM2708 Timer Tick 52: 3251 ARMCTRL BCM2708 GPIO catchall handler 65: 2 ARMCTRL ARM Mailbox IRQ 66: 1 ARMCTRL VCHIQ doorbell 75: 51434882 ARMCTRL dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1 77: 223 ARMCTRL bcm2708_sdhci (dma) 83: 24 ARMCTRL uart-pl011 84: 7123 ARMCTRL mmc0 103: 3251 GPIO lirc_rpi |
OpenELEC:~ # mode2 -d /dev/lirc0
mode2: could not open /dev/lirc0
mode2: default_init(): Device or resource busy
[링크 : http://aron.ws/projects/lirc_rpi/openelec_howto.html]
+2015.04.28
gpio -g write 16 1 dtoverlay=lirc-rpi,gpio_out_pin=16,gpio_in_pin=17,debug=on dtoverlay=lirc-rpi,gpio_out_pin=25,gpio_in_pin=18 [링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=99085] |
File: lirc-rpi-overlay.dtb Info: Configures lirc-rpi (Linux Infrared Remote Control for Raspberry Pi) Consult the module documentation for more details. Load: dtoverlay=lirc-rpi,<param>=<val>,... Params: gpio_out_pin GPIO pin for output (default "17") gpio_in_pin GPIO pin for input (default "18") gpio_in_pull Pull up/down/off on the input pin (default "down") sense Override the IR receive auto-detection logic: "1" = force active high "0" = force active low "-1" = use auto-detection (default "-1") softcarrier Turn the software carrier "on" or "off" (default "on") invert "on" = invert the output pin (default "off") debug "on" = enable additional debug messages (default "off") [링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97314] |
+ 2015.04.28
config.txt
dtoverlay=lirc-rpi,gpio_in_pin=18,debug=on
OpenELEC:~ # dmesg | grep -i lirc
[ 5.656942] lirc_dev: IR Remote Control driver registered, major 248
[ 5.703156] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.705297] lirc_rpi: to_irq 498
[ 6.595845] lirc_rpi: auto-detected active high receiver on GPIO pin 18
[ 6.596240] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[ 6.596255] lirc_rpi: driver registered!
[ 6.769256] input: lircd as /devices/virtual/input/input0
[ 7.791546] lirc_rpi: Interrupt 498 obtained
[ 7.791573] lirc_rpi: in init_timing_params, freq=38000 pulse=13157, space=13158
OpenELEC:~ # modprobe lirc_rpi debug=1
OpenELEC:~ # cat /sys/kernel/debug/gpio
GPIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835:
gpio-35 (led1 ) in lo
gpio-47 (led0 ) out lo
OpenELEC:~ # cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
16: 0 0 0 0 ARMCTRL 16 bcm2708_fb dma
24: 42 0 0 0 ARMCTRL 24 DMA IRQ
25: 1532 0 0 0 ARMCTRL 25 DMA IRQ
32: 22278 0 0 0 ARMCTRL 32 dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
49: 0 0 0 0 ARMCTRL 49 3f200000.gpio:bank0
50: 0 0 0 0 ARMCTRL 50 3f200000.gpio:bank1
65: 32 0 0 0 ARMCTRL 65 ARM Mailbox IRQ
66: 46149 0 0 0 ARMCTRL 66 VCHIQ doorbell
75: 1 0 0 0 ARMCTRL 75
84: 5845 0 0 0 ARMCTRL 84 mmc0
99: 8864 7960 6038 4639 ARMCTRL 99 arch_timer
498: 0 0 0 0 pinctrl-bcm2835 18 lirc_rpi
FIQ: usb_fiq
IPI0: 0 0 0 0 CPU wakeup interrupts
IPI1: 0 0 0 0 Timer broadcast interrupts
IPI2: 14513 40888 8299 7798 Rescheduling interrupts
IPI3: 2 4 5 2 Function call interrupts
IPI4: 1 5 0 1 Single function call interrupts
IPI5: 0 0 0 0 CPU stop interrupts
IPI6: 1 0 0 0 IRQ work interrupts
IPI7: 0 0 0 0 completion interrupts
Err: 0
'embeded > raspberry pi' 카테고리의 다른 글
라즈베리 파이 2 - openelec 디바이스 트리 덤프 (0) | 2015.04.29 |
---|---|
라즈베리 파이 2 initramfs 커널패닉 해결!! (0) | 2015.04.28 |
라즈베리 파이 2 - 적외선 수신기... -_- (0) | 2015.04.24 |
라즈베리 파이 2 - 늘솜 GPIO 확장보드 손보기 (0) | 2015.04.23 |
라즈베리 파이 2 / kodi helix / ir receiver (0) | 2015.04.22 |