Public bug reported:
Environment:
* OS: Ubuntu 26.04.1 LTS (Resolute Raccoon)
* Architecture: amd64 (or any)
* Package in question: libdevice-serialport-perl
* Package version on host: 1.04-4build5 (or 1.04-4build6 depending on recent
mirror updates)
* Hardware: USB IR optical read/write head via ttyUSB (FTDI, CP2102, CH340
chipsets)
Problem Description:
When installing `libdevice-serialport-perl` via apt, the module appears to work
correctly at first glance. Calling `Device::SerialPort->new()` returns a valid
object and states the port is successfully "opened".
However, when reading from a ttyUSB device transmitting binary streams
(like the SML Smart Meter Language protocol at 9600 8N1), the received
byte stream is heavily truncated or drops data entirely compared to
native tools like `tio`. It seems like the compilation of the C-binding
(`SerialPort.xs`) against the new Glibc / kernel structures in Ubuntu
26.04 leads to a silent misconfiguration of the termios / ioctl layer
(e.g., failing to correctly switch to non-canonical / raw mode), causing
the kernel buffer to block binary streams.
How to reproduce:
1. Install the repository package: `sudo apt install libdevice-serialport-perl`
2. Run a simple Perl script reading binary data from a smart meter via ttyUSB.
The script will output either no data or just a few scattered bytes, while `tio
-b 9600 /dev/ttyUSB0` shows a continuous hex stream.
3. Running the exact same script and Perl version inside a Debian-based Docker
container on the exact same host machine works flawlessly.
Workaround / Fix:
Uninstalling the pre-compiled apt package and building the module natively via
CPAN completely resolves the issue. This forces the C-binding to align
correctly with the current Ubuntu 26.04 host toolchain.
Commands used to fix:
$ sudo apt purge libdevice-serialport-perl
$ sudo apt install build-essential
$ sudo cpan -i Device::SerialPort
** Affects: libdevice-serialport-perl (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173169
Title:
libdevice-serialport-perl broken on Ubuntu 26.04: opens ttyUSB but
returns truncated/incomplete byte stream
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libdevice-serialport-perl/+bug/2173169/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs