Last active
March 21, 2024 19:13
-
-
Save mnalis/2fed42a1abf8e98f45f6edf162bf609f to your computer and use it in GitHub Desktop.
RaspberryPI IrToy - restore /dev/ttyACM0 interface in newer kernels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Thanks for that.
I can confirm that it works on x86_64 Ubuntu with kernel 5.15
Cheers!
For kernel with .gz compressed module, do I just need to decompress the module first, perform the sed command and then re-gz it?
@matejdro I've never used compressed kernel modules, but yes, I assume it should work just like you described.
For kernel with .gz compressed module, do I just need to decompress the module first, perform the sed command and then re-gz it?
Did you ever try this? I'm facing this issue on Arch where the modules are packed as xz files.
just decompress and apply the script, no need to compress again
works fine on 5.10.92-2-rpi-legacy-ARCH
thanks for sharing!
thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for automation, see https://gist.github.com/mnalis/9c54023ec5067d6a72d43f2771d0b747