Re: Problem with card reader on Debian 11

2022-11-20 Thread Curt
On 2022-11-20, Claudia Neumann  wrote:
>
> I read the answer in stackoverflow, but I don't know how I should implement 
> it with /dev/
> ttyACM0.
>

There appears to be a Debian package that contains a utility to read the
German Gesundheitkarte (/usr/bin/egk-tool); maybe du solltest take a gander
at the code (oder something).

https://packages.debian.org/bullseye/opensc

Perhaps you're already aware of all this.



Re: Problem with card reader on Debian 11

2022-11-20 Thread Claudia Neumann
Hi again,

I read the answer in stackoverflow, but I don't know how I should implement it 
with /dev/
ttyACM0.

I don't initiate oder configure /dev/ttyACM0. Ich send my request to the device 
and the
device answers. How would I configure it to answer with 256 Bytes?

Best regards

Claudia

Am Montag, 14. November 2022, 19:19:03 CET schrieb to...@tuxteam.de:
> [CC'ing Claudia per her own wish]
>
> On Sun, Nov 13, 2022 at 04:34:30PM -, Curt wrote:
> > On 2022-11-12, to...@tuxteam.de  wrote:
> > > If that is successful, the next step would be to tell udev to stop
> > > loading that module. But first steps first :)
> >
> > There is an oddly analogous thread (but maybe 64 bytes from ttyacm0 is a
> > thing) below from way back when that incriminates the code, which
> > probably won't be helpful (but we have so many electrons there's really
> > no use being frugal about them):
> >
> > https://stackoverflow.com/questions/18288839/ttyacm0-only-reads-64-bytes
>
> Looks similar, yes. I didn't have the time to dive more into it, may
> be later.
>
> Thanks for the pointer
>
> cheers
> --
> t




Re: Problem with card reader on Debian 11

2022-11-14 Thread tomas
[CC'ing Claudia per her own wish]

On Sun, Nov 13, 2022 at 04:34:30PM -, Curt wrote:
> On 2022-11-12, to...@tuxteam.de  wrote:
> >
> > If that is successful, the next step would be to tell udev to stop
> > loading that module. But first steps first :)
> >
> 
> There is an oddly analogous thread (but maybe 64 bytes from ttyacm0 is a
> thing) below from way back when that incriminates the code, which
> probably won't be helpful (but we have so many electrons there's really
> no use being frugal about them):
> 
> https://stackoverflow.com/questions/18288839/ttyacm0-only-reads-64-bytes

Looks similar, yes. I didn't have the time to dive more into it, may
be later.

Thanks for the pointer

cheers
-- 
t


signature.asc
Description: PGP signature


Re: Problem with card reader on Debian 11

2022-11-14 Thread tomas
On Sat, Nov 12, 2022 at 02:14:25PM +0100, Claudia Neumann wrote:
> Hi Tomas,
> 
> mmh, may be it has something to do with cdc_acm.

[...]

Possibly. But if there is no module, there is no ttyACM0, and you need
that :-)

I am sorry I have to postpone things a bit. I'm flooded at the moment,
but might have a look at it this weekend.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Problem with card reader on Debian 11

2022-11-13 Thread Curt
On 2022-11-12, to...@tuxteam.de  wrote:
>
> If that is successful, the next step would be to tell udev to stop
> loading that module. But first steps first :)
>

There is an oddly analogous thread (but maybe 64 bytes from ttyacm0 is a
thing) below from way back when that incriminates the code, which
probably won't be helpful (but we have so many electrons there's really
no use being frugal about them):

https://stackoverflow.com/questions/18288839/ttyacm0-only-reads-64-bytes



Re: Problem with card reader on Debian 11

2022-11-12 Thread Claudia Neumann
Hi Tomas,

mmh, may be it has something to do with cdc_acm.

On Debian 10, where the reading is okay, cdc_acm is inserted in the kernel if I 
insert the
device.

If I 'rmmod cdc_acm' the /dev/ttyACM0 disappears und so I cannot read from the 
device.

Perhaps I have to deactivate the registration of 1f61:0001?

Best regards

Claudia

Am Samstag, 12. November 2022, 11:01:42 CET schrieb to...@tuxteam.de:
> On Sat, Nov 12, 2022 at 09:38:34AM +0100, Claudia Neumann wrote:
> > Am Freitag, 11. November 2022, 19:37:08 CET schrieb to...@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/pci:00/:00:14.0/usb1/1-4
> > (usb) KERNEL[2035.067291] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 (usb)
> > KERNEL[2035.067318] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> > KERNEL[2035.067352] bind /devices/pci:00/:00:14.0/usb1/1-4
> > (usb) UDEV  [2035.079950] add
> > /devices/pci:00/:00:14.0/usb1/1-4 (usb) UDEV  [2035.082479] add
> >/devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> > KERNEL[2035.00] bind
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> > KERNEL[2035.088911] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> > KERNEL[2035.088951] bind
> > /devices/pci:00/: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/pci:00/: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/pci:00/:00:14.0/usb1/1-4
> > (usb) UDEV  [2035.094826] bind
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb) UDEV
> > [2035.095798] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty) UDEV
> > [2035.096868] bind /devices/pci:00/: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/pci:00/:00:14.0/usb1/1-4
> > (usb)
> > KERNEL[145.450616] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 (usb)
> > KERNEL[145.450776] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> > KERNEL[145.450800] bind
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 (usb)
> > KERNEL[145.450821] add
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> > KERNEL[145.450844] bind
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> > KERNEL[145.450867] bind /devices/pci:00/:00:14.0/usb1/1-4
> > (usb) UDEV  [145.454702] add
> > /devices/pci:00/:00:14.0/usb1/1-4 (usb) UDEV  [145.455832] add
> >   /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 (usb) UDEV
> > [145.456187] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1
> > (usb) UDEV  [145.456878] bind
> > /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb) UDEV


Re: Problem with card reader on Debian 11

2022-11-12 Thread tomas
On Sat, Nov 12, 2022 at 09:38:34AM +0100, Claudia Neumann wrote:
> Am Freitag, 11. November 2022, 19:37:08 CET schrieb to...@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/pci:00/:00:14.0/usb1/1-4 (usb)
> KERNEL[2035.067291] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 (usb)
> KERNEL[2035.067318] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[2035.067352] bind /devices/pci:00/:00:14.0/usb1/1-4 (usb)
> UDEV  [2035.079950] add  /devices/pci:00/:00:14.0/usb1/1-4 (usb)
> UDEV  [2035.082479] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[2035.00] bind 
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> KERNEL[2035.088911] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> KERNEL[2035.088951] bind 
> /devices/pci:00/: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/pci:00/: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/pci:00/:00:14.0/usb1/1-4 (usb)
> UDEV  [2035.094826] bind 
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 (usb)
> UDEV  [2035.095798] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> UDEV  [2035.096868] bind 
> /devices/pci:00/: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/pci:00/:00:14.0/usb1/1-4 (usb)
> KERNEL[145.450616] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 
> (usb)
> KERNEL[145.450776] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> KERNEL[145.450800] bind /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 
> (usb)
> KERNEL[145.450821] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
> (usb)
> KERNEL[145.450844] bind /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
> (usb)
> KERNEL[145.450867] bind /devices/pci:00/:00:14.0/usb1/1-4 (usb)
> UDEV  [145.454702] add  /devices/pci:00/:00:14.0/usb1/1-4 (usb)
> UDEV  [145.455832] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 
> (usb)
> UDEV  [145.456187] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
> (usb)
> UDEV  [145.456878] bind /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
> (usb)
> UDEV  [145.457303] add  
> /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
> UDEV  [145.458222] bind /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 
> (usb)
> UDEV  [145.462165] bind /devices/pci:00/: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 

Re: Problem with card reader on Debian 11

2022-11-12 Thread Claudia Neumann
Am Freitag, 11. November 2022, 19:37:08 CET schrieb to...@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. 

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??

Thanks for the help.

Best regards

Claudia

