Skip to content

Instantly share code, notes, and snippets.

@mnalis
Last active March 21, 2024 19:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnalis/2fed42a1abf8e98f45f6edf162bf609f to your computer and use it in GitHub Desktop.
Save mnalis/2fed42a1abf8e98f45f6edf162bf609f to your computer and use it in GitHub Desktop.
RaspberryPI IrToy - restore /dev/ttyACM0 interface in newer kernels
cd /lib/modules/`uname -r`/kernel/drivers && \
mv -n media/rc/ir_toy.ko media/rc/ir_toy.ko.DISABLED && \
mv -n usb/class/cdc-acm.ko usb/class/cdc-acm.ko.DISABLED && \
env -i sed -e 's/\xd8\x04\x08\xfd/\xff\x04\x08\xfd/' < usb/class/cdc-acm.ko.DISABLED > usb/class/cdc-acm.ko && \
depmod -a
# reboot after doing the change.
#
# This changes blacklisting of USB ID `04d8:fd08` in cdc-acm, so IrToy gets recognized
# as it was in previous kernel versions, and `/dev/ttyACM0` gets created for it instead of `/dev/lirc0`
# For those who don't use lirc but IrToy directly and so need compatibility with that...
#
# works at least in Raspbian.org Buster raspberrypi-kernel 1:1.20211029-1~buster armhf
@JoKr4
Copy link

JoKr4 commented Jul 11, 2022

just decompress and apply the script, no need to compress again

works fine on 5.10.92-2-rpi-legacy-ARCH

thanks for sharing!

@primalmotion
Copy link

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment