Not so old in fact, it is a Gen 5 purchased in 2019; I tried with another Aeotec Gen5 (purchased later in 2021) but the problem is still there. I read in other forums that the compatibility between Raspberry Pi4 and Aeotec Z-Stick Gen 5 was common and they also suggested to try with an externaly powered USB 2 hub. Unfortunately I do not have one but will order it and give it a try.
To answer apella12 question, /dev/ttyACM0 was the only proposed port in UI; I used dmesg and got the following lines for “usb”.
changed the line in the change /etc/tmpfiles.d/legacy.conf from
d /run/lock 0755 root root -
to
[498219.686575] usb 1-1.3: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[498219.686597] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[498219.686616] usb 1-1.3: Product: USB 2.0 Hub
[498219.697107] hub 1-1.3:1.0: USB hub found
[498219.697881] hub 1-1.3:1.0: 4 ports detected
[498222.365946] usb 1-1.3.2: new full-speed USB device number 4 using xhci_hcd
[498222.602990] usb 1-1.3.2: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
[498222.603013] usb 1-1.3.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[498222.670154] cdc_acm 1-1.3.2:1.0: ttyACM0: USB ACM device
[498222.673539] usbcore: registered new interface driver cdc_acm
[498222.673548] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[498246.313605] usb 1-1.3: USB disconnect, device number 3
[498246.313629] usb 1-1.3.2: USB disconnect, device number 4
[498248.145949] usb 1-1.4: new high-speed USB device number 5 using xhci_hcd
[498248.276627] usb 1-1.4: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[498248.276650] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[498248.276668] usb 1-1.4: Product: USB 2.0 Hub
[498248.278352] hub 1-1.4:1.0: USB hub found
[498248.278495] hub 1-1.4:1.0: 4 ports detected
[498248.695960] usb 1-1.4.2: new full-speed USB device number 6 using xhci_hcd
[498248.942964] usb 1-1.4.2: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
[498248.942987] usb 1-1.4.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[498248.950395] cdc_acm 1-1.4.2:1.0: ttyACM0: USB ACM device
[498257.009173] usb 1-1.4: USB disconnect, device number 5
[498257.009201] usb 1-1.4.2: USB disconnect, device number 6
[498258.255957] usb 1-1.1: new high-speed USB device number 7 using xhci_hcd
[498258.386550] usb 1-1.1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[498258.386572] usb 1-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[498258.386591] usb 1-1.1: Product: USB 2.0 Hub
[498258.388235] hub 1-1.1:1.0: USB hub found
[498258.388384] hub 1-1.1:1.0: 4 ports detected
[498258.805967] usb 1-1.1.2: new full-speed USB device number 8 using xhci_hcd
[498259.043013] usb 1-1.1.2: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
[498259.043036] usb 1-1.1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[498259.050272] cdc_acm 1-1.1.2:1.0: ttyACM0: USB ACM device
[498269.679848] usb 1-1.1: USB disconnect, device number 7
[498269.679876] usb 1-1.1.2: USB disconnect, device number 8
[498271.455936] usb 1-1.2: new high-speed USB device number 9 using xhci_hcd
[498271.586638] usb 1-1.2: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[498271.586661] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[498271.586680] usb 1-1.2: Product: USB 2.0 Hub
[498271.591156] hub 1-1.2:1.0: USB hub found
[498271.591306] hub 1-1.2:1.0: 4 ports detected
[498272.005953] usb 1-1.2.2: new full-speed USB device number 10 using xhci_hcd
[498272.243003] usb 1-1.2.2: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
[498272.243026] usb 1-1.2.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[498272.247912] cdc_acm 1-1.2.2:1.0: ttyACM0: USB ACM device
[498279.807372] usb 1-1.2: USB disconnect, device number 9
[498279.807400] usb 1-1.2.2: USB disconnect, device number 10