Re: IR Toy does not work with new kernel - no /dev/ttyACM0

Sean Young <[email protected]> Tue, 10 Aug 2021 15:34:37 +0100
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
Hi Matthew,

On Tue, Aug 10, 2021 at 08:52:37AM -0500, Matthew Ward via LIRC-list wrote:
> as of the latest Raspberry Pi (buster) set up updates, it seems that the
> character device - /dev/ttyACM0 - has disappeared!
> 
> it seems tangled up in some lirc stuff - yet i have NO lirc software
> installed on the system i'm testing the new updates on!  this test system is
> a base install of the OS; no extras including lircd.
> 
> before the update, i see:
> 
> $ uname -rv
> 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020
> 
> $ ls -al /dev | egrep -i 'irc|yac|yam|usb|ttys|serial'
> drwxr-xr-x 4 root root 80 Aug 9 13:24 serial
> lrwxrwxrwx 1 root root 7 Aug 9 13:24 serial0 -> ttyAMA0
> lrwxrwxrwx 1 root root 5 Aug 9 13:24 serial1 -> ttyS0
> crw-rw---- 1 root dialout 166, 0 Aug 9 13:24 ttyACM0
> crw--w---- 1 root tty 204, 64 Aug 9 13:24 ttyAMA0
> crw-rw---- 1 root dialout 4, 64 Aug 9 13:24 ttyS0
> drwxr-xr-x 2 root root 60 Aug 9 13:24 usb
> 
> but after the update:
> 
> $ uname -rv
> 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021
> 
> $ ls -al /dev | egrep -i 'irc|yac|yam|usb|ttys|serial'
> crw-rw---- 1 root video 251, 0 Aug 9 18:53 lirc0
> lrwxrwxrwx 1 root root 7 Aug 9 18:53 serial1 -> ttyAMA0
> crw-rw---- 1 root dialout 204, 64 Aug 9 18:53 ttyAMA0
> drwxr-xr-x 2 root root 60 Aug 9 18:53 usb

There is a new driver ir_toy driver for kernel v5.9 and later. 

Note you have /dev/lirc0 here rather than /dev/ttyACM0.

> dmesg shows some activity, discovering my IR Toy:
> 
> [ 2.344697] usb 1-1.1: new full-speed USB device number 3 using xhci_hcd
> [ 2.495156] usb 1-1.1: New USB device found, idVendor=04d8, idProduct=fd08,
> bcdDevice= 0.02
> [ 2.498236] usb 1-1.1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 2.501170] usb 1-1.1: Product: CDC Test
> [ 2.504112] usb 1-1.1: Manufacturer: Dangerous Prototypes
> [ 2.507168] usb 1-1.1: SerialNumber: 00000055
> [ 5.231542] usbcore: registered new interface driver cdc_acm
> [ 5.231563] cdc_acm: USB Abstract Control Model driver for USB modems and
> ISDN adapters
> [ 5.258551] ir_toy 1-1.1:1.1: version: hardware 2, firmware 22, protocol 1
> [ 5.258638] Registered IR keymap rc-rc6-mce
> [ 5.283595] IR RC6 protocol handler initialized
> [ 5.325606] rc rc0: Infrared Toy as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/rc/rc0
> [ 5.326305] rc rc0: lirc_dev: driver ir_toy registered at minor = 0, raw IR
> receiver, raw IR transmitter
> [ 5.327236] input: Infrared Toy as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/rc/rc0/input5
> [ 5.591384] usbcore: registered new interface driver ir_toy
> 
> but it seems to be setting up for some lirc (or something called "rc" ?) key
> mapping.
> 
> something to control the Pi with using IR? i've seen folks set that up with
> their IR devices to control their Raspberry Pi; as a media center. but i use
> mine as an IR "blaster".
> 
> in trying to debug this, i have kept the lircd software NOT installed yet on
> the Pi to try to find out where the ACM0 device is disappearing to.
> 
> if it's MOVED - fine - just tell me the new name for the device.

It's not moved, it's a kernel lirc driver. Rather than serial tty there is
an lirc chardev.

> is this a kernel issue?  or a *NEW* *IMPROVED* configuration item?

So what IR are you sending and how are you doing it with the old kernel? I
can help you set it up.

You can send IR using the ir-ctl command line tool or the lircd daemon plus
irsend command line tool.


Sean