* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
@ 2022-04-15 0:51 ` github-actions
2022-05-18 20:18 ` Anachron
` (16 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: github-actions @ 2022-04-15 0:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1099749380
Comment:
Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (16 preceding siblings ...)
2023-01-20 7:45 ` Anachron
@ 2023-01-20 14:03 ` zdykstra
17 siblings, 0 replies; 18+ messages in thread
From: zdykstra @ 2023-01-20 14:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
New comment by zdykstra on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1398438046
Comment:
Much to my disappointment, that's right. The remote doesn't speak any of the IR protocols that the devinput layer supports.
`ir-keytable -v -t -p rc-5,rc-5-sz,jvc,sony,nec,sanyo,mce_kbd,rc-6,sharp,xmp,imon,rc-mm`
I had to use LIRC to make a custom remote protocol, where it can discover the gaps between pulses, how they're terminated, etc. It's a remote for a piece of stereo equipment.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (15 preceding siblings ...)
2023-01-20 7:44 ` Anachron
@ 2023-01-20 7:45 ` Anachron
2023-01-20 14:03 ` zdykstra
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2023-01-20 7:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1398022684
Comment:
@zdykstra are you saying that even with a custom keymap your device cannot be used?
I'm curious now, what type of device are you using?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (14 preceding siblings ...)
2023-01-19 23:14 ` zdykstra
@ 2023-01-20 7:44 ` Anachron
2023-01-20 7:45 ` Anachron
2023-01-20 14:03 ` zdykstra
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2023-01-20 7:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1398022684
Comment:
@zdykstra are you saying that even with a custom keymap your device cannot be used?
I'm curious now, what type of device are you using?
Hint for the googlers:
`/usr/lib/udev/rc_keymaps/` is the new path to the `rc_keymap`s now.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (13 preceding siblings ...)
2022-05-19 10:38 ` Anachron
@ 2023-01-19 23:14 ` zdykstra
2023-01-20 7:44 ` Anachron
` (2 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: zdykstra @ 2023-01-19 23:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
New comment by zdykstra on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1397730950
Comment:
I'm a bit late here, but I've started packaging `lirc` in https://github.com/zdykstra/void-packages/tree/lirc/srcpkgs/lirc . I've gone this route because the remote I want to use is unsupported by the devinput layer, so I had to create a custom profile with `irrecord`. The package has only been tested on `x86_64`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (12 preceding siblings ...)
2022-05-19 10:34 ` Anachron
@ 2022-05-19 10:38 ` Anachron
2023-01-19 23:14 ` zdykstra
` (3 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 10:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5344 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys "manually".
I have a [Pine64 IR Remote](https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/) which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.local` or similiar to automate this on boot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (11 preceding siblings ...)
2022-05-19 10:33 ` Anachron
@ 2022-05-19 10:34 ` Anachron
2022-05-19 10:38 ` Anachron
` (4 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 10:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5513 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys "manually".
I have a [Pine64 IR Remote](https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/) which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.local` or similiar to automate this on boot.
Edit:
This should suffice inside `/boot/config.txt` (Replaces Part 3)
```
dtoverlay=gpio-ir,gpio_pin=17,gpio_pull=1,rc-map-name=<keymap file for your remote>
```
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (10 preceding siblings ...)
2022-05-19 10:08 ` Anachron
@ 2022-05-19 10:33 ` Anachron
2022-05-19 10:34 ` Anachron
` (5 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 10:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5495 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys "manually".
I have a [Pine64 IR Remote](https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/) which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.local` or similiar to automate this on boot.
Edit:
This should suffice inside `/boot/config.txt`
```
dtoverlay=gpio-ir,gpio_pin=17,gpio_pull=1,rc-map-name=<keymap file for your remote>
```
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (9 preceding siblings ...)
2022-05-19 10:07 ` Anachron
@ 2022-05-19 10:08 ` Anachron
2022-05-19 10:33 ` Anachron
` (6 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 10:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5344 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys "manually".
I have a [Pine64 IR Remote](https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/) which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.local` or similiar to automate this on boot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (8 preceding siblings ...)
2022-05-19 10:00 ` Anachron
@ 2022-05-19 10:07 ` Anachron
2022-05-19 10:08 ` Anachron
` (7 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 10:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5344 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys "manually".
I have a [Pine64 IR Remote[(https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/) which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.local` or similiar to automate this on boot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (7 preceding siblings ...)
2022-05-19 9:58 ` Anachron
@ 2022-05-19 10:00 ` Anachron
2022-05-19 10:07 ` Anachron
` (8 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 10:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5342 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys manually.
I have a (Pine64 IR Remote)[https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/] which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.local` or similiar to automate this on boot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (6 preceding siblings ...)
2022-05-19 9:57 ` Anachron
@ 2022-05-19 9:58 ` Anachron
2022-05-19 10:00 ` Anachron
` (9 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 9:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5341 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys manually.
I have a (Pine64 IR Remote)[https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/] which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
You can probably add the command `ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml` to `/etc/rc.conf` or similiar to automate this on boot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (5 preceding siblings ...)
2022-05-19 9:05 ` Anachron
@ 2022-05-19 9:57 ` Anachron
2022-05-19 9:58 ` Anachron
` (10 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 9:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 5198 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
Hint: Your user also needs to be inside the `input` group to use /dev/input/* devices (`usermod -aG input <USER>`).
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys manually.
I have a (Pine64 IR Remote)[https://pine64.com/product/pine64-ir-remote-with-ir-receiver-sensor/] which means I should have a file `pine64.toml` inside `/lib/udev/rc_keymaps`.
By reloading the keytable with this mappings, it should now read the events correctly.
```
# ir-keytable -c -w /lib/udev/rc_keymaps/pine64.toml
```
```
$ LC_ALL=C ir-keytable -t
Testing events. Please, press CTRL-C to abort.
784.668064: lirc protocol(necx): scancode = 0x40404d
784.668107: event type EV_MSC(0x04): scancode = 0x40404d
784.668107: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
784.668107: event type EV_SYN(0x00).
784.727063: lirc protocol(necx): scancode = 0x40404d repeat
784.727098: event type EV_MSC(0x04): scancode = 0x40404d
784.727098: event type EV_SYN(0x00).
784.856040: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
784.856040: event type EV_SYN(0x00).
```
Success! It now prints `key_down` and `key_up` events for the remote.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (4 preceding siblings ...)
2022-05-19 8:33 ` Anachron
@ 2022-05-19 9:05 ` Anachron
2022-05-19 9:57 ` Anachron
` (11 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 9:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 4131 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
Based on https://www.instructables.com/Setup-IR-Remote-Control-Using-LIRC-for-the-Raspber/
one needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
(Part 3)
As per https://mauricius.dev/configure-an-infrared-remote-control-with-linux/
we now need to map the events to the correct keys manually.
(to be continued)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (3 preceding siblings ...)
2022-05-19 7:04 ` Anachron
@ 2022-05-19 8:33 ` Anachron
2022-05-19 9:05 ` Anachron
` (12 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 8:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 3865 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
One needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
(Part 2)
`/usr/share/lirc/contrib/60-lirc.rules` contains:
```
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660"
```
Adding lirc group: `groupadd lirc`
Reloading udev:
```sh
# udevadm control -R
# udevadm trigger
```
Checking permissions:
```sh
# ls -lisah /dev/lirc0
164 0 crw-rw---- 1 root lirc 251, 0 19. Mai 10:26 /dev/lirc0
```
Adding group to user: `usermod -aG lirc <USER>`
(Logging out & in)
Checking groups:
```sh
$ groups
... lirc
```
Check features with normal user:
```
$ LC_ALL=C ir-ctl --features
Receive features /dev/lirc0:
- Device can receive raw IR
- Can report decoded scancodes and protocol
- Receiving timeout 12664 microseconds
- Can set receiving timeout min 1 microseconds, max 1250000 microseconds
Send features /dev/lirc0:
- Device cannot send
```
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
` (2 preceding siblings ...)
2022-05-19 7:03 ` Anachron
@ 2022-05-19 7:04 ` Anachron
2022-05-19 8:33 ` Anachron
` (13 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 7:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 3013 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
One needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
```
LC_ALL=C ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm
Can't find xbox-dvd bpf protocol in /etc/rc_keymaps/protocols or /usr/lib/udev/rc_keymaps/protocols
Testing events. Please, press CTRL-C to abort.
623.497051: lirc protocol(necx): scancode = 0x404008 repeat
623.497098: event type EV_MSC(0x04): scancode = 0x404008
623.497098: event type EV_SYN(0x00).
624.302063: lirc protocol(necx): scancode = 0x404010
624.302096: event type EV_MSC(0x04): scancode = 0x404010
624.302096: event type EV_SYN(0x00).
624.361055: lirc protocol(necx): scancode = 0x404010 repeat
624.361088: event type EV_MSC(0x04): scancode = 0x404010
624.361088: event type EV_SYN(0x00).
624.867071: lirc protocol(necx): scancode = 0x40400b
624.867102: event type EV_MSC(0x04): scancode = 0x40400b
624.867102: event type EV_SYN(0x00).
624.926056: lirc protocol(necx): scancode = 0x40400b repeat
624.926090: event type EV_MSC(0x04): scancode = 0x40400b
624.926090: event type EV_SYN(0x00).
625.408074: lirc protocol(necx): scancode = 0x40400e
625.408103: event type EV_MSC(0x04): scancode = 0x40400e
625.408103: event type EV_SYN(0x00).
625.467074: lirc protocol(necx): scancode = 0x40400e repeat
625.467109: event type EV_MSC(0x04): scancode = 0x40400e
625.467109: event type EV_SYN(0x00).
```
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
2022-04-15 0:51 ` LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO github-actions
2022-05-18 20:18 ` Anachron
@ 2022-05-19 7:03 ` Anachron
2022-05-19 7:04 ` Anachron
` (14 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-19 7:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1131306568
Comment:
Turns out v4l is used nowadays for IR communication, the package should already be installed (`v4l-utils`).
One needs to add the following options to /boot/config.txt:
```
dtoverlay=gpio-ir,gpio_pin=17
```
Where gpio_pin is the Pin used for communication with the IR.
Example: https://miro.medium.com/max/1400/1*A2gpUDLyOx903dVUStHFTA.jpeg
I've connected mine to the GPIO number 17, so that's what I enabled.
Reboot, then you have /dev/lirc0 and can run `# rc-keytable` and receive:
```
# LC_ALL=C ir-keytable
Found /sys/class/rc/rc1/ with:
Name: vc4
Driver: cec
Default keymap: rc-cec
Input device: /dev/input/event1
Supported kernel protocols: cec
Enabled kernel protocols: cec
bus: 30, vendor/product: 0000:0000, version: 0x0001
Repeat delay = 0 ms, repeat period = 125 ms
Found /sys/class/rc/rc0/ with:
Name: gpio_ir_recv
Driver: gpio_ir_recv
Default keymap: rc-rc6-mce
Input device: /dev/input/event0
LIRC device: /dev/lirc0
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
```
Now you can test your remote via `sudo ir-keytable -c -p all -t`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
2022-04-15 0:51 ` LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO github-actions
@ 2022-05-18 20:18 ` Anachron
2022-05-19 7:03 ` Anachron
` (15 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: Anachron @ 2022-05-18 20:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/10905#issuecomment-1130495144
Comment:
Can this be reopened? I'm facing the same issue. Trying to attach an IR receiver on my RPI 3 B+ but it seems like [lirc](https://www.lirc.org/) is not packaged yet? Is there a replacement that I can use for now?
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-01-20 14:03 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-10905@inbox.vuxu.org>
2022-04-15 0:51 ` LIRC on RPi 3 B+ does not work with IR receivers connected via GPIO github-actions
2022-05-18 20:18 ` Anachron
2022-05-19 7:03 ` Anachron
2022-05-19 7:04 ` Anachron
2022-05-19 8:33 ` Anachron
2022-05-19 9:05 ` Anachron
2022-05-19 9:57 ` Anachron
2022-05-19 9:58 ` Anachron
2022-05-19 10:00 ` Anachron
2022-05-19 10:07 ` Anachron
2022-05-19 10:08 ` Anachron
2022-05-19 10:33 ` Anachron
2022-05-19 10:34 ` Anachron
2022-05-19 10:38 ` Anachron
2023-01-19 23:14 ` zdykstra
2023-01-20 7:44 ` Anachron
2023-01-20 7:45 ` Anachron
2023-01-20 14:03 ` zdykstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).