-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
SerialPort Version
10.5
Node Version
20.2
Electron Version
No response
Platform
Linux p4-1u-rt 6.8.0-2025-raspi-realtime #26-Ubuntu SMP PREEMPT_RT Tue Jun 24 12:25:16 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
Architecture
ARM
Hardware or chipset of serialport
BCM2711
What steps will reproduce the bug?
There is no way to modify the ICRNL flag with the binding interface. My application requires ~ICRNL
- Connect a device that produces \r\n termination to a serial port.
- Create a serialport binding interface to the serial port.
- Attempt to parse incoming messages where parsing depends upon the \r\n termination.
What happens?
Parsing fails.
What should have happened?
If the serial port is set to ~ICRNL, then the \r is NOT converted to \n and parsing suceeds.
Additional information
There is a comment in serialport_unix.cpp:
// ICRNL: map CR to NL (otherwise a CR input on the other computer will not terminate input)
// Future potential option
// options.c_iflag = ICRNL;
// otherwise make device raw (no other input processing)
This should be implemented for all interfaces, not just Unix.
Metadata
Metadata
Assignees
Labels
No labels