> > Am Freitag, 11. November 2022, 06:54:36 CET schrieb to...@tuxteam.de:
> > > On Thu, Nov 10, 2022 at 11:21:21PM +0100, Claudia Neumann wrote:
> [...]
> 
> Thanks. The only difference I can see is:
> 
> [Debian 11]
> [...]
> 
> > After:
> [...]
> 
> > Bus 001 Device 008: ID 1f61:0001 Flexocard GmbH VML-GK2 (USB)
> 
> [...]
> 
> >   iManufacturer   1 Flexocard GmbH
> >   iProduct2 VML-GK2 (USB)
> >   iSerial 3 2009002
> 
> [Debian 10];
> [...]
> 
> > After:
> [...]
> 
> > Bus 001 Device 014: ID 1f61:0001
> 
> [...]
> 
> >   iManufacturer   1
> >   iProduct2
> >   iSerial 3
> 
> This would kind of make sense: the newer kernel has a more complete
> USB device database and "knows" the Flexocard device.
> 
> Now I see a couple of possibilities. Either the newer drivers are
> buggy, or some other program (perhaps courtesy of udev) "thinks" it
> has to take care of this USB gadget. To get a clearer idea about the
> second, you might try to run "udevadm monitor" while you insert your
> device.
> 
> Another thing to check is whether any application has /dev/ttyACM0
> (that was its name, wasn't it?) open is to query it with `lsof`.
> 
> Ah, you might also want to see what parameters this pseudo-serial
> interface it has, e.g. `stty -a < /dev/ttyACM0'.
> 
> Sorry: if it seems like I'm poking in the dark, then that' perhaps
> because I am :-)
> 
> Cheers
> --
> tomás


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/pci:00/:00:14.0/usb1/1-4 (usb)
KERNEL[2035.067291] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 
(usb)
KERNEL[2035.067318] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
(usb)
KERNEL[2035.067352] bind /devices/pci:00/:00:14.0/usb1/1-4 (usb)
UDEV  [2035.079950] add  /devices/pci:00/:00:14.0/usb1/1-4 (usb)
UDEV  [2035.082479] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
(usb)
KERNEL[2035.00] bind /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
(usb)
KERNEL[2035.088911] add  
/devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[2035.088951] bind /devices/pci:00/: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/pci:00/: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/pci:00/:00:14.0/usb1/1-4 (usb)
UDEV  [2035.094826] bind /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.1 
(usb)
UDEV  [2035.095798] add  
/devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
UDEV  [2035.096868] bind /devices/pci:00/: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;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = 
; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase 
= ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff 
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt 
echoctl echoke -flusho -extproc
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/pci:00/:00:14.0/usb1/1-4 (usb)
KERNEL[145.450616] add  /devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0 
(usb)
KERNEL[145.450776] add  
/devices/pci:00/:00:14.0/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[145.450800] bind 

Re: Problem with card reader on Debian 11

2022-11-11 Thread tomas
On Fri, Nov 11, 2022 at 04:38:21PM +0100, Claudia Neumann wrote:
> Hi Tomas,
> 
> 
> Am Freitag, 11. November 2022, 06:54:36 CET schrieb to...@tuxteam.de:
> > On Thu, Nov 10, 2022 at 11:21:21PM +0100, Claudia Neumann wrote:

[...]

Thanks. The only difference I can see is:

[Debian 11]
[...]
> After:
[...]

> Bus 001 Device 008: ID 1f61:0001 Flexocard GmbH VML-GK2 (USB)
[...]
>   iManufacturer   1 Flexocard GmbH
>   iProduct2 VML-GK2 (USB)
>   iSerial 3 2009002

[Debian 10];
[...]
> After:
[...]

> Bus 001 Device 014: ID 1f61:0001
[...]
>   iManufacturer   1
>   iProduct2
>   iSerial 3

This would kind of make sense: the newer kernel has a more complete
USB device database and "knows" the Flexocard device.

Now I see a couple of possibilities. Either the newer drivers are
buggy, or some other program (perhaps courtesy of udev) "thinks" it
has to take care of this USB gadget. To get a clearer idea about the
second, you might try to run "udevadm monitor" while you insert your
device.

Another thing to check is whether any application has /dev/ttyACM0
(that was its name, wasn't it?) open is to query it with `lsof`.

Ah, you might also want to see what parameters this pseudo-serial
interface it has, e.g. `stty -a < /dev/ttyACM0'.

Sorry: if it seems like I'm poking in the dark, then that' perhaps
because I am :-)

Cheers
-- 
tomás


signature.asc
Description: PGP signature


Re: Problem with card reader on Debian 11

2022-11-11 Thread Claudia Neumann
Hi Tomas,


Am Freitag, 11. November 2022, 06:54:36 CET schrieb to...@tuxteam.de:
> On Thu, Nov 10, 2022 at 11:21:21PM +0100, Claudia Neumann wrote:
> > Hi all,
> >
> > I programmed a library to read german electronic health cards from special
> > devices certified in Germany.
> >
> > After an update from Debian 10 to Debian 11 one of these card readers
> > reads only 64 bytes using /dev/ttyACM0. It should read 256 Bytes which it
> > did from 2010 on.
> >
> > Something must have changed from Debian 10 to Debian 11. Is there a
> > configuration where I can change this behaviour? I don't know which
> > package to blame for the change und what kind of Information I should
> > give you.
>
> Hm. Where to start?
>
> Do you have access to one Debian 10 and one Debian 11 installation to
> compare things?

Yes, parallel installation on the same computer as well as installations on 
different
computers.

> The "ttyACM" is a hint that the device ends up as a "modem" (this is not to
> be taken too seriously). Does that happen in both installations?

Yes. Modemmanager is deinstalled.

> One main suspect is, of course, the kernel (mainly the USB modules). Can you
> compare the output of "lsusb" in both installations, perhaps before and
> after inserting the device?

Okay, sse attachments.

> Another hint would be the output of `lsusb -vvv'. Can you identify the
> device in question? Any differences between Debian 10 and 11?

See attachments. The output of lsusb before and after inserting the device and 
the output
of lsusb -vvv. I can not see any real difference. ??

As I said the library can read 256 Bytes from the device on Debian 10. On 
Debian 11 it can
only read 64 Bytes and breaks the transmission.

Best regards

Claudia


> Cheers and good luck
>
> (NOTE: I kept you in CC because I don't know whether you are subscribed,
> if you prefer, I can drop that)

Yes please keep CC.

Before:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 005: ID 0bda:57da Realtek Semiconductor Corp. Built-In Video 
Camera
Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card 
Reader Controller
Bus 001 Device 006: ID 413c:2106 Dell Computer Corp. QuietKey Keyboard
Bus 001 Device 004: ID 1ea7:0064 SHARKOON Technologies GmbH 2.4GHz Wireless 
rechargeable vertical mouse [More]
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

After:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 005: ID 0bda:57da Realtek Semiconductor Corp. Built-In Video 
Camera
Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card 
Reader Controller
Bus 001 Device 008: ID 1f61:0001 Flexocard GmbH VML-GK2 (USB)
Bus 001 Device 006: ID 413c:2106 Dell Computer Corp. QuietKey Keyboard
Bus 001 Device 004: ID 1ea7:0064 SHARKOON Technologies GmbH 2.4GHz Wireless 
rechargeable vertical mouse [More]
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb -vvv -d 1f61:0001

Bus 001 Device 008: ID 1f61:0001 Flexocard GmbH VML-GK2 (USB)
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass2 Communications
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor   0x1f61
  idProduct  0x0001
  bcdDevice1.07
  iManufacturer   1 Flexocard GmbH
  iProduct2 VML-GK2 (USB)
  iSerial 3 2009002
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   0x0043
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0
bmAttributes 0x80
  (Bus Powered)
MaxPower  490mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 2 Communications
  bInterfaceSubClass  2 Abstract (modem)
  bInterfaceProtocol  1 AT-commands (v.25ter)
  iInterface  0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82  EP 2 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval  32
  CDC Header:
bcdCDC   1.10
  CDC ACM:
bmCapabilities   0x00
  CDC Union:
bMasterInterface0
bSlaveInterface 1

Re: Problem with card reader on Debian 11

2022-11-10 Thread tomas
On Thu, Nov 10, 2022 at 11:21:21PM +0100, Claudia Neumann wrote:
> Hi all,
> 
> I programmed a library to read german electronic health cards from special 
> devices
> certified in Germany.
> 
> After an update from Debian 10 to Debian 11 one of these card readers reads 
> only 64
> bytes using /dev/ttyACM0. It should read 256 Bytes which it did from 2010 on.
> 
> Something must have changed from Debian 10 to Debian 11. Is there a 
> configuration
> where I can change this behaviour? I don't know which package to blame for 
> the change
> und what kind of Information I should give you.

Hm. Where to start?

Do you have access to one Debian 10 and one Debian 11 installation to compare
things?

The "ttyACM" is a hint that the device ends up as a "modem" (this is not to
be taken too seriously). Does that happen in both installations?

One main suspect is, of course, the kernel (mainly the USB modules). Can you
compare the output of "lsusb" in both installations, perhaps before and after
inserting the device?

Another hint would be the output of `lsusb -vvv'. Can you identify the device
in question? Any differences between Debian 10 and 11?

Cheers and good luck

(NOTE: I kept you in CC because I don't know whether you are subscribed,
if you prefer, I can drop that)

-- 
tomás


signature.asc
Description: PGP signature


Problem with card reader on Debian 11

2022-11-10 Thread Claudia Neumann
Hi all,

I programmed a library to read german electronic health cards from special 
devices
certified in Germany.

After an update from Debian 10 to Debian 11 one of these card readers reads 
only 64
bytes using /dev/ttyACM0. It should read 256 Bytes which it did from 2010 on.

Something must have changed from Debian 10 to Debian 11. Is there a 
configuration
where I can change this behaviour? I don't know which package to blame for the 
change
und what kind of Information I should give you.

Please help

Kind regards

Claudia Neumann