[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with card reader on Debian 11



On Sat, Nov 12, 2022 at 09:38:34AM +0100, Claudia Neumann wrote:
> Am Freitag, 11. November 2022, 19:37:08 CET schrieb tomas@tuxteam.de:
> > On Fri, Nov 11, 2022 at 04:38:21PM +0100, Claudia Neumann wrote:
> > > Hi Tomas,
> > > 
> Hi Tomas,
> 
> I did as you said. You find the results in the attachments. 
> 
> There is a differenz in udev behaviour on inserting the device. Perhaps it is this Flexocard 
> identification. The device I am using is not a Flexocard device. I don't know if there is a 
> relation between Zemo, the manufacturer of the VML-GK2, and Flexocard. 

Oh, that is interesting: either Zenmo has a Flexocard "heart" or
they are squatting on their IDs (that would be improbable, but not
completely unheard of).

> How can I get rid of that Flexocard configuration? 
> 
> I tried 
> stty -F /fev/ttyACM0 115200 parenb -parodd -cstopb
> which was used in the old times on /dev/ttyS0. But that did not change anything. So it 
> seems to be something with udev??

The way it usually works is that the kernel logs events (new device
added, removed, etc.) on a socket and the udev daemon listens on them
and takes any actions (like loading a kernel module, starting a
user space program, changing inode permissions, etc).

I'll assume this is Debian 11:

> root@Mediondebn:~# udevadm monitor
> monitor will print the received events for:
> UDEV - the event which udev sends out after rule processing
> KERNEL - the kernel uevent
> 
> KERNEL[2035.060329] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> KERNEL[2035.067291] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> KERNEL[2035.067318] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[2035.067352] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> UDEV  [2035.079950] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> UDEV  [2035.082479] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[2035.088880] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[2035.088911] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> KERNEL[2035.088951] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> KERNEL[2035.088970] add      /bus/usb/drivers/cdc_acm (drivers)
> KERNEL[2035.088983] add      /module/cdc_acm (module)
> UDEV  [2035.089029] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> UDEV  [2035.089748] add      /bus/usb/drivers/cdc_acm (drivers)
> UDEV  [2035.090184] add      /module/cdc_acm (module)
> UDEV  [2035.093556] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> UDEV  [2035.094826] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> UDEV  [2035.095798] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> UDEV  [2035.096868] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> 
> No message on lsof | grep ttyACM

> root@Mediondebn:~# stty -a < /dev/ttyACM0
> speed 9600 baud; rows 0; columns 0; line = 0;
[...]

and this Debian 10:

> root@Mediondebn:~# udevadm monitor
> monitor will print the received events for:
> UDEV - the event which udev sends out after rule processing
> KERNEL - the kernel uevent
> 
> KERNEL[145.449225] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> KERNEL[145.450616] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> KERNEL[145.450776] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> KERNEL[145.450800] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> KERNEL[145.450821] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[145.450844] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[145.450867] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> UDEV  [145.454702] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> UDEV  [145.455832] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> UDEV  [145.456187] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> UDEV  [145.456878] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1 (usb)
> UDEV  [145.457303] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> UDEV  [145.458222] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)
> UDEV  [145.462165] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-4 (usb)
> 
> No message on lsof | grep ttyACM0
> 
> root@Mediondebn:~# stty -a < /dev/ttyACM0
> speed 9600 baud; rows 0; columns 0; line = 0;

The main difference seems to be that the first (which I assume to
be Debian 11) adds the kernel module `cdc_acm'. To see whether this
is what makes the difference, you might try `sudo rmmod cdc_acm'
(and double-check with `sudo lsmod | grep cdc_acm'). To be extra
sure, may be try this on both installations and note the differences.

If that is successful, the next step would be to tell udev to stop
loading that module. But first steps first :)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: