Infared Reciever w/ Alpine on the Bulldozer Datto: Difference between revisions
No edit summary |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 30: | Line 30: | ||
Figured out LIRC, on alpine the config is in <code>/usr/etc/lirc/</code> | Figured out LIRC, on alpine the config is in <code>/usr/etc/lirc/</code> | ||
first we need to install it: | |||
apk install lirc | apk install lirc | ||
Line 74: | Line 75: | ||
Make a folder called lircd.conf.d, place this file inside: https://kirbfeels.gianluccapirovano.com/library/ArchivalPurposes/wiki-files/infared%20project/BN59-01175B.lircd.conf | Make a folder called lircd.conf.d, place this file inside: https://kirbfeels.gianluccapirovano.com/library/ArchivalPurposes/wiki-files/infared%20project/BN59-01175B.lircd.conf | ||
(you can get additional remote configs [https://lirc-remotes.sourceforge.net/remotes-table.html here]) | |||
lirc will detect the file automatically when it is opened | lirc will detect the file automatically when it is opened | ||
Now we need to run lirc daemon: <code>lircd</code> | Now we need to run lirc daemon: <code>lircd</code> | ||
below is a script that will allow you to execute bash commands based on remote presses, taking advantage of <code>irw</code>'s output: | |||
#!/bin/bash | |||
irw | | |||
while | |||
read; | |||
do | |||
if echo "$REPLY" | fgrep "01 KEY_0"; then echo "this is button 0"; fi | |||
if echo "$REPLY" | fgrep "01 KEY_1"; then echo "this is button 1"; fi | |||
if echo "$REPLY" | fgrep "01 KEY_2"; then echo "this is button 2"; fi | |||
if echo "$REPLY" | fgrep "00 KEY_3"; then echo "this is button 3"; fi | |||
done |
Latest revision as of 02:56, 10 September 2024
Had some issues with the bootloader after installing alpine originally, ended up using ventoy's "Local Boot" option to get into my alpine install and then manually installed grub using:
grub-install
Now we need to get wifi working: [1]
vim /etc/apk/repositories
and uncomment the community repo
We'll be needing these packages:
apk add networkmanager networkmanager-wifi wpa_supplicant networkmanager-tui networkmanager-cli
Networkmanager needs udev to work for wifi:
setup-devd udev
Getting infared working:
Looks like alpine has some infared tools in a package called:
v4l-utils
and ir_keytable
ir-ctl -d /dev/lirc0 -r
running this gets me data when i click ir buttons on some remotes
Figured out LIRC, on alpine the config is in /usr/etc/lirc/
first we need to install it:
apk install lirc
lirc_options.conf:
# These are the default options to lircd, if installed as # /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8) # manpages for info on the different options. # # Some tools including mode2 and irw uses values such as # driver, device, plugindir and loglevel as fallback values # in not defined elsewhere. [lircd] nodaemon = True driver = default device = auto output = /var/run/lirc/lircd pidfile = /var/run/lirc/lircd.pid plugindir = /usr/lib/lirc/plugins permission = 666 allow-simulate = No repeat-max = 600 #effective-user = #listen = [address:]port #connect = host[:port] #loglevel = 6 #release = true #release_suffix = _EVUP #logfile = ... #driver-options = ... [lircmd] uinput = False nodaemon = False # [modinit] # code = /usr/sbin/modprobe lirc_serial # code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput # code2 = ... # [lircd-uinput] # add-release-events = False # release-timeout = 200 # release-suffix = _EVUP
Make a folder called lircd.conf.d, place this file inside: https://kirbfeels.gianluccapirovano.com/library/ArchivalPurposes/wiki-files/infared%20project/BN59-01175B.lircd.conf
(you can get additional remote configs here)
lirc will detect the file automatically when it is opened
Now we need to run lirc daemon: lircd
below is a script that will allow you to execute bash commands based on remote presses, taking advantage of irw
's output:
#!/bin/bash irw | while read; do if echo "$REPLY" | fgrep "01 KEY_0"; then echo "this is button 0"; fi if echo "$REPLY" | fgrep "01 KEY_1"; then echo "this is button 1"; fi if echo "$REPLY" | fgrep "01 KEY_2"; then echo "this is button 2"; fi if echo "$REPLY" | fgrep "00 KEY_3"; then echo "this is button 3"; fi done